Project

General

Profile

silent crash with lighttpd + php + fcgi

Added by jesus about 14 years ago

hi there,

running a (hacked) lacie network space box:

Linux NetworkSpace 2.6.12.6-arm1 #3 Tue Feb 3 14:04:45 CET 2009 armv5tejl
lighttpd/1.4.26
PHP Version 5.2.12

i can serve static stuff without problems, but as soon as i call a simple file with phpinfo(); more than once the server crashes silently. first call always works.

been looking through several logs, but nothing gets logged anywhere. turning debugging on doesn't reveil anything useful either. memory (RAM) is available as far as i can tell and it has not run of of file descriptors.

the config:

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
                   ( "localhost" =>
                     ( "socket" => "/tmp/php-fcgi.sock",
                       "bin-path" => "/opt/bin/php-fcgi",
                       "max-procs" => 1,
                       "bin-environment" =>
                         ( "PHP_FCGI_CHILDREN" => "2",
                           "PHP_FCGI_MAX_REQUESTS" => "1000" )
                     )
                   )
                 )

what now? :(


Replies (6)

RE: silent crash with lighttpd + php + fcgi - Added by crabcz about 14 years ago

Hi,

I'm having the same issue with WD My Book world

(ARM926EJ-S rev 5 processor with 128 MB RAM)

Linux storage 2.6.24.4 #1 Tue Feb 10 11:00:22 GMT 2009 armv5tejl unknown
lighttpd/1.4.26 (ssl) (Feb 9 2010 07:43:03)
PHP 5.2.12 (cgi-fcgi) (built: Feb 17 2010 04:53:09)

lighttpd configuration same as above, tried to disable all PHP extensions, but without luck...
I'm wondering if putting phpinfo() into disabled functions would help, but you never know when something else broken pops out...

Any tips?

RE: silent crash with lighttpd + php + fcgi - Added by Olaf-van-der-Spek about 14 years ago

Use strace or gdb to do some more debugging.

RE: silent crash with lighttpd + php + fcgi - Added by jesus about 14 years ago

choo choo, here comes the strace:

writev(12, [{"\1\1\0\1\0\10\0\0\0\1\0\0\0\0\0\0\1\4\0\1\3\243\0\0\17\17SERVER"..., 963}, {"\1\5\0\1\0\0\0\0", 8}], 2) = 971
epoll_ctl(0x6, 0x1, 0xc, 0xbeb2c1e8)    = 0
epoll_ctl(0x6, 0x3, 0xc, 0xbeb2c8d8)    = 0
socketcall(0x5, 0xbeb2c87c)             = -1 EAGAIN (Resource temporarily unavailable)
write(2, "fdevent.c.169: aborted\n", 23fdevent.c.169: aborted
) = 23
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(1229, 1229, SIGABRT)             = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++

log (file) contains strace output from start to first call of phpinfo (which is in fact called three times, as two image file are generated by php).

also, here is a snippet from svn (second line is line 169), version 1.4.26: http://redmine.lighttpd.net/projects/lighttpd/repository/entry/tags/lighttpd-1.4.26/src/fdevent.c

fdevent_handler fdevent_get_handler(fdevents *ev, int fd) {
        if (ev->fdarray[fd] == NULL) SEGFAULT();
        if (ev->fdarray[fd]->fd != fd) SEGFAULT();

        return ev->fdarray[fd]->handler;
}


does this help?

RE: silent crash with lighttpd + php + fcgi - Added by jesus about 14 years ago

workaround - i changed this:

server.event-handler = "poll" 

crabcz, can you confirm?

RE: silent crash with lighttpd + php + fcgi - Added by crabcz about 14 years ago

Hi, I can confirm, that your workaround works on my system as well.

Big thanks, I wouldn't have been able to solve it by myself.

RE: silent crash with lighttpd + php + fcgi - Added by Feike over 13 years ago

I had the same issue with lighttpd - 1.4.28 installed via optware on a Western Digital World Edition NAS.

My strace looked like this:

16084 write(2, "fdevent.c.180: aborted\n", 23) = 23
16084 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
16084 getpid()                          = 16084
16084 kill(16084, SIGABRT)              = 0
16084 --- SIGABRT (Aborted) @ 0 (0) ---

I used the workaround:

server.event-handler = "poll" 

And now it works like a charm. Thanks!

    (1-6/6)