View Issue Details

IDProjectCategoryView StatusLast Update
0001097XdebugUsage problems (Wrong Results)public2015-01-04 20:14
ReporterrhinogroupAssigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionnot fixable 
PlatformLinuxOSUbuntuOS Version14.04
Product Version2.2.5 
Target VersionFixed in Version 
Summary0001097: Xdebug Segmentation fault
DescriptionSo first off I want to say that we have researched this issue for 4 days straight trying to figure out a solution but have been unable to find an answer that worked.

So about two weeks ago we decided as a company that it was time to upgrade our ubuntu web servers to the latest version. So we went ahead with the upgrade and everything seemed to go very smooth. This was until we tried to use xdebug to debug a magento application.

We had xdebug on our previous version of ubuntu and were able to debug flawlessly without any issues. We now get segmentation fault errors everytime we try to debug the Magento Website.

You can see our php.ini file in the pastebin link below. We also have a local php override with the following options: xdebug.remote_host = localcomputerip xdebug.remote_port = 9001

PHP ini file http://pastebin.com/UYLviByW

We use both Visual Studio and netbeans for debugging in our environment. When we start the debug session it actually breaks initially on the index.php file. We can step through the process for a little while until random points of the application. At this point a segmentation fault is created in the apache2 log file like the following:

[Tue Dec 23 16:09:25.756786 2014] [core:notice] [pid 31832] AH00051: child pid 31838 exit signal Segmentation fault (11), possible coredump in /etc/apache2

As you see a core dump happened. We also get the following that shows up in the xdebug log file:

Log opened at 2014-12-23 18:30:11
I: Connecting to configured address/port: 10.10.10.144:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/magento.dev.com/public_html/index.php" language="PHP" protocol_version="1.0" appid="15222" idekey="netbeans-xdebug"><engine version="2.2.6"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>

Log opened at 2014-12-23 18:30:36
I: Connecting to configured address/port: 10.10.10.144:9001.
E: Time-out connecting to client. :-(
Log closed at 2014-12-23 18:30:36

As you can see the client times out on the second connect.

With the core dump file in hand I have followed the following information: http://sysadmin.carlusgg.com/?p=197 and

So going thru the stack trace of the core dump i get the following output.

Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from apache2...Reading symbols from /usr/lib/debug//usr/sbin/apache2...done.
done.
[New LWP 32601]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 xdebug_add_stack_frame (zdata=zdata@entry=0x7f6757eec398, op_array=op_array@entry=0x7f6759f54e80, type=type@entry=2) at /home/icstech/xdebug-2.2.5/xdebug_stack.c:1112
1112 tmp->var[tmp->varc].name = NULL;
(gdb) bt
#0 xdebug_add_stack_frame (zdata=zdata@entry=0x7f6757eec398, op_array=op_array@entry=0x7f6759f54e80, type=type@entry=2) at /home/icstech/xdebug-2.2.5/xdebug_stack.c:1112
#1 0x00007f67510e8dcc in xdebug_execute_ex (execute_data=0x7f6757eec4e8) at /home/icstech/xdebug-2.2.5/xdebug.c:1372
0000002 0x00007f675138e0aa in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000003 0x00007f6751386a30 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000004 0x00007f675138a127 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000005 0x00007f675138e0aa in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000006 0x00007f6751386a30 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000007 0x00007f675138a127 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000008 0x00007f675138e0aa in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000009 0x00007f6751386a30 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000010 0x00007f675138a127 in ?? () from /usr/local/ioncube/ioncube_loader_lin_5.5.so
0000011 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eebc80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000012 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eebc80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000013 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000014 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eebc80) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000015 0x00007f6753ec2ea1 in zend_call_function (fci=fci@entry=0x7fff4adeef50, fci_cache=<optimized out>, fci_cache@entry=0x7fff4adeef20)
    at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:939
0000016 0x00007f6753df6592 in zif_call_user_func_array (ht=<optimized out>, return_value=0x7f675afb27d8, return_value_ptr=<optimized out>, this_ptr=<optimized out>,
    return_value_used=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/ext/standard/basic_functions.c:4806
0000017 0x00007f6753ec0c6b in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>, return_value_used=<optimized out>)
    at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:97
