ID:               40286
 User updated by:  gabriel at oxeva dot fr
 Reported By:      gabriel at oxeva dot fr
 Status:           Open
 Bug Type:         CGI related
 Operating System: Linux 2.6
 PHP Version:      4.4.4
 Assigned To:      dmitry
 New Comment:

Forgot to mention that the backtrace provided is from a PHP 5.1.4
process, not php 5.2. Sorry for the misreading.

I can compile and run a PHP 5.2 process and wait for having one killed
without his children, but it will take some time to give you the
results.


Previous Comments:
------------------------------------------------------------------------

[2007-01-30 14:27:52] gabriel at oxeva dot fr

Missed to say that PHP 5 has exactly the same problem

------------------------------------------------------------------------

[2007-01-30 14:26:42] gabriel at oxeva dot fr

strace -p <PID> provides the following :
read(3,  <unfinished ...>

and gdb program <PID> and "bt" provides :
(gdb) bt
#0  0xb7fe3410 in ?? ()
#1  0xbfd86618 in ?? ()
#2  0x00000008 in ?? ()
#3  0xbfd86600 in ?? ()
#4  0x008e14f3 in __read_nocancel () from /lib/tls/libc.so.6
#5  0x083ba23e in fcgi_read ()
#6  0x083bbb38 in FCGX_FPrintF ()
#7  0x0831ab22 in sapi_deactivate ()
#8  0x08314a3d in php_request_shutdown ()
#9  0x083bcdeb in main ()

Please note that I can't test with debugging symbols (the libraries and
PHP are stripped), as this binary is in production environment and the
bug occurs only under load.

------------------------------------------------------------------------

[2007-01-30 13:20:40] [EMAIL PROTECTED]

Could you plase attach debugger to non-killed process and provide
backtrace.

Do php-5.2 has the same problem?

------------------------------------------------------------------------

[2007-01-30 11:50:52] gabriel at oxeva dot fr

In all the report, I mean killed is kill with signal 15 (TERM).

As stated in the report, children are blocking in a syscall, which
means they can only be killed by signal 9 (KILL). The fastcgi_cleanup
function registered on shutdown kills with TERM signal 15. I think the
bug occurs when children, under load, are executing a syscall when the
parent is killed and start the fastcgi_cleanup. A fast workaround would
be to kill children with signal 9 in the fastcgi_cleanup, at
sapi/cgi/cgi_main.c:951.

------------------------------------------------------------------------

[2007-01-30 11:40:32] [EMAIL PROTECTED]

>From what I can see in the sources, FastCGI registers a signal handler
to kill its children on shutdown (see sapi/cgi/cgi_main.c, line 1219),
but this handler surely won't be called on SIGKILL. Hence the question
- what signal do you mean by "killed"?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40286

-- 
Edit this bug report at http://bugs.php.net/?id=40286&edit=1

Reply via email to