ID:               28296
 Comment by:       falcon at kaktos dot co dot il
 Reported By:      noam at kaktos dot co dot il
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: GNU/Linux 2.6.5
 PHP Version:      4.3.6
 New Comment:

uhmm? anyone?


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

[2004-05-06 13:44:11] noam at kaktos dot co dot il

Description:
------------
We use Apache2 with Worker MPM here.
PHP's children die all the time:
[Thu May 06 14:39:24 2004] [notice] child pid 30028 exit signal
Segmentation fault (11)
[Thu May 06 14:39:27 2004] [notice] child pid 30094 exit signal
Segmentation fault (11)
[Thu May 06 14:39:29 2004] [notice] child pid 30158 exit signal
Segmentation fault (11)
[Thu May 06 14:39:31 2004] [notice] child pid 30222 exit signal
Segmentation fault (11)
[Thu May 06 14:39:33 2004] [notice] child pid 30286 exit signal
Segmentation fault (11)
etc.

My configure line:
'./configure' '--with-pear' '--enable-experimental-zts' '--with-mysql'
'--with-mysql-socket=/tmp/mysql.sock' '--disable-ipv6'
'--enable-safe-mode' '--with-apxs2=/usr/local/apache/bin/apxs'
'--with-imap=/usr/local/imap-2002e' '--with-gettext' '--with-xml'
'--with-dom' '--with-zlib-dir=/usr'

Nothing unique here.

The diff between php.ini-dist and my php.ini below:
http://www.kaktos.co.il/~noam/php.ini-diff

I backtraced using your guidelines and it all leaded to
php's _db_return_ function in the mysql extension.

The code involved:
#ifndef THREAD
    if (state->framep != NULL)
      state->framep = (char **) *state->framep;
#endif

I concluded that PHP scripts who use MySQL, crash.
I tried to figure out the code, I couldn't. Strangely enough, if I
commented it out every worked charmly.

I hope I helped --noam

P.S.: I've also tried the CVS version: php4-STABLE-200405061030,
with same results.

Thank you for your patience and this fine product!

Actual result:
--------------
[New Thread 966716 (LWP 7860)]
[New Thread 983101 (LWP 7861)]
[New Thread 999486 (LWP 7862)]
[New Thread 1015871 (LWP 7863)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 213006 (LWP 7814)]
_db_return_ (_line_=1565, _sfunc_=0x1d3fc, _sfile_=0x1d3fc,
_slevel_=0xbdff0214)
    at /home/noam/workspace/25/php-4.3.6/ext/mysql/libmysql/dbug.c:826
826           state->framep = (char **) *state->framep;
(gdb) bt
#0  _db_return_ (_line_=1565, _sfunc_=0x1d3fc, _sfile_=0x1d3fc,
_slevel_=0xbdff0214)
    at /home/noam/workspace/25/php-4.3.6/ext/mysql/libmysql/dbug.c:826
#1  0x403bb7f6 in mysql_real_connect (mysql=0x975d814, host=0x404f7ad2
"localhost",
    user=0x975b9c4 "USER_CENSORDED", passwd=0x975cb24 "PASS_CENSORDED",
db=0x0, port=0,
    unix_socket=0x404f7034 "/tmp/mysql.sock", client_flag=8197)
    at
/home/noam/workspace/25/php-4.3.6/ext/mysql/libmysql/libmysql.c:1565
#2  0x403b3f58 in php_mysql_do_connect (ht=158717972,
return_value=0x975b57c, this_ptr=0x0,
    return_value_used=1, tsrm_ls=0x8815308, persistent=0)
    at /home/noam/workspace/25/php-4.3.6/ext/mysql/php_mysql.c:776
#3  0x403b50b1 in zif_mysql_connect (ht=3, return_value=0x975b57c,
this_ptr=0x0,
    return_value_used=1, tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/ext/mysql/php_mysql.c:827
#4  0x40496173 in execute (op_array=0x9767f84, tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/Zend/zend_execute.c:1635
#5  0x40495ed4 in execute (op_array=0x974b714, tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/Zend/zend_execute.c:1679
#6  0x4049784b in execute (op_array=0x9751234, tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/Zend/zend_execute.c:2200
#7  0x4049784b in execute (op_array=0x959ed64, tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/Zend/zend_execute.c:2200
#8  0x4048769e in zend_execute_scripts (type=8, tsrm_ls=0x8815308,
retval=0x0, file_count=3)
    at /home/noam/workspace/25/php-4.3.6/Zend/zend.c:886
#9  0x4045a052 in php_execute_script (primary_file=0xbdfff86c,
tsrm_ls=0x8815308)
    at /home/noam/workspace/25/php-4.3.6/main/main.c:1731
#10 0x4049b7a0 in php_handler (r=0x8383508)
    at
/home/noam/workspace/25/php-4.3.6/sapi/apache2handler/sapi_apache2.c:561
#11 0x08083b46 in ap_run_handler (r=0x8383508) at config.c:152
#12 0x08084118 in ap_invoke_handler (r=0x8383508) at config.c:358
#13 0x0806fc3b in ap_process_request (r=0x8383508) at
http_request.c:246
#14 0x0806b7e9 in ap_process_http_connection (c=0x8237590) at
http_core.c:250
#15 0x0808dd06 in ap_run_process_connection (c=0x8237590) at
connection.c:42
#16 0x080808ad in process_socket (p=0x8237468, sock=0x82374a0,
my_child_num=-1107361260,
    my_thread_num=-1107361260, bucket_alloc=0x82b9290) at worker.c:530
#17 0x08080f7d in worker_thread (thd=0x8127ee0, dummy=0x1d3fc) at
worker.c:844
#18 0x40137331 in dummy_worker (opaque=0x1d3fc) at thread.c:88
#19 0x401bfca3 in pthread_start_thread () from /lib/libpthread.so.0
#20 0x401bfd1f in pthread_start_thread_event () from
/lib/libpthread.so.0
(gdb)


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


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

Reply via email to