Search code examples
debugginglinux-kernelkernelkernel-module

kernel.panic_on_oops is set yet kernel doesn't panic on oops


I've set kernel.panic_on_oops to 1 via the Kernel command line (by passing oops=panic) yet it doesn't seem to panic on generating an oops. I've checked via sysctl if the option is indeed set and it is.

So I'm unable decipher what could be causing this.


Solution

  • If in addition to sysctl kernel.panic_on_oops (see 1) you also have 0 (the default) or some long value set in sysctl kernel.panic (see 2), you might just be waiting around for the panic reboot to actually occur, which could happen much later or never. Try setting this to 30 seconds or something reasonable enough to allow a vmcore to be generated, but definitely greater than 0, to see if you panic+reboot.