Kernel freezes instead of panicking
Hello, I have an Ubuntu system on which I have compiled a kernel and booted into it. I mostly based the config on the old configuration. I expect that running this command [1] should lead to a kernel panic but strangely it does not and it only leads to freeze. I don't see the kernel panic messages but the system does freeze and I have to use the power button to reboot. It is possible that I am supposed to configure something but have not, maybe I missing something. Could someone tell me what I am missing out on? Thanks in advance. Regards, David
The command I use to panic the kernel is: echo c > /proc/sysrq-trigger On Mon, Feb 7, 2022 at 1:21 PM David Kahurani <k.kahurani@gmail.com> wrote:
Hello,
I have an Ubuntu system on which I have compiled a kernel and booted into it. I mostly based the config on the old configuration.
I expect that running this command [1] should lead to a kernel panic but strangely it does not and it only leads to freeze. I don't see the kernel panic messages but the system does freeze and I have to use the power button to reboot. It is possible that I am supposed to configure something but have not, maybe I missing something. Could someone tell me what I am missing out on?
Thanks in advance.
Regards, David
On Mon, Feb 7, 2022 at 7:59 PM David Kahurani <k.kahurani@gmail.com> wrote:
I have an Ubuntu system on which I have compiled a kernel and booted into it. I mostly based the config on the old configuration.
I expect that running this command [1] should lead to a kernel panic but strangely it does not and it only leads to freeze. I don't see the kernel panic messages but the system does freeze and I have to use the power button to reboot. It is possible that I am supposed to configure something but have not, maybe I missing something. Could someone tell me what I am missing out on?
echo c > /proc/sysrq-trigger [1]
Did you use the GUI terminal? In my ubuntu, I can see the panic message when I used virtual terminal(Ctrl+Alt+F3).
On Mon, Feb 7, 2022 at 5:00 PM Wonhyuk Yang <vvghjk1234@gmail.com> wrote:
On Mon, Feb 7, 2022 at 7:59 PM David Kahurani <k.kahurani@gmail.com> wrote:
I have an Ubuntu system on which I have compiled a kernel and booted into it. I mostly based the config on the old configuration.
I expect that running this command [1] should lead to a kernel panic but strangely it does not and it only leads to freeze. I don't see the kernel panic messages but the system does freeze and I have to use the power button to reboot. It is possible that I am supposed to configure something but have not, maybe I missing something. Could someone tell me what I am missing out on?
echo c > /proc/sysrq-trigger [1]
Thanks, this could help too. I figured I could use kdump to save the dmesg logs but it doesn't seem to work with later kernels.
Did you use the GUI terminal? In my ubuntu, I can see the panic message when I used virtual terminal(Ctrl+Alt+F3).
On Tue, 08 Feb 2022 08:03:56 +0300, David Kahurani said:
I figured I could use kdump to save the dmesg logs but it doesn't seem to work with later kernels.
kdump is probably overkill for just saving dmesg. If you're booting x86_64 in UEFI mode, using pstore to save the dmesg is probably a lot easier. What I have in .config: [~] zgrep -i pstore /proc/config.gz | grep ^C CONFIG_EFI_VARS_PSTORE=y CONFIG_PSTORE=y CONFIG_PSTORE_DEFAULT_KMSG_BYTES=65536 CONFIG_PSTORE_DEFLATE_COMPRESS=y CONFIG_PSTORE_COMPRESS=y CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" CONFIG_PSTORE_CONSOLE=y CONFIG_PSTORE_PMSG=y CONFIG_PSTORE_RAM=y On most crashes and hangs, after reboot you'll find the dmesg logs in /sys/fs/pstore Note that you'll probably want to set up something that auto-recovers the data during reboot, as there's only a limited amount of UEFI storage available, so you can end up not getting messages if the space fills up. (The alignment varies because of loglevel info, you might want something like: cut -f2- -d'[' /sys/fs/pstore/* | sort -n | sed -e 's/^/[/' > pstore.`date +%m%d%y-%H%M` rm /sys/fs/pstore/* (You need the rm because if you don't, the next time you'll get 2 interleaved dmesgs from different boots and nothing will make sense :) Alternatively, use the timestamps in the filenames to disambiguate the various crashes....
participants (3)
-
David Kahurani -
Valdis Klētnieks -
Wonhyuk Yang