public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: David Kahurani <k.kahurani@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>,
	Wonhyuk Yang <vvghjk1234@gmail.com>
Subject: Re: Kernel freezes instead of panicking
Date: Tue, 08 Feb 2022 20:30:24 -0500	[thread overview]
Message-ID: <26925.1644370224@turing-police> (raw)
In-Reply-To: <CAAZOf2769+HUrVLwq2OiZ5ucNYNwqmH+3VMmS5QvY1bbOBEgqA@mail.gmail.com>

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....



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2022-02-09  1:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 10:21 Kernel freezes instead of panicking David Kahurani
2022-02-07 10:58 ` David Kahurani
2022-02-07 14:00   ` Wonhyuk Yang
2022-02-08  5:03     ` David Kahurani
2022-02-09  1:30       ` Valdis Klētnieks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26925.1644370224@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=k.kahurani@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=vvghjk1234@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox