Apache / PHP Segfault无法使用gdb backtrace进行诊断

时间:2015-04-02 16:39:23

标签: php apache segmentation-fault gdb fastcgi

我正在弄清楚是什么导致了Apache / PHP中的Segfault。

我如何找到:

#1)导致错误的脚本是什么?

#2)

中发生错误的功能是什么

当我运行backtrace时,看起来它与init发生错误。当我进入框架时,我没有看到任何其他信息。

(gdb) bt
#0  0x00002aaab0bc906b in object_properties_init () from /etc/httpd/modules/libphp5.so
#1  0x00002aaab0bc9a8e in _object_and_properties_init () from /etc/httpd/modules/libphp5.so
#2  0x00002aaab0c3c4e9 in ?? () from /etc/httpd/modules/libphp5.so
#3  0x00002aaab0bf6bae in execute () from /etc/httpd/modules/libphp5.so
#4  0x00002aaab0bf1160 in ?? () from /etc/httpd/modules/libphp5.so
#5  0x00002aaab0bf6bae in execute () from /etc/httpd/modules/libphp5.so
#6  0x00002aaab0bb4edf in zend_call_function () from /etc/httpd/modules/libphp5.so
#7  0x00002aaab0bb5d00 in call_user_function_ex () from /etc/httpd/modules/libphp5.so
#8  0x00002aaab0bb5d86 in call_user_function () from /etc/httpd/modules/libphp5.so
#9  0x00002aaab0ac1a5d in ?? () from /etc/httpd/modules/libphp5.so
#10 0x00002aaab0ac1cb5 in ?? () from /etc/httpd/modules/libphp5.so
#11 0x00002aaab0aba753 in ?? () from /etc/httpd/modules/libphp5.so
#12 0x00002aaab0abae8f in ?? () from /etc/httpd/modules/libphp5.so
#13 0x00002aaab0bc6df0 in ?? () from /etc/httpd/modules/libphp5.so
#14 0x00002aaab0b63c35 in php_request_shutdown () from /etc/httpd/modules/libphp5.so
#15 0x00002aaab0c68cb1 in ?? () from /etc/httpd/modules/libphp5.so
#16 0x00002b21a22bdf4a in ap_run_handler ()
#17 0x00002b21a22c13d8 in ap_invoke_handler ()
#18 0x00002b21a22cbd3a in ap_internal_redirect ()
#19 0x00002aaaaf707c70 in ap_make_dirstr_parent () from /etc/httpd/modules/mod_rewrite.so
#20 0x00002b21a22bdf4a in ap_run_handler ()
#21 0x00002b21a22c13d8 in ap_invoke_handler ()
#22 0x00002b21a22cbee8 in ap_process_request ()
#23 0x00002b21a22c90d0 in ?? ()
#24 0x00002b21a22c51d2 in ap_run_process_connection ()
#25 0x00002b21a22d0389 in ?? ()
#26 0x00002b21a22d061a in ?? ()
#27 0x00002b21a22d0e7d in ap_mpm_run ()
#28 0x00002b21a22ab058 in main ()


(gdb) frame 0
#0  0x00002aaab0bc906b in object_properties_init () from /etc/httpd/modules/libphp5.so

(gdb) frame 3
#3  0x00002aaab0bf6bae in execute () from /etc/httpd/modules/libphp5.so

(gdb) frame 15
#15 0x00002aaab0c68cb1 in ?? () from /etc/httpd/modules/libphp5.so

1 个答案:

答案 0 :(得分:1)

  

1)导致错误的脚本是什么?

堆栈跟踪中没有足够的信息告诉您。

您需要为libphp5.so安装调试符号,也可能为Apache安装调试符号。 然后您可以找到该脚本。

如何安装调试符号的精确细节取决于您使用的操作系统和发行版,您也没有告诉我们。通常它类似于apt-get install php5-dbgyum install php5-debug或类似的东西。

  

2)在

中发生错误的功能是什么

错误发生在object_properties_init()