From: jfbustarret at tf1 dot fr Operating system: Linux PHP version: 5.0.5 PHP Bug Type: Reproducible crash Bug description: Segmentation fault in shutdown_memory_manager
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 bug report at http://bugs.php.net/?id=35140&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35140&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35140&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35140&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35140&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35140&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35140&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35140&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35140&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35140&r=support Expected behavior: http://bugs.php.net/fix.php?id=35140&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35140&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35140&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35140&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35140&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35140&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35140&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35140&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35140&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35140&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35140&r=mysqlcfg