2010-12-02 98 views
2

我一直在从Apache获得偶尔的Seg Fault,所以我在我的服务器上启用了核心转储,试图找出发生了什么事情。昨晚我得到了另一个,并试图检查核心转储以了解发生了什么。这绝对是一个PHP过程,所以我Google搜索了如何专门针对PHP进行检查。我下载的.gdbinit中的PHP 5.2,我跑在转储文件如下:分析Apache/PHP核心转储

$ gdb apache2 dumpfile 
[reading/loading symbols] 
(gdb) bt 
[...backtrace...] 
(gdb) source ~/.gdbinit 
(gdb) dump_bt executor_globals.current_execute_data 
Attempt to extract a component of a value that is not a structure. 

我应该dump_bt executor_globals.current_execute_data导致此赛格故障PHP脚本后得到一个回溯,但我不断收到Attempt to extract a component of a value that is not a structure.代替。

+0

可能是一个模块/扩展版本不匹配 – stillstanding 2010-12-02 14:03:17

回答

1

我第一次遇到同样的问题。再次运行BTdump_bt命令和它的工作原理:

(gdb) dump_bt executor_globals.current_execute_data 
Attempt to extract a component of a value that is not a structure. 

(gdb) bt 
#0 0x00002af8f874a5da in AppendImages() from /usr/lib64/libMagick.so.10 
#1 0x00002af8f84586ce in MagickAppendImages() from /usr/lib64/libWand.so.10 
#2 0x00002af8f81a3ad8 in zim_imagick_appendimages (ht=<value optimized out>, return_value=0x2af8f9ded108, 
    return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, return_value_used=<value optimized out>) 
    at /var/tmp/imagick/imagick_class.c:8790 

(gdb) dump_bt executor_globals.current_execute_data 
[0xe8609940] appendimages() /var/www/html/xx/yy.php:803 
[0xe8605070] genCode() /var/www/html/xx/zz.php:127