How to analyze core dump

Pablo picture Pablo · Jan 10, 2012 · Viewed 9.3k times · Source

After application[rtorrent] crashed, it produced core file, 250MB.

Caught Segmentation fault, dumping stack:B] [Port: 58940][U 0/0] [D 0/10] [H 1/32] [S 72/75/768] [F 0/128]
Stack dump not enabled.
Aborted (core dumped)

What I need is to analyze and see the stack trace, to have clue why rtorrent is crashing so often.

Answer

4ndrew picture 4ndrew · Jan 10, 2012

gdb should be able to analyse the core:

gdb /path/to/binary/rtorrent /path/to/coredump/rtorrent.core

type where to see stack trace.

To see more: compile rtorrent with debug symbols, run, wait crash and analyse dump with gdb (in this case you can see exact place where crash occurs).

UPD One note, rtorrent is build on top of libtorrent as I know, so, you have to rebuild both library and application with debug symbols in order to get full information.