This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorials:troubleshooting:coredumpfile [2018/01/02 11:34] miconda [Troubleshooting Core Dump File With GDB] |
tutorials:troubleshooting:coredumpfile [2020/09/04 10:50] miconda [What do do with a core file] |
||
---|---|---|---|
Line 11: | Line 11: | ||
* Errors in the program code, e.g. null pointer access | * Errors in the program code, e.g. null pointer access | ||
- | ===== What do do with a core file ===== | + | ===== What to do with a core file ===== |
Core files can be examined with **gdb**, the GNU debugger. It can read the crash informations, | Core files can be examined with **gdb**, the GNU debugger. It can read the crash informations, | ||
Line 19: | Line 19: | ||
</ | </ | ||
- | (Substitute the paths to match your installation.) | + | Substitute the paths to match your installation, for example: |
- | After gdb finished to read its input type **backtrace**, gdb will then output the backtrace. This information should added to your bug report of the crash. Please don't delete the core files after the backtrace generation, as its really helpful for eventual further investigations. | + | < |
+ | gdb / | ||
+ | </ | ||
+ | |||
+ | After gdb finished to read the input and shows its prompt, execute: | ||
+ | |||
+ | < | ||
+ | backtrace | ||
+ | </ | ||
+ | |||
+ | or the short variant: | ||
+ | |||
+ | < | ||
+ | bt | ||
+ | </ | ||
+ | |||
+ | GDB will then output the backtrace. | ||
+ | |||
+ | More useful could be the full backtrace, that can be seen with: | ||
+ | |||
+ | < | ||
+ | bt full | ||
+ | </ | ||
+ | |||
+ | This information should added to your bug report of the crash. Please don't delete the core files after the backtrace generation, as its really helpful for eventual further investigations. | ||
- | In order to get a meaningful backtrace gdb needs some debugging informations in its binary. If you compiled from the source, no additional steps should be necessary from you. If you install a binary package, e.g. from debian, you need to install the **-dbg** package too. | + | In order to get a meaningful backtrace gdb needs some debugging informations in its binary. If you compiled from the source, no additional steps should be necessary from you. If you install a binary package, e.g. from debian, you need to install the **-dbg** package too (e.g., kamailio-dbg...deb). |
If you don't understand the information that gdb prints, some developer on the mailling list should be able to help you. | If you don't understand the information that gdb prints, some developer on the mailling list should be able to help you. | ||
Line 48: | Line 72: | ||
echo " | echo " | ||
</ | </ | ||
+ | |||
+ | A similar command for FreeBSD: | ||
+ | |||
+ | < | ||
+ | sysctl kern.corefile=' | ||
+ | </ | ||
+ | |||
===== Useful Links ===== | ===== Useful Links ===== |