From: Michael Friedrich Date: Mon, 14 Sep 2015 19:35:56 +0000 (+0200) Subject: Update debug docs for core dumps and full backtraces X-Git-Tag: v2.3.11~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=497bce34b33afd74cf71027dd8e4be163a4a3ad6;p=icinga2 Update debug docs for core dumps and full backtraces fixes #10142 --- diff --git a/doc/21-debug.md b/doc/21-debug.md index 90ca0c6cb..8c907307f 100644 --- a/doc/21-debug.md +++ b/doc/21-debug.md @@ -114,8 +114,9 @@ the duplicate import in your `~/.gdbinit` file. ### GDB Run Call GDB with the binary and all arguments and run it in foreground. +If VFork causes trouble disable it inside the gdb run. - # gdb --args /usr/sbin/icinga2 daemon -x debug + # gdb --args /usr/sbin/icinga2 daemon -x debug -DUseVfork=0 > **Note** > @@ -134,6 +135,14 @@ Continue after breakpoint. (gdb) c +### GDB Core Dump + +Either attach to the running process using `gdb -p PID` or start +a new gdb run. + + (gdb) r + (gdb) generate-core-file + ### GDB Backtrace If Icinga 2 aborted its operation abnormally, generate a backtrace. @@ -141,11 +150,13 @@ If Icinga 2 aborted its operation abnormally, generate a backtrace. (gdb) bt (gdb) bt full ->**Tip** -> -> If you're opening an issue at [https://dev.icinga.org] make sure -> to attach as much detail as possible. +Generate a full backtrace for all threads and store it into a new file +(e.g. for debugging dead locks): + + # gdb -p PID -batch -ex "thread apply all bt full" -ex "detach" -ex "q" > gdb_bt.log +If you're opening an issue at [https://dev.icinga.org] make sure +to attach as much detail as possible. ### GDB Backtrace Stepping