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:

Almost there. :) You tried to execute the php binary as a script, leave
that sapi/cli/php out of the last path, it's supposed to be the s.c.
top_srcdir. This should be correct for you:

# USE_ZEND_ALLOC=0 \
TEST_PHP_EXECUTABLE=/home/copacw/php5.2-200808110830/sapi/cli/php \
gdb --arg /home/copacw/php5.2-200808110830/sapi/cli/php -n \
run-tests.php -n /home/copacw/php5.2-200808110110830/

(gdb) run
<possible segfault>
(gdb) bt

Start copying the output of "bt" command from the line after the "run"
command which has the line with the crash info.


Previous Comments:
------------------------------------------------------------------------

[2008-08-13 09:10:27] a dot sanders at manchester dot ac dot uk

Output from gdb as follows. Is this what you were expecting? It
doesn't crash out, so there's no backtrace.

(gdb) run
Starting program: /home/copacw/php5.2-200808110830/sapi/cli/php -n
/home/copacw/php5.2-200808110830/sapi/cli/php run-tests.php -n
/home/copacw/php5.2-200808110830/sapi/cli/php

Warning: Unexpected character in input:  '' (ASCII=16) state=1 in
/home/copacw/php5.2-200808110830/sapi/cli/php on line 3309

Parse error: syntax error, unexpected T_STRING in
/home/copacw/php5.2-200808110830/sapi/cli/php on line 3309

Program exited with code 0377.

------------------------------------------------------------------------

[2008-08-12 15:37:12] [EMAIL PROTECTED]

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/




------------------------------------------------------------------------

[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]

------------------------------------------------------------------------

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

Reply via email to