Edit report at http://bugs.php.net/bug.php?id=53412&edit=1
ID: 53412 Comment by: f...@php.net Reported by: php-bugs at thequod dot de Summary: php-fpm children constantly exiting (immediately) Status: Feedback 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: 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. Previous Comments: ------------------------------------------------------------------------ [2010-11-29 14:34:11] f...@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 ------------------------------------------------------------------------ [2010-11-29 14:17:15] php-bugs at thequod dot de Nov 29 13:39:18.967256 [WARNING] [pool www] child 29567 exited with code 1 after 0.001296 seconds from start ^Z Program received signal SIGTSTP, Stopped (user). 0xb7a77f32 in fork () from /lib/libc.so.6 (gdb) bt #0 0xb7a77f32 in fork () from /lib/libc.so.6 #1 0x083a7132 in fpm_children_make (wp=0x8920d08, in_event_loop=1, nb_to_spawn=1, is_debug=0) at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_children.c:376 #2 0x083a7707 in fpm_children_bury () at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_children.c:285 #3 0x083abed7 in fpm_got_signal (ev=0x87bba80, which=2, arg=0x0) at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_events.c:76 #4 0x083ab528 in fpm_event_fire (ev=0x87bba80) at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_events.c:373 #5 0x083abb3d in fpm_event_loop () at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_events.c:317 #6 0x083a6e85 in fpm_run (max_requests=0xbfffd580) at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm.c:76 #7 0x083ad78a in main (argc=3, argv=0xbffff684) at /build/buildd/php5-5.3.4~snap201011290730/sapi/fpm/fpm/fpm_main.c:1786 I guess that it would be more interesting to debug the child, which I did not manage to do. I've tried using "catch fork" to stop on the call to fork, and then both tried "follow-fork-mode=child" and stepping, but this does not allow me to step into the forked process (after the fork the next "n" command will start the endless forking/looping again). Please tell me how to debug this: a catch on "fork" appears to make sense. Should I then use another gdb instance to debug the child? I've tried that, but got "ptrace: Operation not permitted." then. Is this because it's too early to attach? ------------------------------------------------------------------------ [2010-11-28 03:37:16] f...@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Can you send a backtrace with the latest snapshot please ? ------------------------------------------------------------------------ [2010-11-27 20:45:52] php-bugs at thequod dot de FWIW I have just tried snap201011271730, too - same problem. Please tell me what you need from me to debug this. You can also get me in #php-fpm on Freenode (my nick is blueyed). I could provide you some screen/shell access, if this would help. ------------------------------------------------------------------------ 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