public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Derek Barbosa <debarbos@redhat.com>
Cc: pmaldek@suse.com, williams@redhat.com, john.ogness@linutronix.de,
	tglx@linutronix.de, linux-rt-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: test 1: was: Re: A Comparison of printk between upstream and linux-rt-devel
Date: Mon, 26 Aug 2024 16:02:34 +0200	[thread overview]
Message-ID: <ZsyK-s2D8eqqBrXU@pathway.suse.cz> (raw)
In-Reply-To: <Zsjd0WUNIU8_kprt@debarbos-thinkpadt14sgen2i.remote.csb>

On Fri 2024-08-23 15:06:57, Derek Barbosa wrote:
> Hi,
> 
> On Fri, Aug 23, 2024 at 12:19:13PM +0200, Petr Mladek wrote:
> > Could you please also share the kernel command line? I can't find it
> > anywhere.
> > 
> > Especially I am interested whether it:
> > 
> >   + wanted to show backtraces on all CPUs via "panic_print" parameter.
> 
> Sure, here's the output of cat /proc/cmdline on the stock kernel
> 
> BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.11.0-0.rc3.20240814git6b0f8db921ab.32.eln142.x86_64 
> root=/dev/mapper/cs_rt--qe--06-root ro 
> crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M 
> resume=/dev/mapper/cs_rt--qe--06-swap rd.lvm.lv=cs_rt-qe-06/root rd.lvm.lv=cs_rt-qe-06/swap 
> console=ttyS0,115200
> 
> >   + did a crashdump or a reboot.
>  
> Yes, with kexec-tools and kdump configured, we succesfully booted into the
> kdump kernel and rebooted every time as well as generated vmcores.
>
> In fact, examining said vmvcore-dmesg.txt log, we are able to see the final
> trace printed. It is simply through the serial console that we are unable to.

I see. This probably explains why the result of the stock kernel was so bad.

There are two tricks which increases the chance to see panic
messages on legacy consoles:

    1. bust_spinlocks() causes that con->write() callbacks ignore
       port->lock.

       This helps only when console_trylock() succeeds in printk().
       Also the serial port must be in a state which allows to see
       the data written by con->write().

       This does not help in NMI


    2. console_flush_on_panic() ignores even console_lock()
       It tries to call console drivers even in NMI context.

       This would likely allow to see the panic bracktrace even
       on stock kernel. But it _not_ called when crashdump is
       called.

> I will attach the vmcore-dmesg.txt. I also just did another run of
> console_blast, capturing the output from invocation to reboot.
> >
> >   + used also another console (graphics).
> 
> No, I solely used a serial console at ttyS0 at 115200 baud.

I see.

> > Do you miss the backtrace from the panic-CPU or non-panic-CPUs or
> > both?
> 
> I am not 100% certain. I included the two attachments, which may have your
> answer.
> >
> > The dump of the backtraces on non-panic-CPUs might have been affected
> > by the regression fixed earlier this week via
> > https://lore.kernel.org/r/20240812072703.339690-1-takakura@valinux.co.jp
> 
> Excellent. Is this included in the latest rt-devel tree? I can build that kernel
> and run it through the gambit of tests again.

Not needed. The tests were not affected by the bug because you did not use
"panic_printk" parameter on the command line.

> > Did the system reboot in the end?
> > Or does it got stuck somewhere?
> 
> The system always reboots.

Great.

> If you have any other questions, please let me know. I would be happy to re-do
> these tests with different kernels, configs + other variables and controls.

It might be interesting to redo the 1st test without the crashdump.
I wonder if console_flush_on_panic() would allow to see the panic
backtrace with the stock kernel.

But it is not important. The most important thing is that the new
nbcon consoles are clearly better and more reliable at least in
the tested scenarios.

Best Regards,
Petr

  reply	other threads:[~2024-08-26 14:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 16:32 A Comparison of printk between upstream and linux-rt-devel Derek Barbosa
2024-08-23  7:09 ` Sebastian Andrzej Siewior
2024-08-23 18:45   ` Derek Barbosa
2024-08-23  7:11 ` Sebastian Andrzej Siewior
2024-08-23 10:19 ` test 1: was: " Petr Mladek
2024-08-23 19:06   ` Derek Barbosa
2024-08-26 14:02     ` Petr Mladek [this message]
2024-08-26 14:46       ` Derek Barbosa
2024-08-26 15:08         ` Petr Mladek
2024-08-26 16:56           ` John Ogness
2024-08-26 17:05             ` Derek Barbosa
2024-08-26 18:00               ` John Ogness

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=ZsyK-s2D8eqqBrXU@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=debarbos@redhat.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=pmaldek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.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