View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000832 | Xdebug | Uncategorized | public | 2012-05-11 14:35 | 2012-06-12 15:14 |
Reporter | rbarbosa | Assigned To | derick | ||
Priority | urgent | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Redhat Linux - Kernel 2.6.18 | OS | Linux | OS Version | 2.6.18 |
Product Version | 2.2.0 | ||||
Target Version | 2.2.1 | Fixed in Version | 2.2.1 | ||
Summary | 0000832: There is a seg fault (11) and core dump during debugging in PhpStorm | ||||
Description | While stepping through some of our source code we are seeing a failure in the debugger that is resulting in a crash and a disconnect from the web server. This readily reproducible in our current project, but that project cannot be shared because it is proprietary code. The crash occurs while attempting to inspect a variable in the debugger. Either expanding the node that contains the value, or even hovering over the variable name in the source code window will cause the crash. I can share some core dump files with the developer when the bug is assigned. | ||||
Steps To Reproduce | Unfortunately, this is failing 100% of the time in our code base, but the code is proprietary and cannot be shared. I have not been able to reproduce this issue in a simple setting, only within our application which includes too much complexity to describe here. | ||||
Additional Information | This fails in both 5.4.2 and 5.4.3 versions of PHP. The error is occurring in xdebug-2.2.0/xdebug_var.c:1183. The failure being reported is: Core was generated by `/opt/apache2.2.22-rhes5.alt/sbin/httpd -f /opt/apache2.2.22-rhes5.alt/conf/http'. | ||||
Tags | No tags attached. | ||||
Operating System | Linux 2.6.18 | ||||
PHP Version | 5.4.2 | ||||
|
Exactly the same situation for us today, XDebug is completely unusable as a result for us. I apologise that right now I do not have the time to provide sample code (my work pressures are too intense for me to afford to spend time anonymising my code) but my best description it seems to suffer most with our code that uses a lot of static classes running as singletons. CodeIgniter can be stepped through relatively okay, but our code is impossible to debug as a result. PHP 5.4 and XDebug 2.2.0 (and 2.3.0dev from git is still broken.) Looking forward to seeing this fixed as regressing to PHP 5.3 is not an option for us. |
|
That actually matches our issue as well. I have an abstract class called CacheManager that exposes functionality for reading and writing key/value pairs to a data store. Individual derived classes provide implementations for specific data stores like Memcache or MongoDB. These classes are self-stored classes, so they can be serialized and written to the data stores they interface with. They all have private constructors, but they expose a "loadByID()" method which takes in a key and tries to load the CacheManager instance from the data store, if one is not found a new one is created. This technique is similar to the singleton pattern's use of a "getInstance()" method, but there is no restriction on the number of instances that can be created. loadByID() is implemented in the abstract class, but all derived classes wrap the functionality in type-specific loadByID() methods that enforce rules for building the ID. It is during this call to the static loadByID() method (which in turn calls parent::loadByID()) that the xdebug failure is occurring. Our project makes use of traits, so rolling back to PHP 5.3.x is not an option for us either, and xdebug unusable with this issue. |
|
Same issue here! |
|
This is the same problem we're having in Win32 (Win7Pro x64) |
|
Hi, In order to reproduce and fix this, I'd need the following information:
cheers, |
|
Hi Derick, I've been unable to create a short sandbox script that shows this error. I'm still trying, but this occurred in a larger system that is fairly complex, so I'm not sure what combination of conditions is causing this disconnect. In the meantime I will enabled the debugging log. Here is the backtrace from the most recent core file: 0 xdebug_var_export_xml_node (struc=0x9d72334, name=0x9d77068 "$this->_CacheManager::_username", node=0x9d71478, options=0x9d6c640, level=1) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_var.c:1183
1 0x00769e80 in xdebug_object_element_export_xml_node (item=0xb7cac0cc, num_args=5, args=0xbfa4870c "", hash_key=0xbfa486dc) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_var.c:1038
2 0x010283d1 in zend_hash_apply_with_arguments (ht=0xb7d15494, apply_func=0x769be0 <xdebug_object_element_export_xml_node>, num_args=5) at /opt/src/apache2.2/php-5.4.3/Zend/zend_hash.c:772
3 0x0076799f in xdebug_var_export_xml_node (struc=0xbfa487a4, name=0x9d76a80 "$this->_CacheManager", node=0x9d94358, options=0x9d6c640, level=0) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_var.c:1288
4 0x00767b3f in xdebug_get_zval_value_xml_node_ex (name=0x9d75390 "$this->_CacheManager", val=0xb7e7ace0, var_type=0, options=0x9d6c640) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_var.c:1337
5 0x0075d681 in get_symbol (name=0x9d75390 "$this->_CacheManager", name_length=<value optimized out>, options=0x9d6c640) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_handler_dbgp.c:687
6 0x0075d735 in add_variable_node (node=0x9d6eb18, name=0x9d72334 "\021", name_length=17, var_only=1, non_null=0, no_eval=0, options=0x9d6c640) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_handler_dbgp.c:1700
7 0x0075df12 in xdebug_dbgp_handle_property_get (retval=0xbfa488a8, context=0x771cec, args=0x9d92c48) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_handler_dbgp.c:1765
8 0x0075572f in xdebug_dbgp_parse_option (context=0x771cec, bail=1) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_handler_dbgp.c:2412
9 xdebug_dbgp_cmdloop (context=0x771cec, bail=1) at /opt/src/apache2.2/xdebug-2.2.0/xdebug_handler_dbgp.c:2461
10 0x00755d0f in xdebug_dbgp_breakpoint (context=0x771cec, stack=0x9d6c3b8, file=0xb7d0baa0 "/home/xxxxxxx/public_html/www/app/com/xxxxxxx/arch/ChannelRegistry.inc", lineno=113, type=1, exception=0x0,
11 0x0074d435 in xdebug_statement_call (op_array=0xb7ca4898) at /opt/src/apache2.2/xdebug-2.2.0/xdebug.c:1907
12 0x01011b44 in zend_llist_apply_with_argument (l=0x14f8688, func=0x103fea0 <zend_extension_statement_handler>, arg=0xb7ca4898) at /opt/src/apache2.2/php-5.4.3/Zend/zend_llist.c:236
13 0x0104745d in ZEND_EXT_STMT_SPEC_HANDLER (execute_data=0xb7e5db34) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:895No locals. 14 0x0104d238 in execute (op_array=0xb7ca4898) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:410
15 0x00750d6e in xdebug_execute (op_array=0xb7ca4898) at /opt/src/apache2.2/xdebug-2.2.0/xdebug.c:1390
16 0x01047160 in zend_do_fcall_common_helper_SPEC (execute_data=0xb7e5d404) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:669
17 0x0104d238 in execute (op_array=0xb7e7e3c4) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:410
18 0x00750d6e in xdebug_execute (op_array=0xb7e7e3c4) at /opt/src/apache2.2/xdebug-2.2.0/xdebug.c:1390
19 0x01047160 in zend_do_fcall_common_helper_SPEC (execute_data=0xb7e5d1e8) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:669
20 0x0104d238 in execute (op_array=0xb7e792c8) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:410
21 0x00750d6e in xdebug_execute (op_array=0xb7e792c8) at /opt/src/apache2.2/xdebug-2.2.0/xdebug.c:1390
22 0x010633a8 in ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER (execute_data=0xb7e5d030) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:11475
23 0x0104d238 in execute (op_array=0xb7e787b8) at /opt/src/apache2.2/php-5.4.3/Zend/zend_vm_execute.h:410
24 0x00750d6e in xdebug_execute (op_array=0xb7e787b8) at /opt/src/apache2.2/xdebug-2.2.0/xdebug.c:1390
25 0x0101baf7 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /opt/src/apache2.2/php-5.4.3/Zend/zend.c:1272
26 0x00fbff9e in php_execute_script (primary_file=0xbfa4b0d0) at /opt/src/apache2.2/php-5.4.3/main/main.c:2473
27 0x010b823b in php_handler (r=0x9d662f0) at /opt/src/apache2.2/php-5.4.3/sapi/apache2handler/sapi_apache2.c:667
28 0x08082e53 in ?? ()No symbol table info available. |
|
rbarbosa, so far, all the GDB traces that I have seen point to the same cause. However, I've still not been able to reproduce this; so I would kindly ask you to help and try and figure out which code causes this, and whether you can isolate it. |
|
Hi Derick...I still have not been able to isolate this issue. I've seen a few other issues posted here that might be related, but I'm not sure if they are or not. Bug 0000830 seems close to what I am seeing from a behavior perspective. Also 0000837 seems similar. Any luck getting isolated script from any of those folks? |
|
I think I've just pushed a fix to github for this issue. Could you please try it? |
|
Hello? |
|
Hi Derick, I'm seeing something similar and wanted to check your fix by running the latest from the master branch. I'm still seeing the segfault, and looking through the logs on github, I don't see any checkin on 5/28 that mentions issue 832. Is the fix on a different branch or was it part of changeset d0f753e714c8fea33f689d7d75b89455b615037d? |
|
Sorry for the delayed response. The latest build appears to have resolved this issue. I did not test very long...but I was able to get further into my call stack than ever before. I also ran a parallel debug session and had both running at the same time stepping through the code and neither session crashed. This looks promising! Awesome work. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-11 14:35 | rbarbosa | New Issue | |
2012-05-11 20:48 | pbrookfield | Note Added: 0002143 | |
2012-05-11 21:02 | rbarbosa | Note Added: 0002144 | |
2012-05-11 21:04 | rbarbosa | Note Edited: 0002144 | |
2012-05-11 21:05 | rbarbosa | Note Edited: 0002144 | |
2012-05-13 19:39 | rulatir | Note Added: 0002145 | |
2012-05-13 19:51 | dleffler | Note Added: 0002146 | |
2012-05-13 21:49 | derick | Note Added: 0002147 | |
2012-05-13 21:51 | derick | Assigned To | => derick |
2012-05-13 21:51 | derick | Status | new => feedback |
2012-05-15 22:31 | derick | Target Version | => 2.2.1 |
2012-05-16 11:45 | rbarbosa | Note Added: 0002159 | |
2012-05-16 11:45 | rbarbosa | Status | feedback => assigned |
2012-05-16 11:46 | rbarbosa | Note Edited: 0002159 | |
2012-05-16 11:48 | rbarbosa | Note Edited: 0002159 | |
2012-05-16 11:51 | rbarbosa | Note Edited: 0002159 | |
2012-05-16 12:04 | rbarbosa | Note Edited: 0002159 | |
2012-05-17 07:35 | derick | Note Added: 0002168 | |
2012-05-17 07:35 | derick | Status | assigned => feedback |
2012-05-22 18:33 | rbarbosa | Note Added: 0002187 | |
2012-05-22 18:33 | rbarbosa | Status | feedback => assigned |
2012-05-28 08:26 | derick | Note Added: 0002201 | |
2012-05-28 08:26 | derick | Status | assigned => feedback |
2012-06-11 16:17 | derick | Note Added: 0002245 | |
2012-06-12 00:23 | avanha@photobucket.com | Note Added: 0002249 | |
2012-06-12 15:06 | rbarbosa | Note Added: 0002250 | |
2012-06-12 15:06 | rbarbosa | Status | feedback => assigned |
2012-06-12 15:14 | derick | Status | assigned => closed |
2012-06-12 15:14 | derick | Resolution | open => fixed |
2012-06-12 15:14 | derick | Fixed in Version | => 2.2.1 |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |