Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "HAGIO KAZUHITO(萩尾 一仁)" <k-hagio-ab@nec.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH] makedumpfile: printk: add support for lockless ringbuffer
Date: Fri, 20 Nov 2020 03:10:09 +0106	[thread overview]
Message-ID: <87sg94zsva.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <OSBPR01MB1991BDA9AB4100A661E53CF6DDE00@OSBPR01MB1991.jpnprd01.prod.outlook.com>

On 2020-11-19, HAGIO KAZUHITO(萩尾 一仁)	<k-hagio-ab@nec.com> wrote:
> From: John Ogness <john.ogness@linutronix.de>
>
> Linux 5.10 introduces a new lockless ringbuffer.  The new ringbuffer
> is structured completely different to the previous iterations.
> Add support for retrieving the ringbuffer from debug information
> and/or using vmcoreinfo.  The new ringbuffer is detected based on
> the availability of the "prb" symbol.
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
> ---
> I've updated John's RFC makedumpfile patch to match 5.10-rc4 kernel.
> Changes from the RFC patch:
> - followed the following kernel commit
>     cfe2790b163a ("printk: move printk_info into separate array")
> - divided members of struct printk_log in offset_table into each structure
>   for readability
> - added some error handlings
> - also dump head record that was missed

I confirm that these changes are correct. Thanks for updating this,
adding the needed error handling, and catching that the head record was
missed!

I tested this by:

1. Boot kernel with: crashkernel=512M

2. Setup and trigger crash:

   kexec -p /boot/bzImage --initrd=/boot/rescue-initrd --append="console=ttyS0,115200"
   echo c > /proc/sysrq-trigger

3. From rescue environment, copy crashed vmcore to external machine:

   cp /proc/vmcore /remote/nfs/mount/

4. From external machine, extract kernel log using vmcoreinfo:

   makedumpfile -g ./vmcoreinfo -x ./vmlinux
   makedumpfile --dump-dmesg -i ./vmcoreinfo ./vmcore dmesg1.txt

5. From external machine, extract kernel log using debug symbols:

   makedumpfile --dump-dmesg -x ./vmlinux ./vmcore dmesg2.txt

6. Compare and inspect the kernel logs:

   diff dmesg1.txt dmesg2.txt
   cat dmesg1.txt

John Ogness

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2020-11-20  2:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  2:41 [PATCH] makedumpfile: printk: add support for lockless ringbuffer HAGIO KAZUHITO(萩尾 一仁)
2020-11-20  2:04 ` John Ogness [this message]
2020-11-20  6:16   ` HAGIO KAZUHITO(萩尾 一仁)
2020-11-24 10:41     ` John Ogness
2020-11-24 23:51       ` HAGIO KAZUHITO(萩尾 一仁)
2020-11-25  9:07         ` John Ogness
2020-11-26  0:14           ` HAGIO KAZUHITO(萩尾 一仁)
2020-11-27  0:00             ` HAGIO KAZUHITO(萩尾 一仁)

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=87sg94zsva.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=k-hagio-ab@nec.com \
    --cc=kexec@lists.infradead.org \
    /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