#50265 [Fbk->Opn]: endless loop wating for child process
| From: | mg at fork dot pl | Date: | Tue, 24 Nov 2009 03:02:10 +0000 |
| Subject: | #50265 [Fbk->Opn]: endless loop wating for child process | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144998@lists.php.net to get a copy of this message | ||
ID: 50265
User updated by: mg at fork dot pl
Reported By: mg at fork dot pl
-Status: Feedback
+Status: Open
Bug Type: CGI related
Operating System: Linux
PHP Version: 5.2.11
New Comment:
I rebuilt php and started up, but as I don't know what exactly causes
the problem we'll have to wait until it happens...
I started it like
% PHP_FCGI_CHILDREN=2 PHP_FCGI_MAX_REQUESTS=100 php-cgi -e -b
127.0.0.1:30004 -c /.../php.ini
Process group 2720
Forking, 0 running
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720
pstree -uap shows
`-php-cgi,2720 -e -b 127.0.0.1:30004 -c /.../php.ini
|-php-cgi,13821 -e -b 127.0.0.1:30004 -c /.../php.ini
`-php-cgi,13822 -e -b 127.0.0.1:30004 -c /.../php.ini
Previous Comments:
------------------------------------------------------------------------
[2009-11-23 10:16:14] jani@php.net
Try enable fastcgi debugging with DEBUG_FASTCGI when you compile PHP
and provide the log of the failing run.
------------------------------------------------------------------------
[2009-11-23 02:24:21] mg at fork dot pl
Description:
------------
fast-cgi php process loops forever during wait()ing for child process
while there's no more child processes.
Actual result:
--------------
in cgi_main.c there's loop:
1631 while (1) {
1632 if (wait(&status) >= 0) {
1633 running--;
1634 break;
1635 } else if (exit_signal) {
1636 break;
1637 }
1638 }
wait returns -1 as strace shows:
wait4(-1, 0xbff2d2a4, 0, NULL) = -1 ECHILD (No child
processes)
and loop never breaks (as apparently exit_signal is set to 0).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50265&edit=1