ID: 45761 Updated by: [EMAIL PROTECTED] Reported By: a dot sanders at manchester dot ac dot uk -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Solaris 9 PHP Version: 5.2CVS-2008-08-11 Assigned To: fb-req-jani New Comment:
This should work: # USE_ZEND_ALLOC=0 TEST_PHP_EXECUTABLE=/full/path/to/php \ gdb --arg /full/path/to/php -n /full/path/to/php \ run-tests.php -n /full/path/to/php/src/ Previous Comments: ------------------------------------------------------------------------ [2008-08-12 15:13:20] a dot sanders at manchester dot ac dot uk When I compiled with ./configure --disable-all --enable-debug --with-pcre-regex I can do a make test and it gets to the same place as before (the cgi test) without core dumping. I then have to kill it before it consumes the system memory. You told me to run gdb as follows: USE_ZEND_ALLOC=0 gdb sapi/cli/php -n run-tests.php gdb wont accept such a command line, so I entered run -n run-tests.php from the gdb prompt and I then get the message: Starting program: /home/copacw/php5.2-200808110830/sapi/cli/php -n run-tests.php ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! Program exited with code 01. I've tried setting a TEST_PHP_EXECUTABLE environment variable to point to the php executable, but I still get the same message. ------------------------------------------------------------------------ [2008-08-12 14:32:08] [EMAIL PROTECTED] Add the output of '(gdb) bt' here of the crash. Compile using this configure line: # ./configure --disable-all --enable-debug Also, when you generate the backtrace, make sure you're not loading any php.ini file using the '-n' parameter. f.e. # USE_ZEND_ALLOC=0 gdb sapi/cli/php -n run-tests.php ------------------------------------------------------------------------ [2008-08-11 09:45:59] a dot sanders at manchester dot ac dot uk I downloaded the latest this morning and did ./configure --disable-all make test I compiles okay and then still seg faults when it gets to the test part of make test: ... Build complete. Don't forget to run 'make test'. Segmentation Fault - core dumped make: [test] Error 139 (ignored) Same stuff as before from gdb: #0 0x0010003c in _zval_ptr_dtor (zval_ptr=0x23f1e0) at /home/copacw/php5.2-200808110830/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--; (gdb) print *zval_ptr $1 = (zval *) 0x1 (gdb) I recompiled again with the DEBUG_ZEND=2 flag and got the following result: Build complete. Don't forget to run 'make test'. +-----------------------------------------------------------+ | ! ERROR ! | | The test-suite requires that you have pcre extension | | enabled. To enable this extension either compile your PHP | | with --with-pcre-regex or if you've compiled pcre as a | | shared module load it via php.ini. | +-----------------------------------------------------------+ So reconfigured and recompiled again with --disbale-all --with-pcre_regex. This time it compiled and got to test 3519 when it again tried to spawn thousands of child processes. It was in danger of consuming all available memory, so I killed it at that point. TEST 3519/3546 [sapi/cgi/tests/001.phpt] ------------------------------------------------------------------------ [2008-08-08 18:12:01] [EMAIL PROTECTED] s/options/patches/ :) ------------------------------------------------------------------------ [2008-08-08 18:11:35] [EMAIL PROTECTED] Get this: http://snaps.php.net/php5.2-latest.tar.gz And do not apply any 3rd party options. And do (exactly) this: # ./configure --disable-all && make test ------------------------------------------------------------------------ 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/45761 -- Edit this bug report at http://bugs.php.net/?id=45761&edit=1