cherokee / webserver

Cherokee Web Server
GNU General Public License v2.0
568 stars 105 forks source link

Random segfaults spawning fastcgi server, cherokee 0.99.24 #572

Open danielniccoli opened 11 years ago

danielniccoli commented 11 years ago

Original author: jja...@gmail.com (October 03, 2009 02:06:14)

What steps will reproduce the problem?

  1. (may be relevant: arch Ultrasparc-T1 (64 bit), Opensolaris 2009.06, cherokee 0.99.24 and spawn-fcgi v1.6.3 compiled from sources with gcc 3.4.3).
  2. Following configuration causes cherokee panic (segfault) when cherokee tries to launch the spawner:

source!2!host = 127.0.0.1:25000 source!2!interpreter = /opt/cherokee/bin/spawn-fcgi -f /var/www/moin-root/server/moin.fcg -a 127.0.0.1 -p 25000 source!2!nick = Moin FCGI source!2!type = interpreter

By using Unix socket instead of TCP, process is launched without problems:

source!2!host = /tmp/moin-fcg.sock source!2!interpreter = /opt/cherokee/bin/spawn-fcgi -f /var/www/moin-root/server/moin.fcg -s /tmp/moin-fcg.sock source!2!nick = Moin FCGI source!2!type = interpreter

But with this last configuration, if I try to request 5 childs (-F 5 option passed to spawn-fcgi) it segfaults again.

Notes:

  1. I have tested the timeout limit (by testing higher and lower limits than 3 seconds, the default), and it does not affect the result.
  2. In all cases, I can manually launch the spawfn-fcgi server from the shell (with UX socket, TCP socket and/or -F option) and it always works fine.
  3. I had a similar problem by using php-cgi as launcher for PHP fastcgi configuration. In this case, the problem was solved by using TCP socket instead of Unix socket.

Original issue: http://code.google.com/p/cherokee/issues/detail?id=591

danielniccoli commented 11 years ago

From alobbs on November 26, 2009 09:03:10 FTR,

While investigating the cause of the bug 504, I found that the command line you pasted for launching a FastCGI server listening to a local TCP port did not work for me. Instead, I've had to use the following command (it's a MacOS X 10.6 + macports command, you'll have to adapt it to OpenSolaris):

spawn-fcgi -n -a 127.0.0.1 -p 25000 -- /opt/local/bin/python2.5 server/moin.fcg

skinkie commented 10 years ago

The main things I read in the bugs are UltraSparc (thus big-endian). My guess is we should start testing similar behavior on ARM, and most likely we can spot where badness occurs.