Bug 1119832 - php-fpm segfault -> 502 Bad Gateway on Nginx
Summary: php-fpm segfault -> 502 Bad Gateway on Nginx
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: 20
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-15 15:30 UTC by Krewh
Modified: 2015-06-29 21:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 21:35:58 UTC


Attachments (Terms of Use)
backtrace (3.60 KB, text/plain)
2014-07-15 16:37 UTC, Krewh
no flags Details

Description Krewh 2014-07-15 15:30:39 UTC
Description of problem:

On some php script, php-fpm quit with segfault :

[15-Jul-2014 17:18:22.821612] DEBUG: pid 3694, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 5 spare children, 6 running children. Spawning rate 1
[15-Jul-2014 17:18:23.473691] DEBUG: pid 3694, fpm_event_loop(), line 419: event module triggered 2 events
[15-Jul-2014 17:18:23.474148] DEBUG: pid 3694, fpm_got_signal(), line 76: received SIGCHLD
[15-Jul-2014 17:18:23.474221] WARNING: pid 3694, fpm_children_bury(), line 252: [pool www] child 3700 exited on signal 11 (SIGSEGV - core dumped) after 21.675400 seconds from start
[15-Jul-2014 17:18:23.475131] NOTICE: pid 3694, fpm_children_make(), line 421: [pool www] child 3790 started


Version-Release number of selected component (if applicable):

nginx.x86_64                               1:1.4.7-1.fc20      @updates  
php-channel-phpseclib.noarch               1.3-1.fc20          @updates         
php-cli.x86_64                             5.5.14-1.fc20       @updates         
php-common.x86_64                          5.5.14-1.fc20       @updates         
php-debuginfo.x86_64                       5.5.14-1.fc20       @updates-debuginfo
php-fpm.x86_64                             5.5.14-1.fc20       @updates         
php-mbstring.x86_64                        5.5.14-1.fc20       @updates         
php-mcrypt.x86_64                          5.5.14-1.fc20       @updates         
php-mysqlnd.x86_64                         5.5.14-1.fc20       @updates         
php-pdo.x86_64                             5.5.14-1.fc20       @updates         
php-pear.noarch                            1:1.9.4-29.fc20     @updates         
php-pecl-geoip.x86_64                      1.0.8-6.fc20        @fedora          
php-pecl-geoip-debuginfo.x86_64            1.0.8-6.fc20        @fedora-debuginfo
                                                               @fedora          
                                                               @fedora-debuginfo
php-pecl-jsonc.x86_64                      1.3.3-1.fc20        @updates         
php-pecl-jsonc-debuginfo.x86_64            1.3.3-1.fc20        @updates-debuginfo
php-pecl-redis.x86_64                      2.2.5-1.fc20        @updates         
php-pecl-redis-debuginfo.x86_64            2.2.5-1.fc20        @updates-debuginfo
php-pecl-ssh2.x86_64                       0.12-2.fc20         @fedora          
php-pecl-ssh2-debuginfo.x86_64             0.12-2.fc20         @fedora-debuginfo
php-phpseclib-crypt-aes.noarch             0.3.5-2.fc20        @updates         
php-phpseclib-crypt-blowfish.noarch        0.3.5-4.fc20        @updates         
php-phpseclib-crypt-des.noarch             0.3.5-3.fc20        @updates         
php-phpseclib-crypt-hash.noarch            0.3.5-2.fc20        @updates         
php-phpseclib-crypt-random.noarch          0.3.5-2.fc20        @updates         
php-phpseclib-crypt-rc4.noarch             0.3.5-2.fc20        @updates         
php-phpseclib-crypt-rijndael.noarch        0.3.5-2.fc20        @updates         
php-phpseclib-crypt-tripledes.noarch       0.3.5-3.fc20        @updates         
php-phpseclib-crypt-twofish.noarch         0.3.5-3.fc20        @updates         
php-phpseclib-math-biginteger.noarch       0.3.5-2.fc20        @updates         
php-phpseclib-net-ssh2.noarch              0.3.5-3.fc20        @updates         
php-process.x86_64                         5.5.14-1.fc20       @updates         
php-xml.x86_64                             5.5.14-1.fc20       @updates


How reproducible:
Reload the page.

Actual results:
502 Bad Gateway on nginx. Segfault alert in system log.

kernel: [  597.881548] php-fpm[3703]: segfault at 41 ip 00007f997e6aa7ca sp 00007fffd4d59990 error 4 in php-fpm[7f997e49b000+3a1000]
kernel: php-fpm[3703]: segfault at 41 ip 00007f997e6aa7ca sp 00007fffd4d59990 error 4 in php-fpm[7f997e49b000+3a1000]


