Edit report at http://bugs.php.net/bug.php?id=53412&edit=1
ID: 53412
User updated by: php-bugs at thequod dot de
Reported by: php-bugs at thequod dot de
Summary: php-fpm children constantly exiting (immediately)
-Status: Feedback
+Status: Assigned
Type: Bug
Package: FPM related
Operating System: Linux
PHP Version: 5.3SVN-2010-11-26 (snap)
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
Don't you see a possibility to attach gdb to the child process to see
where it is exiting?
What does exit code 1 refer to? Generic error?
Does it make sense to use specific exit codes for reference?
Where should I to start with adding debug output?
FWIW, this happens both with the Ubuntu package (available at
https://launchpad.net/ubuntu/+source/php5/5.3.3-1ubuntu9.1/+build/2003382
if you like to try reproducing it from there) and the package updated
using the source from the snapshot(s); I have not tried it unpatched.
However, there does not appear to be a fpm specific patch (apart from
config handling).
My packages are available from here:
https://launchpad.net/~blueyed/+archive/ppa/+packages
Previous Comments:
------------------------------------------------------------------------
[2010-11-29 22:08:56] fat@php.net
OK, children forks correctely. There is a problem somewhere after
fork().
What you can do (as I can't reproduice the problem and I don't have
access to a
server which has the same problem):
set only one pool with :
log_level = debug
pm = static
pm.max_children = 1
insert a log trace in the source code step by step to determine where
the bug
comes from.
I'm sorry not to be able to help you more.
------------------------------------------------------------------------
[2010-11-29 21:50:23] php-bugs at thequod dot de
It looks like this:
Nov 29 21:47:59.518416 [DEBUG] pid 29191, fpm_children_make(), line 377:
pid after fork=30301
Nov 29 21:47:59.518440 [NOTICE] pid 29191, fpm_children_make(), line
400: [pool www] child 30301 started
Nov 29 21:47:59.518451 [DEBUG] pid 30301, fpm_children_make(), line 377:
pid after fork=0
Nov 29 21:47:59.518981 [DEBUG] pid 29191, fpm_got_signal(), line 75:
received SIGCHLD
Nov 29 21:47:59.518995 [WARNING] pid 29191, fpm_children_bury(), line
249: [pool www] child 30301 exited with code 1 after 0.000562 seconds
from start
------------------------------------------------------------------------
[2010-11-29 14:50:58] fat@php.net
Sorry, there is no backtrace with sigfault as there is no segfault ...
Can you patch fpm_children.c like this:
Index: fpm_children.c
===================================================================
--- fpm_children.c (révision 305775)
+++ fpm_children.c (copie de travail)
@@ -374,6 +374,7 @@
}
pid = fork();
+zlog(ZLOG_DEBUG, "pid after fork=%d", pid);
switch (pid) {
and test again (daemonize=no; log_level=debug)
send here your log file content.
------------------------------------------------------------------------
[2010-11-29 14:34:11] fat@php.net
The backtrace you sent does not seem to be right. You hit Ctrl+Z to stop
the FPM
process
"^Z
Program received signal SIGTSTP, Stopped (user)."
Can you provide a backtrace without any user interaction. Let FPM
sigfault.
thx
------------------------------------------------------------------------
[2010-11-29 14:20:33] php-bugs at thequod dot de
Here is a sample gdb session, maybe that helps already:
http://pastebin.com/RTUDniYL
------------------------------------------------------------------------
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/bug.php?id=53412
--
Edit this bug report at http://bugs.php.net/bug.php?id=53412&edit=1