0000018 0x00007f67510e9a46 in xdebug_execute_internal (current_execute_data=0x7f6757eeba70, fci=0x0, return_value_used=0) at /home/icstech/xdebug-2.2.5/xdebug.c:1551
0000019 0x00007f6753f80cc5 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:552
0000020 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeba70) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000021 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000022 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeba70) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000023 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb8e8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
---Type <return> to continue, or q <return> to quit---
0000024 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb8e8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000025 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000026 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb8e8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000027 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb788) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000028 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb788) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000029 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000030 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb788) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000031 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb628) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000032 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb628) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000033 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000034 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb628) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
#35 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb4c0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000036 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb4c0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000037 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000038 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb4c0) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000039 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb2a8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000040 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb2a8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000041 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000042 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb2a8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000043 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb170) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000044 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb170) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000045 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000046 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb170) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000047 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeb068) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000048 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb068) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#49 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000050 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb068) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
---Type <return> to continue, or q <return> to quit---
#51 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeae90) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000052 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeae90) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000053 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000054 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeae90) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000055 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeac80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000056 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeac80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000057 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000058 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeac80) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000059 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eeab30) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000060 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeab30) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000061 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000062 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeab30) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000063 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eea9d8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000064 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea9d8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000065 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000066 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea9d8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000067 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eea838) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000068 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea838) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000069 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000070 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea838) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000071 0x00007f6753f81310 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f6757eea6f8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
0000072 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea6f8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
0000073 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
0000074 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea6f8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437
0000075 0x00007f6753ed25f0 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /build/buildd/php5-5.5.9+dfsg/Zend/zend.c:1316
0000076 0x00007f6753e724d5 in php_execute_script (primary_file=primary_file@entry=0x7fff4adf3240) at /build/buildd/php5-5.5.9+dfsg/main/main.c:2506
0000077 0x00007f6753f8294a in php_handler (r=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/sapi/apache2handler/sapi_apache2.c:667
---Type <return> to continue, or q <return> to quit---
0000078 0x00007f6758061680 in ap_run_handler (r=0x7f6757eca0a0) at config.c:169
0000079 0x00007f6758061bc9 in ap_invoke_handler (r=r@entry=0x7f6757eca0a0) at config.c:439
0000080 0x00007f675807716a in ap_process_async_request (r=0x7f6757eca0a0) at http_request.c:317
0000081 0x00007f6758077444 in ap_process_request (r=r@entry=0x7f6757eca0a0) at http_request.c:363
0000082 0x00007f6758073f02 in ap_process_http_sync_connection (c=0x7f6757ed0290) at http_core.c:190
0000083 ap_process_http_connection (c=0x7f6757ed0290) at http_core.c:231
0000084 0x00007f675806acc0 in ap_run_process_connection (c=0x7f6757ed0290) at connection.c:41
0000085 0x00007f675806b0a8 in ap_process_connection (c=c@entry=0x7f6757ed0290, csd=<optimized out>) at connection.c:202
0000086 0x00007f67548a2767 in child_main (child_num_arg=child_num_arg@entry=3) at prefork.c:704
0000087 0x00007f67548a29a6 in make_child (s=0x7f6757fd0de0, slot=slot@entry=3) at prefork.c:800
0000088 0x00007f67548a2a06 in startup_children (number_to_start=2) at prefork.c:818
0000089 0x00007f67548a36e0 in prefork_run (_pconf=<optimized out>, plog=0x7f6757fcc028, s=0x7f6757fd0de0) at prefork.c:976
0000090 0x00007f675804869e in ap_run_mpm (pconf=0x7f6757ffe028, plog=0x7f6757fcc028, s=0x7f6757fd0de0) at mpm_common.c:96
0000091 0x00007f6758041e36 in main (argc=3, argv=0x7fff4adf3968) at main.c:777

Now I am no linux expert at all but this has me confused. We have tried the following things at this point: Tried xdebug versions 2.2.3 - 2.2.6 Uninstalled Ioncube Uninstalled Zend OPCache Turned off PHP Buffer Output. Tried reinstalling Xdebug from scratch Recompiled Apache Reinstalled PHP 5.5 Opened the ports in iptables Restarted the Web Server

Now let me explain our server setup. This is an internal development server to our local network. It has ubuntu 14.04 installed on it. All firewall ports both internally and externally are opened properly for the ports. This is a virtual machine running on a power server.

My eyes are starting to bleed as we are getting to tip of my linux knowledge. There is also one big kicker to this problem. We have WordPress sites on the same server. Sometimes we are actually able to successfully debug through an entire session of WordPress. Other times we are not able to debug wordpress and run into the same problem. That makes the problem even weirder.

Any help that anyone might have at all as to the issue that I am having would be amazing. I am open to pretty much anything right now because this is our development server.

If there is any other information that you need in order to help out with this issue please let me know. For now we are going back to the var_dump and print_r debug methods.

linux wordpress magento xdebug
TagsNo tags attached.
Operating System
PHP Version5.5.5-5.5.9

Activities

derick

2014-12-27 20:36

administrator   ~0002946

Can you reproduce this without that ioncube loader enabled/loaded in php.ini?

rhinogroup

2014-12-29 14:50

reporter   ~0002948

It appears to be conflicting with this version of ioncube loader in some way. Before we upgraded our server, we were able to debug this site even with ioncube loader loaded in. Now for some reason we can't and we get that segmentation fault.

I tried debugging on a separate Magento install as well as a WordPress install with ioncube loader enabled and they worked flawlessly.

I understand the inherent incompatibility with ioncube loader and such. We obviously cant debug code within it. Is there a way to debug the rest of the site even though it runs over the ioncube extension. Much of frontend of the site was rewritten by this ioncube loader. I am just puzzled as to why it work on apache 2.2 and php 5.3 but not on apache 2.4 and php 5.5.

If this is something you do not support i will understand. If not please let me know. Thanks!

derick

2015-01-04 20:14

administrator   ~0002951

The IonCube loader does magical things that I can never support. It messes with internals, and there is no source code. Sorry.

Issue History

Date Modified Username Field Change
2014-12-24 15:46 rhinogroup New Issue
2014-12-27 20:36 derick Note Added: 0002946
2014-12-27 20:36 derick Assigned To => derick
2014-12-27 20:36 derick Status new => feedback
2014-12-29 14:50 rhinogroup Note Added: 0002948
2014-12-29 14:50 rhinogroup Status feedback => assigned
2015-01-04 20:14 derick Note Added: 0002951
2015-01-04 20:14 derick Status assigned => resolved
2015-01-04 20:14 derick Resolution open => not fixable
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)