Additional info:
Backtrace :

#0  _zend_mm_alloc_int (heap=0x7fc688839330, size=32) at /usr/src/debug/php-5.5.14/Zend/zend_alloc.c:1910
#1  0x00007fc686841fb3 in php_formatted_print (ht=<optimized out>, len=len@entry=0x7fff45dfc144, use_array=use_array@entry=0, format_offset=format_offset@entry=0)
    at /usr/src/debug/php-5.5.14/ext/standard/formatted_print.c:548
#2  0x00007fc686843926 in zif_user_sprintf (ht=<optimized out>, return_value=0x7fc68ffcbc40, return_value_ptr=<optimized out>, this_ptr=<optimized out>, 
    return_value_used=<optimized out>) at /usr/src/debug/php-5.5.14/ext/standard/formatted_print.c:673
#3  0x00007fc6868e1e7b in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>, return_value_used=<optimized out>)
    at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:97
#4  0x00007fc6869a5d95 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:552
#5  0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665f2a0) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#6  0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#7  0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665f120) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#8  0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665f120) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#9  0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#10 0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665efa0) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#11 0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665efa0) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#12 0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#13 0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665ec20) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#14 0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665ec20) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#15 0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#16 0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665e950) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#17 0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665e950) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#18 0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#19 0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665e510) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#20 0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665e510) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#21 0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#22 0x00007fc6869a640d in zend_do_fcall_common_helper_SPEC (execute_data=0x7fc68665de48) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:584
#23 0x00007fc68691e7b8 in execute_ex (execute_data=0x7fc68665de48) at /usr/src/debug/php-5.5.14/Zend/zend_vm_execute.h:363
#24 0x00007fc6868e1d59 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-5.5.14/Zend/zend_dtrace.c:73
#25 0x00007fc6868e4161 in zend_call_function (fci=fci@entry=0x7fff45dfcdb0, fci_cache=<optimized out>, fci_cache@entry=0x7fff45dfcd80)

Comment 1 Krewh 2014-07-15 16:37:06 UTC
Created attachment 918199 [details]
backtrace

Comment 2 Fedora Admin XMLRPC Client 2014-07-16 12:03:31 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Krewh 2014-07-16 12:50:55 UTC
The same segfault occurs with last remi repository packages.

php-channel-phpseclib.noarch                     1.3-1.fc20.remi           @remi
php-cli.x86_64                                   5.5.14-1.fc20.remi        @remi
php-common.x86_64                                5.5.14-1.fc20.remi        @remi
php-fpm.x86_64                                   5.5.14-1.fc20.remi        @remi
php-mbstring.x86_64                              5.5.14-1.fc20.remi        @remi
php-mcrypt.x86_64                                5.5.14-1.fc20.remi        @remi
php-mysqlnd.x86_64                               5.5.14-1.fc20.remi        @remi
php-pdo.x86_64                                   5.5.14-1.fc20.remi        @remi
php-pear.noarch                                  1:1.9.5-1.fc20.remi       @remi
php-phpseclib-crypt-aes.noarch                   0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-base.noarch                  0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-blowfish.noarch              0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-des.noarch                   0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-hash.noarch                  0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-random.noarch                0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-rc4.noarch                   0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-rijndael.noarch              0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-tripledes.noarch             0.3.7-1.fc20.remi         @remi
php-phpseclib-crypt-twofish.noarch               0.3.7-1.fc20.remi         @remi
php-phpseclib-math-biginteger.noarch             0.3.7-1.fc20.remi         @remi
php-phpseclib-net-ssh2.noarch                    0.3.7-1.fc20.remi         @remi
php-process.x86_64                               5.5.14-1.fc20.remi        @remi
php-xml.x86_64                                   5.5.14-1.fc20.remi        @remi

Comment 4 Remi Collet 2014-07-16 13:07:32 UTC
Are you able to provider a reproducer ?

Comment 5 Krewh 2014-07-16 19:24:07 UTC
Unfortunately, I can't provide a reproducer.
The problem occurs on a big Symfony project.

But the same project works perfectly on a Debian production server (and on a Linux Mint workstation), with exactly the same version of php.

Comment 6 Christoph Trassl 2014-07-24 03:03:58 UTC
I experienced an httpd segfault issue after updating to GeoIP-1.5.1 (epel6), which was released 2014-07-12. Perhaps this is related.

Comment 7 Fedora End Of Life 2015-05-29 12:22:43 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-06-29 21:35:58 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.