Re: ~90s reboot delay with v6.19 and PREEMPT_RT

From: Bert Karwatzki

Date: Thu Feb 19 2026 - 18:11:12 EST


Am Donnerstag, dem 19.02.2026 um 12:53 -0800 schrieb Calvin Owens:
> On Thursday 02/19 at 17:46 +0100, Bert Karwatzki wrote:
> > Since linux v6.19 I noticed that rebooting my MSI Alpha 15 Laptop
> > would hang for about ~90s before rebooting. I bisected this (from
> > v6.18 to v6.19) and got this as the first bad commit:
> > 9311e6c29b34 ("cgroup: Fix sleeping from invalid context warning on PREEMPT_RT")
> >
> > Reverting this commit fixes the reboot delay but introduces these error (which
> > also seem to make the system crash sometimes):
> > [ T0] BUG: scheduling while atomic: swapper/0/0/0x00000002
> >
> > Compiling the kernel without PREEMPT_RT also fixes the issue.
>
> Hi Bert,
>
> I'm not seeing this behavior, there must be more to it than just this.
>
> Could you share your kconfig? The dmesg with initcall_debug will be more
> verbose during shutdown too, that may also help.

I tested v6.19 with initcall_debug and I'm seeing these messages (on startup, there
no extra message during the 90s reboot delay). I put the .config as an attachement in
a gitlab issue (Or should I put it in the mail? It's ~6500 lines):

https://gitlab.freedesktop.org/-/project/26509/uploads/8d1c04bbe0ab121945be7c898d08e1b6/config-6.19.0-stable

2026-02-19T23:37:50.140437+01:00 lisa kernel: [ T16] BUG: sleeping function called from invalid context at kernel/printk/printk.c:3377
2026-02-19T23:37:50.140439+01:00 lisa kernel: [ T16] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 16, name: pr/legacy
2026-02-19T23:37:50.140441+01:00 lisa kernel: [ T16] preempt_count: 0, expected: 0
2026-02-19T23:37:50.140443+01:00 lisa kernel: [ T16] RCU nest depth: 1, expected: 0
2026-02-19T23:37:50.140445+01:00 lisa kernel: [ T16] CPU: 1 UID: 0 PID: 16 Comm: pr/legacy Tainted: G W 6.19.0-stable #1159
PREEMPT_{RT,(full)}
2026-02-19T23:37:50.140446+01:00 lisa kernel: [ T16] Tainted: [W]=WARN
2026-02-19T23:37:50.140448+01:00 lisa kernel: [ T16] Hardware name: Micro-Star International Co., Ltd. Alpha 15 B5EEK/MS-158L, BIOS E158LAMS.10F 11/11/2024
2026-02-19T23:37:50.140456+01:00 lisa kernel: [ T16] Call Trace:
2026-02-19T23:37:50.140458+01:00 lisa kernel: [ T16] <TASK>
2026-02-19T23:37:50.140460+01:00 lisa kernel: [ T16] dump_stack_lvl+0x4b/0x70
2026-02-19T23:37:50.140461+01:00 lisa kernel: [ T16] __might_resched.cold+0xaf/0xbd
2026-02-19T23:37:50.140463+01:00 lisa kernel: [ T16] console_conditional_schedule+0x26/0x30
2026-02-19T23:37:50.140464+01:00 lisa kernel: [ T16] fbcon_redraw+0x9b/0x240
2026-02-19T23:37:50.140466+01:00 lisa kernel: [ T16] ? get_color+0x21/0x130
2026-02-19T23:37:50.140468+01:00 lisa kernel: [ T16] fbcon_scroll+0x165/0x1c0
2026-02-19T23:37:50.140470+01:00 lisa kernel: [ T16] con_scroll+0xf6/0x200
2026-02-19T23:37:50.140472+01:00 lisa kernel: [ T16] ? srso_alias_return_thunk+0x5/0xfbef5
2026-02-19T23:37:50.140474+01:00 lisa kernel: [ T16] lf+0x9f/0xb0
2026-02-19T23:37:50.140475+01:00 lisa kernel: [ T16] vt_console_print+0x2ff/0x460
2026-02-19T23:37:50.140477+01:00 lisa kernel: [ T16] console_flush_one_record+0x21c/0x3e0
2026-02-19T23:37:50.140479+01:00 lisa kernel: [ T16] ? console_flush_one_record+0x3e0/0x3e0
2026-02-19T23:37:50.140481+01:00 lisa kernel: [ T16] legacy_kthread_func+0xc7/0x1a0
2026-02-19T23:37:50.140482+01:00 lisa kernel: [ T16] ? housekeeping_affine+0x30/0x30
2026-02-19T23:37:50.140484+01:00 lisa kernel: [ T16] kthread+0xf7/0x1e0
2026-02-19T23:37:50.140486+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.140487+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.140489+01:00 lisa kernel: [ T16] ret_from_fork+0x20e/0x240
2026-02-19T23:37:50.140491+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.140492+01:00 lisa kernel: [ T16] ret_from_fork_asm+0x11/0x20
2026-02-19T23:37:50.140494+01:00 lisa kernel: [ T16] </TASK>

and

2026-02-19T23:37:50.338878+01:00 lisa kernel: [ T16] BUG: sleeping function called from invalid context at kernel/printk/printk.c:3377
2026-02-19T23:37:50.338880+01:00 lisa kernel: [ T16] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 16, name: pr/legacy
2026-02-19T23:37:50.338882+01:00 lisa kernel: [ T16] preempt_count: 0, expected: 0
2026-02-19T23:37:50.338884+01:00 lisa kernel: [ T16] RCU nest depth: 1, expected: 0
2026-02-19T23:37:50.338893+01:00 lisa kernel: [ T16] CPU: 7 UID: 0 PID: 16 Comm: pr/legacy Tainted: G W 6.19.0-stable #1159
PREEMPT_{RT,(full)}
2026-02-19T23:37:50.338895+01:00 lisa kernel: [ T16] Tainted: [W]=WARN
2026-02-19T23:37:50.338896+01:00 lisa kernel: [ T16] Hardware name: Micro-Star International Co., Ltd. Alpha 15 B5EEK/MS-158L, BIOS E158LAMS.10F 11/11/2024
2026-02-19T23:37:50.338897+01:00 lisa kernel: [ T16] Call Trace:
2026-02-19T23:37:50.338899+01:00 lisa kernel: [ T16] <TASK>
2026-02-19T23:37:50.338901+01:00 lisa kernel: [ T16] dump_stack_lvl+0x4b/0x70
2026-02-19T23:37:50.338906+01:00 lisa kernel: [ T16] __might_resched.cold+0xaf/0xbd
2026-02-19T23:37:50.338908+01:00 lisa kernel: [ T16] console_conditional_schedule+0x26/0x30
2026-02-19T23:37:50.338910+01:00 lisa kernel: [ T16] fbcon_redraw+0x9b/0x240
2026-02-19T23:37:50.338916+01:00 lisa kernel: [ T16] ? get_color+0x21/0x130
2026-02-19T23:37:50.338917+01:00 lisa kernel: [ T16] fbcon_scroll+0x165/0x1c0
2026-02-19T23:37:50.338919+01:00 lisa kernel: [ T16] con_scroll+0xf6/0x200
2026-02-19T23:37:50.338924+01:00 lisa kernel: [ T16] ? srso_alias_return_thunk+0x5/0xfbef5
2026-02-19T23:37:50.338935+01:00 lisa kernel: [ T16] lf+0x9f/0xb0
2026-02-19T23:37:50.338937+01:00 lisa kernel: [ T16] vt_console_print+0x2ff/0x460
2026-02-19T23:37:50.338957+01:00 lisa kernel: [ T16] console_flush_one_record+0x21c/0x3e0
2026-02-19T23:37:50.338960+01:00 lisa kernel: [ T16] ? console_flush_one_record+0x3e0/0x3e0
2026-02-19T23:37:50.338962+01:00 lisa kernel: [ T16] legacy_kthread_func+0xc7/0x1a0
2026-02-19T23:37:50.338964+01:00 lisa kernel: [ T16] ? housekeeping_affine+0x30/0x30
2026-02-19T23:37:50.338965+01:00 lisa kernel: [ T16] kthread+0xf7/0x1e0
2026-02-19T23:37:50.338966+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.338968+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.338972+01:00 lisa kernel: [ T16] ret_from_fork+0x20e/0x240
2026-02-19T23:37:50.338976+01:00 lisa kernel: [ T16] ? kthreads_online_cpu+0x100/0x100
2026-02-19T23:37:50.338978+01:00 lisa kernel: [ T16] ret_from_fork_asm+0x11/0x20
2026-02-19T23:37:50.338980+01:00 lisa kernel: [ T16] </TASK>

These seem to be the same type of messages that commit
9311e6c29b34 ("cgroup: Fix sleeping from invalid context warning on PREEMPT_RT")
is supposed to fix.
When I compile a kernel with 9311e6c29b34 as HEAD I do not get these messages, so
I guess I have to do another bisection here.

Bert Karwatzki