analyzing C program core dump using GDB (Cannot access memory)
Analyzing /var/log/messages, a process restart caught my attention. According to log file it was restarted thanks to ABRT signal and so there had to be a dump fie. I analyzed core dump using gdb utility and the results are here(lines 100 - 1199 are removed because of LQ 30000 characters limitation):
Code:
(gdb) core pid.core.0 |
The symbols have been stripped from the executable so the core file is not very useful. It is possible, but extremely tedious, to trace through a core file with a stripped executable or library but you do need the source to make any meaningful use of it and if you have that it just makes sense to build an unstripped version for debugging.
So the answers are a) there is no reasonable way to tell why the program crashed. b) there is no reasonable way to further debug this crash instance. |
It seems to me (because of many 0 addresses) that the program went out of stack (stack overflow, overwritten return address or similar problem). If not, 1500 functions on backtrace suggest a deep (infinite?) recursion. But without the debug symbols it'll be very hard to find out exactly.
|
Expanding on what Mara said:
Quote:
I wouldn't say with confidence that lines #0 and #1 are OK, but they are the most that might be OK in that backtrace. So you can be pretty sure that something trashed some copy of the frame pointer, so gdb can't give a correct backtrace. If you knew a bit about gdb and asm code, you could look at the disassembly around addresses 0x88d86437 and 0x88c9b204 to see if that code is plausible enough to be valid backtrace levels. If they're not plausible, you're totally lost. But even if they are, you're pretty much lost. If they are valid stack frames then the object that overran is two frames up the stack from where the crash happened, which makes it likely the bug was relatively long before the crash in execution history. Those are hard to find even when you have symbols and source code. Quote:
The more realistic answer is that it is impossible to diagnose. If you were someone for whom such diagnosis is really hard (rather than impossible) you wouldn't have needed to ask. |
All times are GMT -5. The time now is 06:09 AM. |