On 02/28/2013 12:49 PM, Stas Malyshev wrote: > Hi! > >> It works fine. You just have to load ZO before xdebug. If you load it >> the other way around bad things happen. This wrong load order currently > > Could you describe the bad things? Maybe we could have some checks in > either of them to prevent it... Of course, we could probably make ZO > just check if xdebug is loaded and react accordingly, but maybe we could > resolve it in a more elegant way... >
Well, I did describe it back on Feb.13 and cc'ed you actually, but it was a segfault which looked to be caused by a double-free in a piece of complicated code. It manifested itself on line 203 of this code: 200 } else { 201 list($v, $selector) = 202 $this->variantFromURL($userID) ?: 203 $this->variantForUser($userID) ?: 204 $this->variantForGroup($userID) ?: 205 $this->variantForAdmin($userID) ?: 206 $this->variantForInternal() ?: 207 $this->variantByPercentage($bucketingID) ?: 208 array(self::OFF, 'w'); which, granted, is short-circuited-ternary-abuse, but still. Switching the ZO/Xdebug load order cleared it up. It didn't happen on every request and not on a stripped down test case, so it was hard to narrow down further. But this is often the case for opcode cache-related problems. The segfault looked like this: #0 0x00007fc5e636b6b1 in _zval_dtor_func (zvalue=0x7fc5ee784828) at /home/rlerdorf/php-src/Zend/zend_variables.c:54 54 Z_OBJ_HT_P(zvalue)->del_ref(zvalue TSRMLS_CC); (gdb) bt #0 0x00007fc5e636b6b1 in _zval_dtor_func (zvalue=0x7fc5ee784828) at /home/rlerdorf/php-src/Zend/zend_variables.c:54 #1 0x00007fc5e639f146 in _zval_dtor (execute_data=0x7fc5ebcd3da8) at /home/rlerdorf/php-src/Zend/zend_variables.h:35 #2 i_zval_ptr_dtor (execute_data=0x7fc5ebcd3da8) at /home/rlerdorf/php-src/Zend/zend_execute.h:87 #3 zend_leave_helper_SPEC (execute_data=0x7fc5ebcd3da8) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:468 #4 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6d4140) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #5 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6d4140) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #6 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #7 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6cd918) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #8 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6cd918) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #9 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #10 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6c9d98) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #11 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6c9d98) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #12 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #13 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6c5240) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #14 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6c5240) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #15 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #16 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee2b4868) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #17 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee2b4868) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #18 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #19 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee713800) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #20 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee713800) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #21 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #22 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6f7e20) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #23 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6f7e20) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #24 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #25 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee6f5e50) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #26 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee6f5e50) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #27 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #28 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee682f30) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #29 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee682f30) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #30 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #31 0x00007fc5e63d4cb0 in execute (op_array=0x7fc5ee706080) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #32 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc5ee706080) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #33 0x00007fc5e63e7bf1 in zend_do_fcall_common_helper_SPEC (execute_data=<value optimized out>) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:669 #34 0x00007fc5e63d4cb0 in execute (op_array=0x7fc594bf8100) at /home/rlerdorf/php-src/Zend/zend_vm_execute.h:410 #35 0x00007fc5e26289c9 in xdebug_execute (op_array=0x7fc594bf8100) at /home/rlerdorf/pecl/xdebug/xdebug.c:1435 #36 0x00007fc5e636ba0d in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/rlerdorf/php-src/Zend/zend.c:1315 #37 0x00007fc5e630f757 in php_execute_script (primary_file=0x7fff68d654d0) at /home/rlerdorf/php-src/main/main.c:2492 #38 0x00007fc5e6415bc5 in php_handler (r=0x7fc5edf736c8) at /home/rlerdorf/php-src/sapi/apache2handler/sapi_apache2.c:667 #39 0x00007fc5ebdc1b00 in ap_run_handler () #40 0x00007fc5ebdc53be in ap_invoke_handler () #41 0x00007fc5ebdd086c in ap_internal_redirect () #42 0x00007fc5e67cd7a5 in ?? () from /etc/httpd/modules/mod_rewrite.so #43 0x00007fc5ebdc1b00 in ap_run_handler () #44 0x00007fc5ebdc53be in ap_invoke_handler () #45 0x00007fc5ebdd0a30 in ap_process_request () #46 0x00007fc5ebdcd8f8 in ?? () #47 0x00007fc5ebdc9608 in ap_run_process_connection () #48 0x00007fc5ebdd5807 in ?? () #49 0x00007fc5ebdd5b1a in ?? () #50 0x00007fc5ebdd5e4b in ap_mpm_run () #51 0x00007fc5ebdad900 in main () -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php