Edit report at https://bugs.php.net/bug.php?id=64626&edit=1

 ID:                 64626
 Comment by:         admin at areainter dot net
 Reported by:        zakrzewskim at wp dot pl
 Summary:            PHP-FPM may segfault/hang on startup
 Status:             Open
 Type:               Bug
 Package:            FPM related
 Operating System:   CentOS 5.9 64-bit
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N

 New Comment:

Got the same issue on Debian 7 Wheezy.

# dpkg-query -l |grep php
ii  libssh2-php                      0.11.3-0.1+b2              amd64        
PHP Bindings for libssh2
ii  php-pear                         5.4.4-14+deb7u2            all          
PEAR - PHP Extension and Application Repository
ii  php5-cgi                         5.4.4-14+deb7u2            amd64        
server-side, HTML-embedded scripting language (CGI binary)
ii  php5-cli                         5.4.4-14+deb7u2            amd64        
command-line interpreter for the php5 scripting language
ii  php5-common                      5.4.4-14+deb7u2            amd64        
Common files for packages built from the php5 source
ii  php5-curl                        5.4.4-14+deb7u2            amd64        
CURL module for php5
ii  php5-fpm                         5.4.4-14+deb7u2            amd64        
server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd                          5.4.4-14+deb7u2            amd64        GD 
module for php5
ii  php5-imagick                     3.1.0~rc1-1+b2             amd64        
ImageMagick module for php5
ii  php5-mcrypt                      5.4.4-14+deb7u2            amd64        
MCrypt module for php5
ii  php5-memcached                   2.0.1-6                    amd64        
memcached extension module for PHP5, uses libmemcached
ii  php5-mysql                       5.4.4-14+deb7u2            amd64        
MySQL module for php5


PHP process died when I done php-fpm reload. Request processing failed with 500 
error.

php-fpm.log records:

[19-Aug-2013 09:45:27] NOTICE: Reloading in progress ...
[19-Aug-2013 09:45:27] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 09:45:27] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 09:45:27] NOTICE: reloading: execvp("/usr/sbin/php5-fpm", 
{"/usr/sbin/php5-fpm", "--fpm-config", "/etc/php5/fpm/php-fpm.conf"})

Apache log has error records about request, processed at restart time:

[Mon Aug 19 09:45:27 2013] [error] [client 1.2.3.4] (104)Connection reset by 
peer: FastCGI: comm with server "/external-php5-fpm-my000" aborted: read failed
[Mon Aug 19 09:45:27 2013] [error] [client 1.2.3.4] FastCGI: incomplete headers 
(0 bytes) received from server "/external-php5-fpm-000" 


Dmesg:

[4377941.041373] php5-fpm[27812]: segfault at 0 ip 00000000006abcaa sp 
00007fff1049b690 error 4 in php5-fpm[400000+6fd000]
[4378139.374307] php5-fpm[30689]: segfault at 418 ip 00000000006abcaa sp 
00007fff1049b690 error 4 in php5-fpm[400000+6fd000]
[4394853.530482] php5-fpm[16427]: segfault at 13031 ip 00000000006abcaa sp 
00007fff1049b690 error 4 in php5-fpm[400000+6fd000]
[4398633.104253] php5-fpm[21373]: segfault at ffffffff00000054 ip 
00000000006abcaa sp 00007fff1049b690 error 5 in php5-fpm[400000+6fd000]



--------
Also I can notice periodical error occurrence without php-fpm restarts or 
reloads, for example:

# cat php5-fpm.log |grep -E "ERROR|signal"

