3

I have been getting the occasional Seg Fault from apache so I enabled core dump on my servers to try to figure out what is going on. Last night I got another one and was trying to examine the core dump to find out what's going on. It's definitely a PHP process so I Googled how to examine these specifically for PHP. I downloaded the .gdbinit file for PHP 5.2 and I ran the following on the dump file:

$ 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.

I should be getting a backtrace after dump_bt executor_globals.current_execute_data for the PHP script that caused the seg fault, but I keep getting Attempt to extract a component of a value that is not a structure. instead.

3
  • could be a module/extension version mismatch Commented Dec 2, 2010 at 14:03
  • @FractalizeR PHP version is 5.2.4 Commented Dec 2, 2010 at 23:41
  • Having the same issue, quanta's answer does not resolve the problem in my use case. Commented Jan 10, 2017 at 0:51

1 Answer 1

1

At the first time, I got the same problem with you. Run again the bt and dump_bt commands and it works:

(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 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.