ID: 40479 Comment by: john dot glazebrook at guava dot co dot uk Reported By: rrossi at maggioli dot it Status: Feedback Bug Type: Reproducible crash Operating System: Suse Linux 9.0 PHP Version: 5.2.1 New Comment:
#0 0x064a8ba6 in zend_if_strlen (ht=1, return_value=0xb7944458, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_builtin_functions.c:286 #1 0x064b8821 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0af40) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:200 #2 0x064b7fcd in execute (op_array=0xb78f4044) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #3 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b3e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #4 0x064b7fcd in execute (op_array=0xb78ffa88) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #5 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b530) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #6 0x064b7fcd in execute (op_array=0xb78efb98) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #7 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b760) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #8 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #9 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b8e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #10 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #11 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bb10) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #12 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #13 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bc90) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #14 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #15 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bec0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #16 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #17 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c040) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #18 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #19 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c4f0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #20 0x064b7fcd in execute (op_array=0xb78e7810) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #21 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c680) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #22 0x064b7fcd in execute (op_array=0xb790b140) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #23 0x064ce857 in ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER (execute_data=0xbff0c7d0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:7759 #24 0x064b7fcd in execute (op_array=0xb7b5bb40) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #25 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c9a0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #26 0x064b7fcd in execute (op_array=0xb7adbdfc) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #27 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0cbb0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #28 0x064b7fcd in execute (op_array=0xb7b51040) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #29 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0cd40) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #30 0x064b7fcd in execute (op_array=0xb7b54314) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #31 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0ce80) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #32 0x064b7fcd in execute (op_array=0xb7b54b94) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #33 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0d010) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #34 0x064b7fcd in execute (op_array=0xb7cfe260) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #35 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0d340) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #36 0x064b7fcd in execute (op_array=0xb7a861b8) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #37 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0da80) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #38 0x064b7fcd in execute (op_array=0xb7b6960c) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #39 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0e7b0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #40 0x064b7fcd in execute (op_array=0xb7d19f04) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #41 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0eb10) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #42 0x064b7fcd in execute (op_array=0xb7cf9f50) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #43 0x0649e8a9 in zend_execute_scripts (type=8, retval=0xd, file_count=3) at /home/admin/downloads/php-5.2.6/Zend/zend.c:1134 #44 0x06466b01 in php_execute_script (primary_file=0xbff10dd0) at /home/admin/downloads/php-5.2.6/main/main.c:2005 #45 0x0651a3a4 in php_handler (r=0x9714788) at /home/admin/downloads/php-5.2.6/sapi/apache2handler/sapi_apache2.c:629 #46 0x00e1c9d7 in ap_run_handler () from /usr/sbin/httpd #47 0x00e1ce43 in ap_invoke_handler () from /usr/sbin/httpd #48 0x00e194f8 in ap_internal_redirect () from /usr/sbin/httpd #49 0x002e8487 in ?? () from /etc/httpd/modules/mod_rewrite.so #50 0x09714778 in ?? () #51 0x0970bdb8 in ?? () #52 0x00000000 in ?? () ######################################################## #0 0x064a8ba6 in zend_if_strlen (ht=1, return_value=0xb7944458, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_builtin_functions.c:286 286 RETVAL_LONG(Z_STRLEN_PP(str)); ######################################################## (gdb) frame 2 #2 0x064b7fcd in execute (op_array=0xb78f4044) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 92 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) { (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x661c2a3 "strlen" (gdb) frame 3 #3 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b3e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 234 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $2 = 0x661c2a3 "strlen" (gdb) frame 4 #4 0x064b7fcd in execute (op_array=0xb78ffa88) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 92 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) { (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $3 = 0x661c2a3 "strlen" (gdb) frame 5 #5 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b530) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 234 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $4 = 0x661c2a3 "strlen" (gdb) frame 6 #6 0x064b7fcd in execute (op_array=0xb78efb98) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 92 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) { (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $5 = 0x661c2a3 "strlen" (gdb) frame 7 #7 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b760) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 234 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $6 = 0x661c2a3 "strlen" (gdb) frame 8 #8 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 92 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) { (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $7 = 0x661c2a3 "strlen" (gdb) frame 9 #9 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b8e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 234 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $8 = 0x661c2a3 "strlen" ######################################################## PLEASE email me for more info if you want it, I am ***NOT*** actively watching this thread (can I RSS it??) John Previous Comments: ------------------------------------------------------------------------ [2008-10-05 21:36:15] [EMAIL PROTECTED] Thanks for the backtrace. It seems you are using a third party extension, could you please provide a backtrace with all third-party extensions disabled ? ------------------------------------------------------------------------ [2008-09-30 09:48:56] john dot glazebrook at guava dot co dot uk Um, one more thing. As a programmer of 10+ years having programmed about 7 or 8 languages seriously over that time, this feels like a race condition. Occasionally the page request works. Putting in sleep commands effects where in the script it crashes. Attaching the debugger and slowly stepping through the code causes it not to crash. John ------------------------------------------------------------------------ [2008-09-30 09:33:54] john dot glazebrook at guava dot co dot uk Here I am following the instructions on: http://bugs.php.net/bugs-generating-backtrace.php (gdb) frame 1 #1 0x01209ee9 in execute_internal (execute_data_ptr=0xbff61270, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_execute.c:1373 1373 ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, execute_data_ptr->function_state.function->common.return_reference?return_value_ptr:NULL, execute_data_ptr->object, return_value_used TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x136e2a3 "strlen" I have a copy of this core dump, if you want it email me :-) My previous comments tell my story... john ------------------------------------------------------------------------ [2008-09-30 09:25:50] john dot glazebrook at guava dot co dot uk OK, it took me a couple of days to figure out how to do a core debug, but here is the offending gdb info: #0 0x011faba6 in zend_if_strlen (ht=1, return_value=0xb77ef1ec, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_builtin_functions.c:286 286 RETVAL_LONG(Z_STRLEN_PP(str)); (gdb) bt #0 0x011faba6 in zend_if_strlen (ht=1, return_value=0xb77ef1ec, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_builtin_functions.c:286 #1 0x01209ee9 in execute_internal (execute_data_ptr=0xbff61270, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_execute.c:1373 #2 0x005e31b0 in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #3 0x0120a990 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff61270) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:202 #4 0x01209fcd in execute (op_array=0xb77a99b4) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #5 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #6 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff61730) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #7 0x01209fcd in execute (op_array=0xb77b07e8) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #8 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #9 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff618a0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #10 0x01209fcd in execute (op_array=0xb77bc560) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #11 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #12 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff61af0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #13 0x01209fcd in execute (op_array=0xb77da2dc) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #14 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #15 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff61c90) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #16 0x01209fcd in execute (op_array=0xb77da62c) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #17 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #18 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff61ee0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #19 0x01209fcd in execute (op_array=0xb77da2dc) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #20 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #21 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff62080) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #22 0x01209fcd in execute (op_array=0xb77da62c) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #23 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #24 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff622d0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #25 0x01209fcd in execute (op_array=0xb77da2dc) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #26 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #27 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff62470) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #28 0x01209fcd in execute (op_array=0xb77da62c) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #29 0x005e312d in php_DBG_init_globals () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x #30 0x0120a219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff62940) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #31 0x01209fcd in execute (op_array=0xb779aa6c) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 ------------------------------------------------------------------------ [2008-09-29 13:34:44] john dot glazebrook at gauva dot co dot uk > For me it looks like a hardware problem (dead memory segments), please > use a memory testing tool (e.g. memtest86 [1]) or try to reproduce the > bug on an other computer. Dead memory segments can cause exactly that > sort of problems (corrupted memory, crashes, etc). (See my previous messages posted above...) I just tried my code on a brand new HP server, this time on CentOS 5.2, PHP 5.2.0, MySQLI 5.0.45. I still get seg faults in httpd error logs files. So I don't see how this is a hardware fault. I see this error using the same PHP code on 3 different servers, 2 different operating systems and 2 different MySQL versions. I also changed my tables from MyISAM to InnoDB and *STILL* get seg faults. I use Zend Framework and I have changed DB adapters from Mysqli to PDO_MYSQL, but both cause seg faults. Does that cover everything apart from the PHP version? monk.e.boy ------------------------------------------------------------------------ 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/40479 -- Edit this bug report at http://bugs.php.net/?id=40479&edit=1