php - Xdebug 段错误

标签 php linux wordpress magento xdebug

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

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

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

您可以在下面的pastebin链接中看到我们的php.ini文件。我们还有一个本地 php 覆盖,具有以下选项: xdebug.remote_host = 本地计算机IP xdebug.remote_port = 9001

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

我们使用 Visual Studio 和 netbeans 在我们的环境中进行调试。当我们启动调试 session 时,它实际上最初在index.php 文件上中断。我们可以逐步完成该过程一段时间,直到应用程序的随机点。此时,在 apache2 日志文件中会创建一个段错误,如下所示:

[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

如您所见,发生了核心转储。我们还在 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 (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
#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 (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
#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 (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
#76 0x00007f6753e724d5 in php_execute_script (primary_file=primary_file@entry=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 (r=r@entry=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 (r=r@entry=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 (c=c@entry=0x7f6757ed0290, csd=<optimized out>) at connection.c:202
#86 0x00007f67548a2767 in child_main (child_num_arg=child_num_arg@entry=3) at prefork.c:704
#87 0x00007f67548a29a6 in make_child (s=0x7f6757fd0de0, slot=slot@entry=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 缓冲区输出。 尝试从头开始重新安装 Xdebug 重新编译 Apache 重新安装 PHP 5.5 在iptables中打开端口 重新启动 Web 服务器

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

当我们开始了解我的 Linux 知识时,我的眼睛开始流血。这个问题还有一个很大的问题。我们在同一台服务器上有 WordPress 网站。有时我们实际上能够成功调试整个 WordPress session 。其他时候我们无法调试 WordPress 并遇到同样的问题。这使得问题变得更加奇怪。

任何人对我遇到的问题可能有的任何帮助都将是令人惊奇的。我现在对几乎所有事情都持开放态度,因为这是我们的开发服务器。

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

最佳答案

尚不清楚您是否真的尝试过在没有 ionCube 的情况下运行 - 如果您不需要它 -,但否则失败的原因很可能是 ionCube 加载程序是 incompatible with XDebug .

我很幸运地在 5.4 上使用 XDebug 调试了部分 ionCube 加密的应用程序,但在 PHP 5.6 上我遇到了类似的段错误。

关于php - Xdebug 段错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27639215/

相关文章:

php - [mysql php],一周的第一天是星期一还是星期日?

php如何基于动态考勤系统

windows - Symbian Qt 开发 Linux

javascript - 在wordpress中添加弹出窗口(add_records.php)

WordPress 管理区域搜索不起作用

php - PHPUnit 中测试用例的执行顺序

php - Mysql查询以搜索圆形 float

linux - CoreOS 的 Docker 和 Rocket 有什么区别?

c++ - 如何在 linux 下检查 c++ .to 文件?

jquery - Bootstrap 4 slider 文本仅推荐