2014-12-24 140 views
0

因此,首先我想说,我们已经连续4天研究这个问题,试图找出解决方案,但一直无法找到有效的答案。Xdebug分割错误

因此大约两周前,我们决定作为一家公司,现在是时候将我们的ubuntu web服务器升级到最新版本。所以我们继续升级,一切似乎都很顺利。直到我们试图使用xdebug来调试一个magento应用程序。

我们在以前版本的ubuntu上安装了xdebug,并且能够在没有任何问题的情况下完美地进行调试。每次我们尝试调试Magento网站时,我们现在都会出现分段错误错误。

您可以在下面的pastebin链接中看到我们的php.ini文件。我们也有一个本地的PHP控装置,带下列选项: xdebug.remote_host = localcomputerip xdebug.remote_port = 9001

PHP ini文件http://pastebin.com/UYLviByW

我们使用调试Visual Studio和NetBeans的在我们的环境。当我们开始调试会话时,它实际上最初在index.php文件中破坏。我们可以逐步完成该过程一段时间,直到应用程序的随机点。正如你看到一个核心转储发生

[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

:此时段故障在类似下面的Apache2的日志文件创建的。我们还得到,在Xdebug的日志文件显示了以下情况:

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

正如你可以看到,在第二客户端连接倍。

在掌握核心转储文件我都遵循了以下信息: http://sysadmin.carlusgg.com/?p=197

那么回事通核心转储我得到以下输出的堆栈跟踪。

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 ([email protected]=0x7f6757eec398, [email protected]=0x7f6759f54e80, [email protected]=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 ([email protected]=0x7f6757eec398, [email protected]=0x7f6759f54e80, [email protected]=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 
 
#2 0x00007f675138e0aa in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#3 0x00007f6751386a30 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#4 0x00007f675138a127 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#5 0x00007f675138e0aa in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#6 0x00007f6751386a30 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#7 0x00007f675138a127 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#8 0x00007f675138e0aa in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#9 0x00007f6751386a30 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#10 0x00007f675138a127 in ??() from /usr/local/ioncube/ioncube_loader_lin_5.5.so 
 
#11 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 
 
#12 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eebc80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#13 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#14 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eebc80) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#15 0x00007f6753ec2ea1 in zend_call_function ([email protected]=0x7fff4adeef50, fci_cache=<optimized out>, [email protected]=0x7fff4adeef20) 
 
    at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:939 
 
#16 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 
 
#17 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 
 
#18 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 
 
#19 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 
 
#20 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeba70) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#21 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#22 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeba70) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#23 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--- 
 
#24 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb8e8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#25 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#26 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb8e8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#27 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 
 
#28 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb788) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#29 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#30 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb788) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#31 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 
 
#32 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb628) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#33 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#34 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 
 
#36 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb4c0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#37 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#38 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb4c0) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#39 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 
 
#40 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb2a8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#41 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#42 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb2a8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#43 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 
 
#44 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeb170) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#45 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#46 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeb170) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#47 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 
 
#48 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 
 
#50 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 
 
#52 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeae90) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#53 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#54 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeae90) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#55 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 
 
#56 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeac80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#57 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#58 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeac80) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#59 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 
 
#60 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eeab30) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#61 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#62 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eeab30) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#63 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 
 
#64 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea9d8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#65 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#66 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea9d8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#67 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 
 
#68 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea838) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#69 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#70 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea838) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#71 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 
 
#72 0x00007f6753efa9f8 in execute_ex (execute_data=0x7f6757eea6f8) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363 
 
#73 0x00007f6753ec0b69 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73 
 
#74 0x00007f67510e8fcc in xdebug_execute_ex (execute_data=0x7f6757eea6f8) at /home/icstech/xdebug-2.2.5/xdebug.c:1437 
 
#75 0x00007f6753ed25f0 in zend_execute_scripts ([email protected]=8, [email protected]=0x0, [email protected]=3) at /build/buildd/php5-5.5.9+dfsg/Zend/zend.c:1316 
 
#76 0x00007f6753e724d5 in php_execute_script ([email protected]=0x7fff4adf3240) at /build/buildd/php5-5.5.9+dfsg/main/main.c:2506 
 
#77 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--- 
 
#78 0x00007f6758061680 in ap_run_handler (r=0x7f6757eca0a0) at config.c:169 
 
#79 0x00007f6758061bc9 in ap_invoke_handler ([email protected]=0x7f6757eca0a0) at config.c:439 
 
#80 0x00007f675807716a in ap_process_async_request (r=0x7f6757eca0a0) at http_request.c:317 
 
#81 0x00007f6758077444 in ap_process_request ([email protected]=0x7f6757eca0a0) at http_request.c:363 
 
#82 0x00007f6758073f02 in ap_process_http_sync_connection (c=0x7f6757ed0290) at http_core.c:190 
 
#83 ap_process_http_connection (c=0x7f6757ed0290) at http_core.c:231 
 
#84 0x00007f675806acc0 in ap_run_process_connection (c=0x7f6757ed0290) at connection.c:41 
 
#85 0x00007f675806b0a8 in ap_process_connection ([email protected]=0x7f6757ed0290, csd=<optimized out>) at connection.c:202 
 
#86 0x00007f67548a2767 in child_main ([email protected]=3) at prefork.c:704 
 
#87 0x00007f67548a29a6 in make_child (s=0x7f6757fd0de0, [email protected]=3) at prefork.c:800 
 
#88 0x00007f67548a2a06 in startup_children (number_to_start=2) at prefork.c:818 
 
#89 0x00007f67548a36e0 in prefork_run (_pconf=<optimized out>, plog=0x7f6757fcc028, s=0x7f6757fd0de0) at prefork.c:976 
 
#90 0x00007f675804869e in ap_run_mpm (pconf=0x7f6757ffe028, plog=0x7f6757fcc028, s=0x7f6757fd0de0) at mpm_common.c:96 
 
#91 0x00007f6758041e36 in main (argc=3, argv=0x7fff4adf3968) at main.c:777

现在我都没有Linux专家,但这个有我困惑。我们已经尝试了以下几点: 试过xdebug版本2.2.3 - 2.2.6 卸载Ioncube 卸载Zend OPCache 关闭PHP缓冲区输出。 试了从无到有 重新编译Apache的 重新安装PHP 5.5重新安装Xdebug的 打开的端口在重新启动Web服务器

现在让我来解释一下我们的服务器设置的iptables 。这是我们本地网络的内部开发服务器。它安装了Ubuntu 14.04。内部和外部的所有防火墙端口都可以正确打开端口。这是在电源服务器上运行的虚拟机。

我的眼睛开始流血,因为我们正在掌握我的linux知识。这个问题也有一个很大的问题。我们在同一台服务器上安装了WordPress网站。有时我们实际上能够通过整个WordPress会话进行调试。其他时候,我们无法调试wordpress并遇到同样的问题。这使得问题变得更加诡异。

任何人都可能对我所遇到的问题有任何帮助,那将是惊人的。我现在对任何东西都很开放,因为这是我们的开发服务器。

如果有任何其他信息需要您帮助解决此问题,请告诉我。现在我们回到var_dump和print_r调试方法。

+0

这么长的问题。尽管我不知道如何解决这个问题,但从我的经验来看,当你开始通过与某人交谈或写下来描述它时,解决方案就会出现。放松。 – D3Hunter

+0

我很欣赏这个反馈。正如我所说,这超出了我的知识障碍,并且正在寻求一些帮助。我在工作中与其他同事讨论过这个问题,它真的超出了我们综合知识的范围。再次,我感谢任何有用的人提供的。 –

回答

0

目前还不清楚您是否真的在没有ionCube的情况下尝试运行 - 如果您不需要它 - 但除此之外,失败的原因很可能是ionCube loader是incompatible with XDebug

我已经使用XDebug在5.4上调试了部分使用ionCube加密的应用程序,但在PHP 5.6上,我得到了类似的分段错误。