From: haleden at colorado dot edu Operating system: redhat 7 PHP version: 5.1.2 PHP Bug Type: Apache related Bug description: php_apache_shutdown_wrapper calls itself until segfault
Description: ------------ there are a bunch of reports out there that have been labeled "bogus" that i bet were not. i began to have problems starting apache 1.3.27 reliably after installing the php module. i found that if i commented out the php module, apache would start. then, if i went in and uncommented the php module, and did a apachectl restart, things were fine. i finally got some time to dig deeper, and ran it under gdb and found that it was crashing in a deep stack of nested calls to php_apache_shutdown_wrapper. looking at the source, i see that php_apache_shutdown_wrapper calls apache_sapi_module.shutdown which is defined to be php_apache_shutdown_wrapper. i suspect that at one time apache_sapi_module.shutdown pointed to php_apache_request_shutdown and things worked until someone decided that the wrapper should be called but forgot to change the wrapper to call php_apache_request_shutdown. as to why it was happening at startup, i conjecture that apache keeps track of modules in some way and if a module didn't shutdown cleanly before, it calls the shutdown hook to clean up before starting again. by starting it without the module, that check was cleared, and it would not run the shutdown hook the next time. i'm not an expert at all of this stuff, but i made the change to the wrapper and it seems to work--further testing and sanity checking advised. thanks, hal Reproduce code: --------------- see above description for apache config changes Expected result: ---------------- apache starts sucessfully each time when php module defined Actual result: -------------- apache doesn't always start successfully when php module defined -- Edit bug report at http://bugs.php.net/?id=36455&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36455&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36455&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36455&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36455&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36455&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36455&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36455&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36455&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36455&r=support Expected behavior: http://bugs.php.net/fix.php?id=36455&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36455&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36455&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36455&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36455&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36455&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36455&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36455&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36455&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36455&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36455&r=mysqlcfg