我从apache那里得到了偶尔的Seg错误,所以我启用了服务器上的核心转储,以试图弄清楚到底发生了什么。昨天晚上,我又找到了一个,并试图检查核心垃圾堆,以了解发生了什么。这绝对是一个PHP过程,所以我搜索了如何专门检查这些PHP。我下载了PHP5.2的.gdbinit文件,并在转储文件上运行了以下命令:
$ 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.
对于导致seg错误的PHP,我应该在dump_bt executor_globals.current_execute_data
之后得到一个回溯跟踪,但是我继续得到Attempt to extract a component of a value that is not a structure.
。
发布于 2011-02-23 20:07:19
第一次,我和你有同样的问题。再次运行bt和dump_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
https://stackoverflow.com/questions/4335637
复制相似问题