[19-Aug-2013 03:11:31] WARNING: [pool mypool] child 27812 exited on signal 11 
(SIGSEGV) after 87.231127 seconds from start
[19-Aug-2013 03:14:50] WARNING: [pool mypool] child 30689 exited on signal 11 
(SIGSEGV) after 43.602870 seconds from start
[19-Aug-2013 06:25:25] WARNING: [pool mypool] child 13080 exited on signal 11 
(SIGSEGV) after 18.955256 seconds from start
[19-Aug-2013 07:53:49] WARNING: [pool mypool] child 16427 exited on signal 11 
(SIGSEGV) after 43.778338 seconds from start
[19-Aug-2013 08:56:55] WARNING: [pool mypool] child 21373 exited on signal 11 
(SIGSEGV) after 49.748888 seconds from start
[19-Aug-2013 09:00:25] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 09:45:27] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 09:45:27] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 10:40:46] WARNING: [pool mypool] child 6684 exited on signal 11 
(SIGSEGV) after 40.652017 seconds from start
[19-Aug-2013 12:06:16] ERROR: unable to read what child say: Bad file 
descriptor (9)
[19-Aug-2013 12:06:16] ERROR: unable to read what child say: Bad file 
descriptor (9)


Previous Comments:
------------------------------------------------------------------------
[2013-04-10 19:44:16] zakrzewskim at wp dot pl

Description:
------------
This is related to this: https://bugs.php.net/bug.php?id=62886&thanks=7

Bug still exists and many users are reporting this.

There are many segfaults inside dmesg.

PHP 5.4.13 (cli) (built: Mar 14 2013 09:15:29)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube 
Ltd., and
    with SourceGuardian v9.0.4, Copyright (c) 2000-2012, by Inovica Ltd.

rpm -qi php
Name        : php                          Relocations: (not relocatable)
Version     : 5.4.13                            Vendor: Remi Collet
Release     : 1.el5.remi                    Build Date: czw 14 mar 2013 
09:27:38 CET
Install Date: sob 16 mar 2013 18:44:01 CET      Build Host: 
dixsept.famillecollet.com
Group       : Development/Languages         Source RPM: 
php-5.4.13-1.el5.remi.src.rpm
Size        : 9294225                          License: PHP and Zend and BSD
Signature   : DSA/SHA1, czw 14 mar 2013 09:45:45 CET, Key ID 004e6f4700f97f56
Packager    : http://blog.famillecollet.com/
URL         : http://www.php.net/
Summary     : Osadzany w HTML-u język skryptowy PHP (PHP: preprocesor 
hipertekstu).
Description :
PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated webpages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.

The php package contains the module which adds support for the PHP
language to Apache HTTP Server.

Test script:
---------------
It happens on highly loaded servers.

Expected result:
----------------
No segfaults, stable operation.

Actual result:
--------------
[04-Apr-2013 22:38:37] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)
[04-Apr-2013 22:38:55] ERROR: unable to read what child say: Bad file 
descriptor (9)


php-fpm[19644]: segfault at 7fff30199fe0 ip 0000000000574e30 sp 
00007fff30199fb0 error 6 in php-fpm[400000+32a000]
php-fpm[18003]: segfault at 7fff30199fe0 ip 0000000000574e30 sp 
00007fff30199fb0 error 6 in php-fpm[400000+32a000]
php-fpm[9699]: segfault at 7fff30199fe0 ip 0000000000574e30 sp 00007fff30199fb0 
error 6 in php-fpm[400000+32a000]
php-fpm[17649]: segfault at 7fff30199fe0 ip 0000000000574e30 sp 
00007fff30199fb0 error 6 in php-fpm[400000+32a000]
php-fpm[13203]: segfault at 7fff30199fe0 ip 0000000000574e30 sp 
00007fff30199fb0 error 6 in php-fpm[400000+32a000]
php-fpm[21313]: segfault at 7ffeff931fa0 ip 0000000000574e30 sp 
00007ffeff931f70 error 6 in php-fpm[400000+32a000]
php-fpm[4705]: segfault at 7fff84be5fa0 ip 0000000000574e30 sp 00007fff84be5f70 
error 6 in php-fpm[400000+32a000]
php-fpm[24508]: segfault at 7fff84be5fa0 ip 0000000000574e30 sp 
00007fff84be5f70 error 6 in php-fpm[400000+32a000]


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64626&edit=1

Reply via email to