Edit report at https://bugs.php.net/bug.php?id=62418&edit=1
ID: 62418
Comment by: ck at claudiokuenzler dot com
Reported by: php at scratchspace dot com
Summary: php-fpm master process crashes
Status: No Feedback
Type: Bug
Package: FPM related
Operating System: CentOS 6.2 x86_x64
PHP Version: 5.3.14
Block user comment: N
Private report: N
New Comment:
I experience a similar problem on a SmartOS smartmachine (like Solaris zone)
where the master process seems to crash. Difference is that events.mechanism is
set to /dev/poll, not to poll.
With activated debug log, the logs are full with such entries:
-------------
[06-May-2013 09:28:15.974674] WARNING: pid 7144, fpm_event_devpoll_wait(), line
166: /dev/poll: ioctl() returns 22
[06-May-2013 09:28:15.974699] WARNING: pid 7144, fpm_event_devpoll_wait(), line
166: /dev/poll: ioctl() returns 22
[06-May-2013 09:28:15.974726] WARNING: pid 7144, fpm_event_devpoll_wait(), line
166: /dev/poll: ioctl() returns 22
[06-May-2013 09:28:15.974747] WARNING: pid 7144, fpm_event_devpoll_wait(), line
166: /dev/poll: ioctl() returns 22
Eventually, php-fpm crashes.
Dtrace shows the following stack info:
-------------
12 6130 getpid:entry
libc.so.1`getpid+0xa
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6430 clock_gettime:entry
libc.so.1`__clock_gettime+0x28
php-fpm`fpm_clock_get+0x24
php-fpm`fpm_event_loop+0x1b7
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6130 getpid:entry
libc.so.1`getpid+0xa
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6430 clock_gettime:entry
libc.so.1`__clock_gettime+0x28
php-fpm`fpm_clock_get+0x24
php-fpm`fpm_event_loop+0xa6
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6186 ioctl:entry
libc.so.1`ioctl+0xa
php-fpm`fpm_event_loop+0x16f
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6116 gtime:entry
libc.so.1`__time+0xa
libc.so.1`tzset+0x26
libc.so.1`strftime+0x2d
php-fpm`zlog_print_time+0x3f
php-fpm`zlog_ex+0x348
php-fpm`fpm_event_devpoll_wait+0x106
php-fpm`fpm_event_loop+0x16f
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
12 6100 write:entry
libc.so.1`__write+0xa
php-fpm`zlog_ex+0x189
php-fpm`fpm_event_devpoll_wait+0x106
php-fpm`fpm_event_loop+0x16f
php-fpm`fpm_run+0x67
php-fpm`main+0x581
php-fpm`_start+0x6c
Not sure, if this the same source of bug, but the relevant function's name is
the same (just replace epoll through devpoll): fpm_event_devpoll_wait.
Previous Comments:
------------------------------------------------------------------------
[2013-02-25 16:45:23] webmaster at jbfavre dot org
Hello,
Little feedback to this issue.
After 2 weeks running PHP-FPM using events.mechanism=poll, I did not
experienced any segfault.
Seems that Rasmus was right.
Regards,
Jean Baptiste Favre
------------------------------------------------------------------------
[2013-02-18 00:35:52] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2013-02-12 10:59:49] webmaster at jbfavre dot org
Hello,
We have the same problem, with PHP 5.3.21 behind Nginx 1.2.6.
Happens, sometimes, at PHP-FPM reload, after updating the code.
We're running a Symfony web app, on Ubuntu 10.04 Lucid with home-made PHP
packages.
Enabled modules
---------------
amqp 1.0.9
apc 3.1.9
curl 5.3.21
gd 5.3.21
geoip 1.0.8
igbinary 1.1.1
intl 5.3.21
memcached 2.1.0
mongo 1.3.0
mysql 5.3.21
pinba 1.1.0
redis 2.2.2
Have just modified FPM configuration to use 'poll' instead of default 'epoll'.
Will see what happen.
2 backtraces available (I can provide coredumps upon request)
------------------------------------------------------------
###############################
#0 0x0000444c48434749 in ?? ()
#1 0x0000000000761703 in fpm_event_epoll_wait (queue=0x1f270e8, timeout=3) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/events/epoll.c:143
#2 0x0000000000755e0f in fpm_event_loop (err=0) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm_events.c:403
#3 0x0000000000750d67 in fpm_run (max_requests=0x7fff3704f79c) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm.c:113
#4 0x000000000075872e in main (argc=3, argv=0x7fff37051908) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm_main.c:1838
###############################
#0 0x00000000007558d6 in fpm_event_fire (ev=0x2ae4d78) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm_events.c:459
#1 0x0000000000761703 in fpm_event_epoll_wait (queue=0x2ae4d78, timeout=3) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/events/epoll.c:143
#2 0x0000000000755e0f in fpm_event_loop (err=0) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm_events.c:403
#3 0x0000000000750d67 in fpm_run (max_requests=0x7fff94e7286c) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm.c:113
#4 0x000000000075872e in main (argc=3, argv=0x7fff94e749d8) at
/tmp/buildd/php5-5.3.21/sapi/fpm/fpm/fpm_main.c:1838
Regards,
Jean Baptiste Favre
------------------------------------------------------------------------
[2012-07-04 10:30:04] [email protected]
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.
If you were able to give us a complete and detailed stack trace it would be
useful.
thx
------------------------------------------------------------------------
[2012-06-27 20:10:08] [email protected]
Not sure. Many people out there run with epoll without problems.
------------------------------------------------------------------------
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=62418
--
Edit this bug report at https://bugs.php.net/bug.php?id=62418&edit=1