You are not logged in.

#1 2020-02-20 08:13:26

CAGYL
Member
Registered: 2020-02-20
Posts: 1

Kernel Panic not being displayed?

Hello!

I'm writing a kernel module and I was hoping to get the beautiful Kernel Panic screen with all the useful details when I call panic(), but my machine just freezes without displaying anything.

I know kpanic is not displayed in X11 GUI mode, that's why my code switches to text-mode before calling panic().

So the scenario looks like this:

switch_to_text_mode();       /* switch to text-mode (i.e. CTRL-ALT-F1) */

sleep(5);                    /* to make sure we're in text-mode*/

panic("useful stuff \n");    /* kpanic */

Additional info:

sysctl Documentation states:

panic_print: Bitmask for printing system info when panic happens. User can chose combination of the following bits: bit 0: print all tasks info bit 1: print system memory info bit 2: print timer info bit 3: print locks info if CONFIG_LOCKDEP is on bit 4: print ftrace buffer

Output of:

cat /proc/sys/kernel/panic_print
0

I tried changing it to values listed above, but no luck.

Output of:

cat /proc/sys/kernel/panic
0

( Number of seconds the kernel waits before rebooting on a panic. The default setting is 0, which doesn't cause a reboot. ) so 0 == no reboot.

My kernel version is 5.5.4-arch1-1

I also noticed this started happening with Linux 5.0 (everything works as expected on < 5.0).

Any ideas?

Thanks!

Offline

Board footer

Powered by FluxBB