From:             a dot sanders at manchester dot ac dot uk
Operating system: Solaris 9
PHP version:      5.2.6
PHP Bug Type:     *Compile Issues
Bug description:  make test & make install failure

Description:
------------
'make test' fails immediately with a segmentation fault. Re-compiling
with compiler flag DEBUG_ZEND=2 allows 'make test' to get to test
4399 before spawning several thousand php-cgi children and consuming all 
the system memory.


Actual result:
--------------
Initial configure command was:

    env LDFLAGS="-R/copac/gcc-4/lib" ./configure --prefix=~/apache-
2_2/ --with-mysql=/home/copacw/mysql5/mysql --with-libxml-
dir=/home/copacw/apache-2_2

A 'make test' from the above results in this:

 huntly copacw/php-5.2.6 $ make test
 Build complete.
 Don't forget to run 'make test'.
 Segmentation Fault - core dumped 
 make: [test] Error 139 (ignored)

A backtrace of the core file from the above:

 #0  0x00220130 in _zval_ptr_dtor (zval_ptr=0x39d8a8)
     at /home/copacw/php-5.2.6/Zend?/zend_execute_API.c:412 
 412             (*zval_ptr)->refcount--;
 (gdb) list
 407     ZEND_API void _zval_ptr_dtor(zval **zval_ptr 
ZEND_FILE_LINE_DC)
 408     {
 409     #if DEBUG_ZEND>=2
 410             printf("Reducing refcount for %x (%x):  %d->%d\n", 
*zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)-
>refcount-1);
 411     #endif
 412             (*zval_ptr)->refcount--;
 413             if ((*zval_ptr)->refcount==0) {
 414                     zval_dtor(*zval_ptr);
 415                     safe_free_zval_ptr_rel(*zval_ptr 
ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC);
 416             } else if ((*zval_ptr)->refcount == 1) {
 (gdb) print *zval_ptr
 $1 = (zval *) 0x1

I reconfigured by adding CFLAGS="-DDEBUG_ZEND=2" to the start of the 
configure command, did a 'make clean', then 'make', then 
'make test'.
This time the 'make test' gets to test 4399 and then fails as below:

 ....
 PASS XMLWriter: libxml2 XML Writer DTD Element & Attlist 
[ext/xmlwriter/tests/OO_008.phpt] 
 PASS XMLWriter: PI, Comment, CDATA [ext/xmlwriter/tests/OO_009.phpt] 
 PASS Bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag, 
not enity) [ext/xmlwriter/tests/bug39504.phpt] 
 PASS Bug #41287 (Namespace functions don't allow xmlns defintion to 
be optional) [ext/xmlwriter/tests/bug41287.phpt] 
 PASS Bug #41287 (Writing empty tags with Xmlwriter::WriteElement?
[ns]) [ext/xmlwriter/tests/bug41326.phpt] 
 TEST 4399/4426 [sapi/cgi/tests/001.phpt]

Test 4399 spawned over 4400 php-cgi child processes (on a previous run 
when I left it
to its own devices it kept going until it had consumed all the system 
memory and swap.)

A ps of the process it created is as follows:

 $ ps -ef | grep php-cgi        
   copacw    40    37  0 12:22:05 pts/3    0:00 sh -c 
/home/copacw/php-5.2.6/sapi/cgi/php-cgi -n -v
   copacw 29989 29988  0 12:22:03 pts/3    0:00 /home/copacw/php-
5.2.6/sapi/cgi/php-cgi -n -v
   copacw  1721  1720  0 12:23:07 pts/3    0:00 /home/copacw/php-
5.2.6/sapi/cgi/php-cgi -n -v
   ...

I also tried 'make install'. The first compile WITHOUT the DEBUG_ZEND 
flag failed
on a 'make install' with a segmentation fault. The compile WITH the 
flag successfully
performed the 'make install'.


-- 
Edit bug report at http://bugs.php.net/?id=45761&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45761&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45761&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45761&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45761&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45761&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45761&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45761&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45761&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45761&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45761&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45761&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45761&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45761&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45761&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45761&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45761&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45761&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45761&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45761&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45761&r=mysqlcfg

Reply via email to