Bug #71269 [Opn->Csd]: php-fpm dumped core
| From: | maarten@php.net | Date: | Fri, 04 Mar 2016 13:10:06 +0000 |
| Subject: | Bug #71269 [Opn->Csd]: php-fpm dumped core | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199594@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71269&edit=1
ID: 71269
Updated by: maarten@php.net
Reported by: franck dot charras at openmailbox dot org
Summary: php-fpm dumped core
-Status: Open
+Status: Closed
Type: Bug
Package: FPM related
Operating System: arch linux
PHP Version: 7.0.1
-Assigned To:
+Assigned To: maarten
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Mentioned as fixed in 7.0.4 :)
http://php.net/ChangeLog-7.php#7.0.4
Previous Comments:
------------------------------------------------------------------------
[2016-01-25 01:52:03] mickael9 at gmail dot com
It's a bug in php-fpm. I already proposed a fix (see attached pull request) : https://github.com/php/php-src/pull/1720
------------------------------------------------------------------------
[2016-01-25 01:46:06] jeff at keyte dot me
So is this related to php-fpm or owncloud? Just wondering where to direct my attention for a fix.
Thanks.
------------------------------------------------------------------------
[2016-01-08 23:57:34] mickael9 at gmail dot com
I studied this more, I'm pretty sure this is what is happening :
1) php-fpm forks a child
2) fpm_signals_init_child() gets called which sets the correct handler for SIGQUIT
3) later, php_request_startup() gets called
4) php_request_startup() calls zend_signal_activate()
5) zend_signal_activate() resets all signal handlers, including SIGQUIT, overriding the correct
ones.
6) when the master decides to terminate a child it sends SIGQUIT to the child which dumps core
instead of gracefully exiting because the signal handler was overwritten
------------------------------------------------------------------------
[2016-01-08 19:42:04] mickael9 at gmail dot com
I think the child is not properly handling the received SIGQUIT coming from the php-fpm master.
Instead of stopping gracefully, it generates a coredump (almost as if the SIGQUIT was not properly
assigned to the correct signal handler)
------------------------------------------------------------------------
[2016-01-08 18:17:35] mickael9 at gmail dot com
Here's a (hopefully) more useful backtrace with PHP compiled in debug :
#0 0x00007f282b5f95f8 in raise () from /usr/lib/libc.so.6
#1 0x000000000083dc8b in zend_signal_handler (signo=3, siginfo=0x7ffc1f34ca70,
context=0x7ffc1f34c940) at /home/mickael/php/src/php-7.0.2/Zend/zend_signal.c:178
#2 0x000000000083d85e in zend_signal_handler_defer (signo=3, siginfo=0x7ffc1f34ca70,
context=0x7ffc1f34c940) at /home/mickael/php/src/php-7.0.2/Zend/zend_signal.c:89
#3 <signal handler called>
#4 0x00007f282b6afdf0 in __accept_nocancel () from /usr/lib/libc.so.6
#5 0x00000000008cd24e in fcgi_accept_request (req=0x1fc2860) at
/home/mickael/php/src/php-7.0.2/main/fastcgi.c:1396
#6 0x00000000008dc5ba in main (argc=4, argv=0x7ffc1f34d418) at
/home/mickael/php/src/php-7.0.2/sapi/fpm/fpm/fpm_main.c:187
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=71269
--
Edit this bug report at https://bugs.php.net/bug.php?id=71269&edit=1