From:             [EMAIL PROTECTED]
Operating system: Linux PPC (yellow dog 1.2)
PHP version:      4.0.4pl1
PHP Bug Type:     Reproduceable crash
Bug description:  reproducable seg fault during generic script exec with pgsql and 


I've managed to uncover a reproducable segmentation fault that occurs during execution 
of a script containing a loop of pgsql mcrypt calls.  As best as I can tell mcrypt 
doesn't appear to by the cuplrit as removing the mcrypt calls doesn't prent the 
segfault (although it does seem to change the time/position) when the crash happens.  
Commententing out the Db queries (implemented using PEAR DB) does prevent the crash, 
however, on several occausions I managed to get the script to crash after my code had 
completed and the send buffer had been flushed (only record of a fault was in the 
error log), so I'm  doubtful that the error is in the db code per se. 

Running gdb seems to show that memory is courupt before the script is run the first 
time (after researting apache) as can be seen in the trace below (this first memory 
error is exposed when executing any other script after an apache restart).  Once the 
script runs for a while (it contains a rather expensive loop of db calls) it fails 
with the seg fault.

I've already rebuilt postgres, libmcrypt and php, to no avail...

Any ideas would be most appricated!


build flags:

'./configure' '--prefix=/etc/php' '--with-apxs=/etc/apache/bin/apxs' '--with-mysql' 
'--with-pgsql' '--with-mcrypt'

gdb session:

This GDB was configured as "ppc-yellowdog-linux"...
(gdb) run -X
Starting program: /etc/apache/bin/httpd -X
Cannot access memory at address 0x34623731.
(gdb) bt
#0  _dl_debug_state () at dl-debug.c:56
#1  0xfea2044 in dl_open_worker (a=0x30026c70) at dl-open.c:195
#2  0xfea21f8 in _dl_open (file=0xfea1d44 "\224!|\b\002\222a", mode=1948280425, 
    caller=0x7fffbdf8) at dl-open.c:232
#3  0xfede368 in dlopen_doit (a=0x7fffc018) at dlopen.c:41
#4  0x3000c078 in _dl_catch_error (errstring=0xfeef630, operate=0xfede314 
    args=0x7fffc018) at dl-error.c:141
#5  0xfedeb04 in _dlerror_run (operate=0xfede314 <dlopen_doit>, args=0x7fffc018)
    at dlerror.c:125
#6  0xfede3c4 in __dlopen_check (file=0x30026c70 "", mode=250742837) at dlopen.c:53
#7  0xf0053a0 in ?? () from /usr/lib/
#8  0x0 in ?? ()
(gdb) cont

Program received signal SIGSEGV, Segmentation fault.
0xf0e2c5c in ?? () from /etc/apache/libexec/
(gdb) bt
#0  0xf0e2c5c in ?? () from /etc/apache/libexec/
#1  0x0 in ?? ()
(gdb) Quit

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to