#35140 [Opn->Fbk]: Segmentation fault in shutdown_memory_manager
| From: | sniper@php.net | Date: | Mon, 07 Nov 2005 17:02:40 +0000 |
| Subject: | #35140 [Opn->Fbk]: Segmentation fault in shutdown_memory_manager | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87782@lists.php.net to get a copy of this message | ||
ID: 35140
Updated by: sniper@php.net
Reported By: jfbustarret at tf1 dot fr
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 5.0.5
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-11-07 16:34:24] jfbustarret at tf1 dot fr
Description:
------------
Sometimes, some apache process segfault in shutdown_memory_manager.
Configuration : PHP 5.0.5/Linux/apache2
Reproduce code:
---------------
Unable to find the code that generates the segfault (the app is quite
large)
Actual result:
--------------
Backtrace :
#0 0x40662c45 in shutdown_memory_manager (silent=1, full_shutdown=0)
at /soft/sources/php/php-5.0.5/Zend/zend_alloc.c:485
485 for (j=0; j<AG(cache_count)[i]; j++) {
(gdb) bt
#0 0x40662c45 in shutdown_memory_manager (silent=1, full_shutdown=0)
at /soft/sources/php/php-5.0.5/Zend/zend_alloc.c:485
#1 0x40641b79 in php_request_shutdown (dummy=0x0)
at /soft/sources/php/php-5.0.5/main/main.c:1236
#2 0x406a5114 in php_handler (r=0x82e06e0)
at
/soft/sources/php/php-5.0.5/sapi/apache2handler/sapi_apache2.c:436
(gdb) p alloc_globals.cache[i]
$2 = {0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38, 0xb7179c38,
0xb7179c38,
0xb7179c38, 0xb7179c38, 0xb7179c38, 0x0 <repeats 247 times>}
[ same pointer, multiple times !!! ]
(gdb) p alloc_globals.cache[i][j]
$3 = (void *) 0xb7179c38
(gdb) p *(zend_mem_header*) alloc_globals.cache[i][j]
$5 = {pNext = 0x0, pLast = 0x65646f6d, size = 0, cached = 0}
I tried recompiling with enable-debug, and I get "Only variables can be
passed by reference" fatal errors in a function call that does not use
references :
httpRedirect($referer.$urlReconstruite);
The function prototype is :
function httpRedirect($url) {
I am unable to reproduce the crash with enable-debug activated.
configure is :
'./configure' '--with-apxs2=/usr/sbin/apxs2'
'--with-config-file-path=/etc' '--with-oci8' '--with-curl=/usr/lib'
'--with-gd=shared' '--with-jpeg-dir=/usr/lib'
'--with-png-dir=/usr/lib'
'--with-freetype-dir=/usr/lib' '--enable-gd-native-ttf' '--with-zlib'
'--with-mcrypt=/usr/lib' '--with-dom' '--enable-sockets'
'--with-gmp=shared' '--without-pear' '--with-mysql=/usr'
'--with-mysql-sock=/tmp/mysql.sock' '--with-imagick-gm'
'--with-imagick=shared' 'CFLAGS=-O2 -g' '--with-snmp=shared'
'--enable-ftp=shared' '--enable-soap=shared' '--enable-debug'
I tried the latest snapshot, but it crashes while trying to load the
main php file.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35140&edit=1