ID: 47724 Comment by: scott at danielfamily dot com Reported By: scott at danielfamily dot com Status: Feedback Bug Type: Reproducible crash Operating System: Centos 5.2 PHP Version: 5.2.9 New Comment:
I believe very strongly that this is a bug in PHP, not in doctrine or symfony. Modifying seemingly random and benign pieces of code, changing the order of code, or collapsing classes usually results in the problem disappearing. This makes it impossible to comply with your request for a simple script. This is VERY likely to be a corrupt heap situation that only manifests itself when the planets are aligned correctly. I have gotten those planets to align consistently and the crash always happens. I'm willing to do anything reasonable to get someone to look at this problem. Building the VMWARE appliance seemed like the best approach as it will allow someone familiar with the internals of PHP to download the appliance and duplicate the problem in minutes. I've already posted this on the symfony forums and gotten sympathy, but no substitive suggestions. I'll try posting it as a symfony bug and see what happens. Previous Comments: ------------------------------------------------------------------------ [2009-03-22 18:00:09] paj...@php.net If you are not able to create a self contained script to reproduce the problem, report the bug to symfony or doctrine developers and ask them to analyze it. We can't use these tools as a base to debug this issue. Thanks for your understanding. ------------------------------------------------------------------------ [2009-03-22 17:38:55] scott at danielfamily dot com I understand and appreciate the purpose of the canned response, but please reread my original bug submission. What you are asking for is impossible. Duplication of the problem REQUIRES a very complex sequence of PHP code. If I change a single line of PHP code, the problem is likely to disappear. Please take me up on my offer to transfer the VMWARE appliance that clearly and consistently duplicates the problem. ------------------------------------------------------------------------ [2009-03-21 23:03:13] 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-03-20 02:29:47] scott at danielfamily dot com Description: ------------ Sorry for the longer than asked for initial post, but I've spent many many hours profiling this problem to make this bug report. Our project uses symfony framework with the doctrine database abstraction. We have had a number of crash sequences that are VERY hard to simplify and usually crash intermittently. I have isolated an instance that always crashes on our linux systems and usually crashes under windows. If I change the order of code or add code, the problem may disappear temporarily only to resurface later after additional code modification have been made. I've done this several times, but have no confidence in deploying this kind of fix in a final released product. After many many hours, I've built a vmware appliance with Centos 5.2 and the LAMP stack installed. It was built using the latest Apache and PHP source. It is built using the enable-debug switch and I've gotten a stack trace (included below). Running the vmware appliance and hitting a single url running from it's server causes the error every time. If someone is assigned to this problem and communicates with me, I can send them the vmware appliance to run under windows. It is already setup with the software stack to reproduce and debug the problem. It should save many hours of configuration (at least it would for me). I believe that it is very possible this related to Bug #40479. Unfortunately, I have some experience with this problem with another project and believe it is a very serious unresolved issue. Actual result: -------------- [r...@localhost bin]# gdb /usr/local/apache2/bin/httpd GNU gdb Red Hat Linux (6.5-37.el5_2.2rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X [Thread debugging using libthread_db enabled] [New Thread -1208129792 (LWP 22085)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208129792 (LWP 22085)] 0x01146ab9 in zend_if_strlen (ht=1, return_value=0xa682b40, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /root/Desktop/php-5.2.9/Zend/zend_builtin_functions.c:286 286 RETVAL_LONG(Z_STRLEN_PP(str)); (gdb) bt #0 0x01146ab9 in zend_if_strlen (ht=1, return_value=0xa682b40, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /root/Desktop/php-5.2.9/Zend/zend_builtin_functions.c:286 #1 0x0115cc34 in zend_do_fcall_common_helper_SPEC (execute_data=0xbf826c24) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:200 #2 0x01162706 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbf826c24) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:1729 #3 0x0115c795 in execute (op_array=0xa6715f8) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #4 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf826de4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #5 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf826de4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #6 0x0115c795 in execute (op_array=0xb7d92f88) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #7 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf8270b4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #8 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf8270b4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #9 0x0115c795 in execute (op_array=0xa47e408) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #10 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf827434) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #11 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf827434) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #12 0x0115c795 in execute (op_array=0xb7d8bd58) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #13 0x0119df6a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xbf827734) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:20117 #14 0x0115c795 in execute (op_array=0xb7d7d784) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #15 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf827e64) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #16 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf827e64) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #17 0x0115c795 in execute (op_array=0xb7d69dc0) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #18 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf828274) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #19 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf828274) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #20 0x0115c795 in execute (op_array=0xa403ce0) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #21 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf8283e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #22 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf8283e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #23 0x0115c795 in execute (op_array=0xa403c18) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #24 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf8285e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #25 0x01162706 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbf8285e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:1729 #26 0x0115c795 in execute (op_array=0xb7d76d80) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #27 0x0119df6a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xbf8288e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:20117 #28 0x0115c795 in execute (op_array=0xb7d7d784) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #29 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf829014) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #30 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf829014) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #31 0x0115c795 in execute (op_array=0xb7d69dc0) ---Type <return> to continue, or q <return> to quit--- at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #32 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf829424) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #33 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf829424) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #34 0x0115c795 in execute (op_array=0xa403ce0) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #35 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf829594) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #36 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf829594) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #37 0x0115c795 in execute (op_array=0xa403c18) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #38 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf8297d4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #39 0x01162706 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbf8297d4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:1729 #40 0x0115c795 in execute (op_array=0xb7d678ac) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #41 0x0119df6a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xbf829ad4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:20117 #42 0x0115c795 in execute (op_array=0xa618b40) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #43 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82a104) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #44 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82a104) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #45 0x0115c795 in execute (op_array=0xa61ad54) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #46 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82a574) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #47 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82a574) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #48 0x0115c795 in execute (op_array=0xa446d64) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #49 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82a854) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #50 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82a854) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #51 0x0115c795 in execute (op_array=0xa446180) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #52 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82ad34) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #53 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82ad34) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #54 0x0115c795 in execute (op_array=0xa438670) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #55 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82b0d4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #56 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82b0d4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #57 0x0115c795 in execute (op_array=0xa430580) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #58 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82b544) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #59 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82b544) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #60 0x0115c795 in execute (op_array=0xa43887c) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #61 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82b8e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #62 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82b8e4) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #63 0x0115c795 in execute (op_array=0xa430580) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #64 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82bb74) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #65 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82bb74) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 ---Type <return> to continue, or q <return> to quit--- #66 0x0115c795 in execute (op_array=0xa43fb28) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #67 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82bf14) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #68 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82bf14) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #69 0x0115c795 in execute (op_array=0xa430580) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #70 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82cb94) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #71 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82cb94) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #72 0x0115c795 in execute (op_array=0x9f388e0) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #73 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82cf74) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #74 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82cf74) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #75 0x0115c795 in execute (op_array=0x9f27344) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #76 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82d104) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #77 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82d104) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #78 0x0115c795 in execute (op_array=0x9e0b748) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #79 0x0115cdae in zend_do_fcall_common_helper_SPEC (execute_data=0xbf82d324) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:234 #80 0x0115d888 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbf82d324) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:322 #81 0x0115c795 in execute (op_array=0x9c5989c) at /root/Desktop/php-5.2.9/Zend/zend_vm_execute.h:92 #82 0x011375d7 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/Desktop/php-5.2.9/Zend/zend.c:1134 #83 0x010e4bb6 in php_execute_script (primary_file=0xbf82f664) at /root/Desktop/php-5.2.9/main/main.c:2023 #84 0x011b4619 in php_handler (r=0x9c90fe0) at /root/Desktop/php-5.2.9/sapi/apache2handler/sapi_apache2.c:632 #85 0x08076b89 in ap_run_handler (r=0x9c90fe0) at config.c:157 #86 0x08079cf7 in ap_invoke_handler (r=0x9c90fe0) at config.c:372 #87 0x08090998 in ap_process_request (r=0x9c90fe0) at http_request.c:282 #88 0x0808dbab in ap_process_http_connection (c=0x9c8ce20) at http_core.c:190 #89 0x0807dbd9 in ap_run_process_connection (c=0x9c8ce20) at connection.c:43 #90 0x080a4035 in child_main (child_num_arg=<value optimized out>) at prefork.c:650 #91 0x080a4263 in make_child (s=0x9ab1ce0, slot=0) at prefork.c:690 #92 0x080a503c in ap_mpm_run (_pconf=0x9aad0a8, plog=0x9aeb1a0, s=0x9ab1ce0) at prefork.c:966 #93 0x08064695 in main (argc=162181280, argv=0x9c8ac40) at main.c:740 (gdb) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47724&edit=1