ID: 34725 Updated by: [EMAIL PROTECTED] Reported By: david at tulloh dot id dot au Status: Open Bug Type: Scripting Engine problem Operating System: Debian Linux PHP Version: 5.1.0RC3 -Assigned To: +Assigned To: dmitry New Comment:
The problem is related to TSRM and ext/pcre that registers its globals with shutdown handler: ZEND_INIT_MODULE_GLOBALS(pcre, php_pcre_init_globals, php_pcre_shutdown_globals); PHP tries to call php_pcre_shutdown_globals() after it unloads ext/pcre and crashes. I'll look if it is possible to fix this, but may be it is not possible. As work around I recomend not to compile ext/pcre as DSO. Previous Comments: ------------------------------------------------------------------------ [2005-10-27 04:59:20] david at tulloh dot id dot au Repeated with --enable-debug Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1210001728 (LWP 23835)] 0xb7c07840 in ?? () (gdb) bt #0 0xb7c07840 in ?? () #1 0x080e5ce0 in tsrm_shutdown () at php-cvs-5.1/TSRM/TSRM.c:180 #2 0x081a82f4 in main (argc=3, argv=0xbffffb54) at php-cvs-5.1/sapi/cli/php_cli.c:1155 http://tulloh.id.au/php/bugs/34725/fail.debug.valgrind ------------------------------------------------------------------------ [2005-10-26 11:08:19] [EMAIL PROTECTED] What if you ,/configure PHP with --enable-debug ? Are you still able to replicate it? If yes, please generate gdb backtrace using debug build and repeat with valgrind too. ------------------------------------------------------------------------ [2005-10-26 11:03:28] david at tulloh dot id dot au I finished the valgrind run, I've hosted the log files as they were a little bigish. http://tulloh.id.au/php/bugs/34725/pass.valgrind http://tulloh.id.au/php/bugs/34725/fail.valgrind Some related files (config & test file) are also in the directory. ------------------------------------------------------------------------ [2005-10-17 12:33:30] [EMAIL PROTECTED] Use valgrind to get some more info about it. ------------------------------------------------------------------------ [2005-10-17 10:13:05] david at tulloh dot id dot au I managed to track this down to a much more specific test case. The following configure line is the smallest reproducable test case I could find. ./configure \ '--disable-all' \ '--enable-cli' \ '--disable-cgi' \ '--with-apxs2=/usr/bin/apxs2' \ '--with-pcre-regex=shared,/usr' Removing the apxs2 line, or making the pcre extension non-shared hides the fault, it's also not visible if the pcre extension isn't loaded. The tests were done with the latest CVS version, 5.1 branch. apache2-mpm-prefork (debian stable) - 2.0.54 libpcre3 - 5.0 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34725 -- Edit this bug report at http://bugs.php.net/?id=34725&edit=1