ID:               50382
 Updated by:       srina...@php.net
 Reported By:      dirk at bean-it dot nl
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Debian 5.0
 PHP Version:      5.3.1
 New Comment:


from the bt, I guess, there is memory corruption within Zend engine.

if you are able to reproduce this crash by running a modified version
of 
your script from the command line, then , to help us more understand
the 
problem, will it be possible for you to run it with valgrind --num-
callers=15 --error-limit=no  ./sapi/cli/php <test-script>

alternatively, if you export USE_ZEND_ALLOC=0 in your apachectl script,

your server might run successfully albeit at decreased performance. 

thanks for your help




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

[2009-12-04 12:56:47] dirk at bean-it dot nl

Up till now, I haven't been able to exactly pinpoint the problem. As
mentioned below, our application works as expected, it looks likes
Apache crashes -after- php has compiled the page. Very strange. The
application is quite large, a lot of code. Tried to debug with Zend
Debugger, but than things work as expected, no segfault.

As much as I would like to give some example code, I cannot at this
moment, since I have no clue where things go wrong (the app works
fine!). 

Any suggestions on how to proceed are highly appreciated.

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

[2009-12-04 12:39:33] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



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

[2009-12-04 12:25:42] dirk at bean-it dot nl

I've compiled the snapshot, gives the same segfaults.

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

[2009-12-04 12:11:54] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2009-12-04 11:08:43] dirk at bean-it dot nl

Description:
------------
Upgrading to php 5.3 > Application works but apache segfaults

I've upgraded from 5.2.11 to 5.3.1. Our application works fine when
accessed from a browser, however the apache error log fills with
messages like:

[Fri Dec 04 11:24:59 2009] [notice] child pid 28025 exit signal
Segmentation fault (11)

Each request causes a message like this.

This is not happening when using 5.2.11. I've tried to locate the
problem by stepping through the code with the Zend debugger.
Unfortunately, the problem does not occur when doing this.

I've followed the instructions and created a backtrace (see below). The
weird thing is, PHP compiled with --enable-debug, does not crash. I does
give tons of "Memory leak" messages in the apache error.log. I'm not
very in to this, so I hope this information gives somebody a clue.

I've also tried a snapshot (5.3-200912040930), this doesn't work
either, same segfaults.

I'm more than happy to provide more info, test things, change things...
Just let me know.

./configure options (I cannot reduce this set, the application will
stop working)

'./configure' \
'--with-config-file-path=/etc' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-gettext' \
'--with-libxml-dir=/usr/local' \
'--with-mysqli=/usr/bin/mysql_config' \
'--with-mcrypt' \
'--with-iconv' \
'--enable-mbstring' \
'--with-zlib=/usr' \
'--with-xsl' \
'--with-curl' \
'--with-gd' \
'--with-jpeg-dir=/usr/include' \
'--with-png-dir=/usr/include' \
'--with-openssl' \
'--with-freetype-dir' \
'--enable-gd-native-ttf' \
"$@"

Actual result:
--------------
Backtrace (created running the snapshot, without debug):

(gdb) bt
#0  0xb6e63777 in zval_mark_grey (pz=0x9fd0cf8) at
/root/php5.3-200912040930/Zend/zend_gc.c:360
#1  0xb6e63d35 in gc_collect_cycles () at
/root/php5.3-200912040930/Zend/zend_gc.c:417
#2  0xb6e48285 in zend_deactivate () at
/root/php5.3-200912040930/Zend/zend.c:900
#3  0xb6df767f in php_request_shutdown (dummy=0x0) at
/root/php5.3-200912040930/main/main.c:1606
#4  0xb6ec8aa9 in php_handler (r=0x9bc31d0) at
/root/php5.3-200912040930/sapi/apache2handler/sapi_apache2.c:493
#5  0x0807a1c9 in ap_run_handler ()
#6  0x0807d5e1 in ap_invoke_handler ()
#7  0x0808af00 in ap_internal_redirect ()
#8  0xb73356c3 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#9  0x09bc31a0 in ?? ()
#10 0x09bb8d38 in ?? ()
#11 0xb7339bb7 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#12 0x09bc3138 in ?? ()
#13 0x00000000 in ?? ()



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


-- 
Edit this bug report at http://bugs.php.net/?id=50382&edit=1

Reply via email to