|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-08-30 09:01 UTC] ole dot skudsvik at gmail dot com
Description:
------------
We are experiencing regular Apache segfaults.
We are sadly not able to reproduce as this seems to happen randomly when apache
have been running for a while. Neither can we relate the problem to any spesific
PHP code.
Apache error.log:
[Wed Aug 28 13:00:50 2013] [notice] child pid 31638 exit signal Segmentation
fault (11)
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
[Wed Aug 28 13:43:58 2013] [notice] child pid 13750 exit signal Segmentation
fault (11)
GDB Backtrace:
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0 zend_mm_add_to_free_list (heap=<value optimized out>,
mm_block=0x7f8e9aef8cc0) at /usr/src/debug/php-5.4.19/Zend/zend_alloc.c:748
748 if (ZEND_MM_FREE_BLOCK_SIZE(prev) != size) {
(gdb) bt
#0 zend_mm_add_to_free_list (heap=<value optimized out>,
mm_block=0x7f8e9aef8cc0) at /usr/src/debug/php-5.4.19/Zend/zend_alloc.c:748
#1 0x00007f8e8ed74412 in _zend_mm_free_int (heap=0x7f8e9a32d6a0,
p=0x7f8e9aef8cd0) at /usr/src/debug/php-5.4.19/Zend/zend_alloc.c:2114
#2 0x00007f8e8eda6ad1 in zend_hash_destroy (ht=0x7f8e8f19ffd0) at
/usr/src/debug/php-5.4.19/Zend/zend_hash.c:565
#3 0x00007f8e8ed8d173 in shutdown_executor () at /usr/src/debug/php-
5.4.19/Zend/zend_execute_API.c:322
#4 0x00007f8e8ed99e52 in zend_deactivate () at /usr/src/debug/php-
5.4.19/Zend/zend.c:938
#5 0x00007f8e8ed3c67c in php_request_shutdown (dummy=<value optimized out>) at
/usr/src/debug/php-5.4.19/main/main.c:1803
#6 0x00007f8e8ee44037 in php_apache_request_dtor (r=0x7f8e9ac8d1a8) at
/usr/src/debug/php-5.4.19/sapi/apache2handler/sapi_apache2.c:507
#7 php_handler (r=0x7f8e9ac8d1a8) at /usr/src/debug/php-
5.4.19/sapi/apache2handler/sapi_apache2.c:679
#8 0x00007f8e97ea0bb0 in ap_run_handler (r=0x7f8e9ac8d1a8) at
/usr/src/debug/httpd-2.2.15/server/config.c:158
#9 0x00007f8e97ea446e in ap_invoke_handler (r=0x7f8e9ac8d1a8) at
/usr/src/debug/httpd-2.2.15/server/config.c:376
#10 0x00007f8e97eafb30 in ap_process_request (r=0x7f8e9ac8d1a8) at
/usr/src/debug/httpd-2.2.15/modules/http/http_request.c:282
#11 0x00007f8e97eac9a8 in ap_process_http_connection (c=0x7f8e9ac80c18) at
/usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190
#12 0x00007f8e97ea86b8 in ap_run_process_connection (c=0x7f8e9ac80c18) at
/usr/src/debug/httpd-2.2.15/server/connection.c:43
#13 0x00007f8e97eb4977 in child_main (child_num_arg=<value optimized out>) at
/usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:667
#14 0x00007f8e97eb4c8a in make_child (s=0x7f8e99ffe860, slot=6) at
/usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:763
#15 0x00007f8e97eb590c in perform_idle_server_maintenance (_pconf=<value
optimized out>, plog=<value optimized out>, s=<value optimized out>) at
/usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:898
#16 ap_mpm_run (_pconf=<value optimized out>, plog=<value optimized out>,
s=<value optimized out>) at /usr/src/debug/httpd-
2.2.15/server/mpm/prefork/prefork.c:1102
#17 0x00007f8e97e8c900 in main (argc=1, argv=0x7fffb01ca148) at
/usr/src/debug/httpd-2.2.15/server/main.c:760
A complete strace of the crash is available here:
https://gist.github.com/olesku/6387821
Test script:
---------------
Currently not able to reproduce.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
I was able to reproduce this in php 5.6 with a bit of difficulty # cat /etc/centos-release CentOS release 6.6 (Final) # php -v PHP 5.6.8 (cli) (built: Apr 16 2015 20:00:59) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies script: opcache_reset(); require_once __DIR__.'/../vendor/autoload.php'; # composer $app = require_once __DIR__.'/../src/App.php'; # silex app $app->run(); error.log: zend_mm_heap corrupted zend_mm_heap corrupted zend_mm_heap corrupted zend_mm_heap corrupted zend_mm_heap corrupted ... I normally get only that error. If I launch an ab like: ab command: ab -r -n 1000 -c 2 http://localhost:8080/ I get a segfault pretty fast. But with Apache recompiled to generate the dump I'm not able to reproduce it