|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69190 after php_request_shutdown segmentation fault
Submitted: 2015-03-05 06:26 UTC Modified: 2015-03-15 04:22 UTC
Avg. Score:4.1 ± 0.8
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:3 (42.9%)
From: tom916 at qq dot comd1234 Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.5.22 OS: ubuntu 12.04.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
31 - 21 = ?
Subscribe to this entry?

 [2015-03-05 06:26 UTC] tom916 at qq dot comd1234
#0  0x000000000079b049 in zend_mm_remove_from_free_list (heap=0x1b4e3b0, mm_block=0x1b44610) at /data1/debbuild/src/php-5.5.16/Zend/zend_alloc.c:815
#1  0x000000000079b24f in _zend_mm_free_int (heap=0x1600340, p=0x1b44940) at /data1/debbuild/src/php-5.5.16/Zend/zend_alloc.c:2110
#2  0x00000000007d1408 in zend_hash_destroy (ht=0x1057e30) at /data1/debbuild/src/php-5.5.16/Zend/zend_hash.c:560
#3  0x000000000079f408 in shutdown_compiler () at /data1/debbuild/src/php-5.5.16/Zend/zend_compile.c:243
#4  0x00000000007c315d in zend_deactivate () at /data1/debbuild/src/php-5.5.16/Zend/zend.c:938
#5  0x00000000007613c7 in php_request_shutdown (dummy=<optimized out>) at /data1/debbuild/src/php-5.5.16/main/main.c:1808
#6  0x0000000000439156 in main (argc=<optimized out>, argv=<optimized out>) at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fpm_main.c:1961
(gdb) quit


#0  zend_mm_add_to_free_list (heap=<optimized out>, mm_block=0x7fd6efecac30) at /data1/debbuild/src/php-5.5.16/Zend/zend_alloc.c:752
#1  0x000000000079b210 in _zend_mm_free_int (heap=0x1600340, p=0x7fd6efecaf80) at /data1/debbuild/src/php-5.5.16/Zend/zend_alloc.c:2118
#2  0x00000000007d142e in zend_hash_destroy (ht=0x7fd6efeca040) at /data1/debbuild/src/php-5.5.16/Zend/zend_hash.c:565
#3  0x0000000000870c61 in fcgi_close (req=0x7fff13d8d4b0, force=<optimized out>, destroy=<optimized out>) at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fastcgi.c:719
#4  0x000000000087167f in fcgi_finish_request (req=0x7fff13d8d4b0, force_close=0) at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fastcgi.c:1046
#5  0x0000000000878fd2 in sapi_cgi_deactivate () at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fpm_main.c:847
#6  sapi_cgi_deactivate () at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fpm_main.c:836
#7  0x0000000000769f5d in sapi_deactivate () at /data1/debbuild/src/php-5.5.16/main/SAPI.c:536
#8  0x0000000000761515 in php_request_shutdown (dummy=<optimized out>) at /data1/debbuild/src/php-5.5.16/main/main.c:1817
#9  0x0000000000439156 in main (argc=<optimized out>, argv=<optimized out>) at /data1/debbuild/src/php-5.5.16/sapi/fpm/fpm/fpm_main.c:1961
(gdb) quit


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-05 06:40 UTC]
-Status: Open +Status: Feedback
 [2015-03-05 06:40 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2015-03-05 06:43 UTC] tom916 at qq dot com
php version is php 5.5.16
 [2015-03-05 07:05 UTC]
If you cannot make short script that reproduces this crash, could you try newer PHPs including PHP7?(i.e. git master branch)

Short reproducible script is better. Please add module list you've loaded also.
 [2015-03-15 04:22 UTC] 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 "Re-Opened". Thank you.
 [2015-04-15 10:25 UTC] hchinchilla at habitissimo dot com
I can reproduce this issue just by executing this script:

<?php opcache_reset(); echo "done"; ?>

The issue doesn't happen every time, but 2 or 3 executions under load will trigger it for sure.
 [2015-04-15 10:26 UTC] hchinchilla at habitissimo dot com
Forgot to mention software versions: 

Ubuntu 12.04.5 LTS

PHP (cli) (built: Mar 24 2015 11:00:01) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
 [2015-04-15 10:48 UTC] hchinchilla at habitissimo dot com
Attaching the contents of a coredump:

Core was generated by `php-fpm: pool www                                                       '.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000006bb212 in zend_mm_remove_from_free_list (heap=0x184b300, mm_block=0x2190ce8) at /build/buildd/php5-5.5.23+dfsg/Zend/zend_alloc.c:830
830     /build/buildd/php5-5.5.23+dfsg/Zend/zend_alloc.c: No such file or directory.
(gdb) bt
#0  0x00000000006bb212 in zend_mm_remove_from_free_list (heap=0x184b300, mm_block=0x2190ce8) at /build/buildd/php5-5.5.23+dfsg/Zend/zend_alloc.c:830
#1  0x00000000006bb3c0 in _zend_mm_free_int (heap=0x184b300, p=0x2190cd8) at /build/buildd/php5-5.5.23+dfsg/Zend/zend_alloc.c:2105
#2  0x00000000006f1d95 in zend_hash_destroy (ht=0xe665b0) at /build/buildd/php5-5.5.23+dfsg/Zend/zend_hash.c:563
#3  0x00000000006d3da3 in shutdown_executor () at /build/buildd/php5-5.5.23+dfsg/Zend/zend_execute_API.c:319
#4  0x00000000006e3925 in zend_deactivate () at /build/buildd/php5-5.5.23+dfsg/Zend/zend.c:946
#5  0x0000000000681217 in php_request_shutdown (dummy=<optimized out>) at /build/buildd/php5-5.5.23+dfsg/main/main.c:1812
#6  0x0000000000466910 in main (argc=<optimized out>, argv=<optimized out>) at /build/buildd/php5-5.5.23+dfsg/sapi/fpm/fpm/fpm_main.c:1981
 [2015-04-15 10:59 UTC] hchinchilla at habitissimo dot com
Setting opcache.fast_shutdown=0 as sugested here seems to have fixed the problem.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 22:05:53 2023 UTC