Re: [PATCH] nbcon/reboot: Flush nbcon consoles synchronously on reboot
From: Petr Mladek
Date: Fri Oct 09 2026 - 11:29:12 EST
On Fri 2026-10-09 15:34:30, John Ogness wrote:
> On 2026-10-09, Petr Mladek <pmladek@xxxxxxxx> wrote:
> > Anyway, IMHO, we should switch to NBCON_PRIO_EMERGENCY for the post-running
> > states and flush the pending messages immediately. It is more
> > reliable. It is easy to find the locations when system_state() is set.
> > And all follow-up printk() calls will try the direct flush so that
> > they won't rely on an explicit flush.
>
> We need to be careful about abusing CPU state in order to get certain
> functionality. We already have things in place to gracefully switch to
> atomic after shutting down the printing kthreads.
This explains why I see the messages even without this patch.
I wonder what is actually going on in the test.
The log contains:
</paste>
LKP: ttyS0: 256: LKP: tbox cant kexec and rebooting forcely
</paste>
I see this message in lkp-tests/bin/lkp-setup-rootfs:
<cat lkp-tests/bin/lkp-setup-rootfs>
lkp_reboot()
{
local tbox_state="rebooting"
[ -n "$1" ] && tbox_state="rebooting_$1"
set_tbox_wtmp $tbox_state
# Avoid get stuck in yocto minimal rootfs.
# LKP: rebooting
# [ 8.124081] LKP: rebooting
# # (shell prompt)
is_virt && [ -e '/proc/sysrq-trigger' ] && {
sync
echo s >/proc/sysrq-trigger
echo b >/proc/sysrq-trigger
}
start_reboot_watchdog
reboot_tbox 2>/dev/null
exit
}
[...]
if tbox_cant_kexec; then
echo_to_tty "LKP: tbox cant kexec and rebooting forcely"
lkp_reboot "cant_kexec"
fi
</cat lkp-tests/bin/lkp-setup-rootfs>
so, it ends with reboot_tbox which is:
<cat lkp-tests/lib/reboot.sh>
reboot_tbox()
{
reboot
}
</cat lkp-tests/lib/reboot.sh
which is classic reboot. I am not sure where it expects the warning.
I actually can't find the code which prints:
<paste>
BUG: kernel reboot-without-warning in test stage
</paste>
I might need to try reproducing it with the lkp-test framework.
But it has to wait for the next week.
Best Regards,
Petr