Repository : ssh://git@diktynna/doc
On branches: backup-redmine/2021-11-13,backup-redmine/2021-12-11,backup-redmine/2022-01-08,backup-redmine/2022-02-12,backup-redmine/2022-03-12,backup-redmine/2022-04-09,backup-redmine/2022-05-07,backup-redmine/2022-06-11,backup-redmine/2022-08-06,backup-redmine/2022-10-07,backup-redmine/2022-11-14,backup-redmine/2023-01-14,main
commit 1de4f4a9ec783006464576d6805f9d5bf3fdcfb9 Author: Sven Eckelmann sven@narfation.org Date: Tue Oct 19 18:26:11 2021 +0000
doc: devtools/Kernel_debugging_with_kgdb
1de4f4a9ec783006464576d6805f9d5bf3fdcfb9 devtools/Kernel_debugging_with_kgdb.textile | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/devtools/Kernel_debugging_with_kgdb.textile b/devtools/Kernel_debugging_with_kgdb.textile index 4b692dfe..f5918c96 100644 --- a/devtools/Kernel_debugging_with_kgdb.textile +++ b/devtools/Kernel_debugging_with_kgdb.textile @@ -363,3 +363,15 @@ The gdb has to be attached like to a remote gdb session $ cd "${LINUX_DIR}" $ "${GDB}" -iex "set auto-load safe-path scripts/gdb/" -iex "target remote localhost:5551" ./vmlinux </code></pre> + +h2. Enable KGDB on panic + +Usually, a debugger catches problems like segfaults and allows a user to debug the problem further. On modern setups with kgdb, this is not the case because the system will automatically reboot after n-seconds. + +This can be avoided by changing the sysctl config <code>kernel.panic</code> to 0. Either in /etc/sysctl.d/ or by manually issuing + +<pre><code class="shell"> +sysctl -w kernel.panic=0 +</code></pre> + +If a kgdb(oc) is attached then it should automatically receive a message when the Oops was noticed and can then be debugged further. \ No newline at end of file