2010-12-02 39 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