Forum

Hiawathawon't stay up

fred974
28 January 2015, 13:04
Hi Hugo,

I wondered If you could help me please.

I have Hiawatha running for weeks with no problem.
Yesterday I enabled php5-xsl and sinc then, Hiawatha keep crashing..
When I start it I get no error message and seem to be ok.
But when I run service hiawatha status, I get
hiawatha is not running.

I looked at the system.log file but I have absolutly nothing..

Is there a debug feature I could use?

Thank you

Hiawatha version: v9.8
Operating System: FreeBSD 10
Hugo Leisink
28 January 2015, 14:33
Please, follow these instrunctions.
fred974
28 January 2015, 16:04
Hi Hugo,
As requested I ran Hiawatha via valgrind and bellow is the link to the text file.
https://www.dropbox.com/s/4rc3puozocxmjxb/valgrind.txt?dl=0

In addition I found the following error message in my /var/log/messages:
Jan 28 14:41:18 garfield hiawatha: segmentation fault!


Thank you for your help
Hugo Leisink
28 January 2015, 22:30
This looks to me like a bug that is not Hiawatha related, but jail / libthr related.
fred974
29 January 2015, 13:03
Hi Hugo,

Just turned on my old NGINX webserver and its all working ok.
So the issue is not with php setting but with Hiawatha.
Could you send me any clues on how to solved this problem?

It was working ok and over sudden it stopped.
Fred
Fred
29 January 2015, 14:01
Ok,

I stripped everything back to basic and only running 1 website at the moment.
Hiawatha is now up and running again but this keep giving me blank page..
Looking at the system.log file I can see
Thu 29 Jan 2015 12:22:57 +0000|Hiawatha v9.8 started.
213.146.159.254|Thu 29 Jan 2015 12:24:55 +0000|Timeout while waiting for first request
213.146.159.254|Thu 29 Jan 2015 12:36:28 +0000|Timeout while waiting for first request
66.249.79.101|Thu 29 Jan 2015 12:42:06 +0000|Client kicked
66.249.79.93|Thu 29 Jan 2015 12:42:06 +0000|Client kicked
Thu 29 Jan 2015 12:42:06 +0000|Hiawatha v9.8 stopped.
Thu 29 Jan 2015 12:42:17 +0000|Hiawatha v9.8 started.
213.146.159.254|Thu 29 Jan 2015 12:43:20 +0000|Maximum number of connections for IP address reached
213.146.159.254|Thu 29 Jan 2015 12:43:20 +0000|Client banned because of too many simultaneous connections
213.146.159.254|Thu 29 Jan 2015 12:43:20 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:20 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:20 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:21 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:21 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:21 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:21 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:22 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:22 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:43:22 +0000|Client kicked
213.146.159.254|Thu 29 Jan 2015 12:44:58 +0000|Unbanned (24 connect attempts during ban)


why refreshing the webpage give me this type of error
Is there a way to whitelist my IP address?

Thank you
Fred
Hugo Leisink
29 January 2015, 14:19
The valgrind output normally gives me the cause of the problem, but this time it points everywhere to places outside Hiawatha. The fatal SIGSEGV points to libthr. That Nginx runs fine doesn't proof that the problem lies within Hiawatha. To me, it only proofs that Nginx doesn't trigger the bug in libthr that causes Hiawatha to crash.

You can whitelist your IP address via BanlistMask. See the manual page for further details.

Also, can you re-run the valgrind test, but this time without stripping the Hiawatha binary. Its size should then be around 900kb instead of 190kb. All the ??? will then be replaced with function names.
Fred
29 January 2015, 15:35
Thank you Hugo.

Could you please tell me what you mean by "without stripping the Hiawatha binary"? Could you please show me the command to run?

Thank you
Hugo Leisink
29 January 2015, 15:41
I assume you installed Hiawatha via the ports tree, since 9.8 is the one available via freshports [www.freshports.org]. By doing so, you'll end up with a stripped binary (stripped from all debug information).

Please download the source directly via this website and follow these compilation instructions. There is no need to install it. The size of the binary should be around 900kb. If you use 'strip hiawatha', you'll strip the binary from all the debug information and the size should be again around 200kb. But don't do this. Now, run the created Hiawatha binary via valgrind from within the build directory.
Fred
29 January 2015, 17:24
I have ran cmake with the following options:
cmake -DENABLE_DEBUG=on -DENABLE_SSL=ON -DENABLE_TOOLKIT=ON -DENABLE_XSLT=ON ..
make


I have them copied my original hiawatha.conf and cgi-wrapper.conf to /build/config/ and modified the paths
then ran:
bash
sudo valgrind --tool=memcheck --leak-check=full ./hiawatha -d 2> valgrind.txt


but the server does start..
https://www.dropbox.com/s/4rc3puozocxmjxb/valgrind.txt?dl=0 => valgrind.txt
https://www.dropbox.com/s/2ntosou0prmjwfy/hiawatha.conf?dl=0 =>hiawatha.conf
Hugo Leisink
29 January 2015, 21:29
There must be something going wrong, because in valgrind.txt I see a "Syntax error in hiawatha.conf on line 132.", but line 132 in your hiawatha.conf is empty.
This topic has been closed.