"rcu_sched self-detected stall on CPU" during boot

There seems to be a noticeable hang during startup while booting my HiFive Unmatched. The following appears in dmesg:

[    8.155368] random: crng init done
[    8.158026] random: 7 urandom warning(s) missed due to ratelimiting
[   28.351305] rcu: INFO: rcu_sched self-detected stall on CPU
[   28.356133] rcu:     0-....: (5248 ticks this GP) idle=95a/1/0x4000000000000002 softirq=1345/1345 fqs=2423 
[   28.365597]  (t=5253 jiffies g=-283 q=3048)
[   28.369766] Task dump for CPU 0:
[   28.372980] task:systemd-udevd   state:R  running task     stack:    0 pid:  151 ppid:   131 flags:0x00000108
[   28.382882] Call Trace:
[   28.385314] [<ffffffe00000576a>] walk_stackframe+0x0/0xe2
[   28.390698] [<ffffffe000ac2bf4>] dump_backtrace+0x4c/0x5a
[   28.396083] [<ffffffe000ac2c26>] show_stack+0x24/0x2c
[   28.401121] [<ffffffe000036a60>] sched_show_task+0x15c/0x180
[   28.406766] [<ffffffe000ac33dc>] dump_cpu_task+0x56/0x60
[   28.412064] [<ffffffe000ac3f44>] rcu_dump_cpu_stacks+0xf4/0x134
[   28.417971] [<ffffffe000075602>] rcu_sched_clock_irq+0x60a/0x794
[   28.423964] [<ffffffe00007e60a>] update_process_times+0xc4/0xf8
[   28.429871] [<ffffffe00008c452>] tick_sched_handle+0x40/0x5a
[   28.435516] [<ffffffe00008ca38>] tick_sched_timer+0x84/0xda
[   28.441075] [<ffffffe00007ef8a>] __hrtimer_run_queues+0x14a/0x22c
[   28.447156] [<ffffffe00007fc72>] hrtimer_interrupt+0xe8/0x254
[   28.452888] [<ffffffe0008fea98>] riscv_timer_interrupt+0x40/0x4a
[   28.458881] [<ffffffe00006855e>] handle_percpu_devid_irq+0x96/0x1a4
[   28.465135] [<ffffffe000062bf8>] __handle_domain_irq+0x8a/0xec
[   28.470955] [<ffffffe000622d9e>] riscv_intc_irq+0x48/0x70
[   28.476340] [<ffffffe0000039ea>] ret_from_exception+0x0/0xc
[   29.723342] rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 0-... } 5378 jiffies s: 69 root: 0x1/.
[   29.733084] rcu: blocking rcu_node structures (internal RCU debug):
[   29.739296] Task dump for CPU 0:
[   29.742507] task:systemd-udevd   state:R  running task     stack:    0 pid:  151 ppid:   131 flags:0x00000108
[   29.752416] Call Trace:
[   29.754789] [<ffffffe000ad1926>] __schedule+0x1d4/0x542
[   33.888558] [drm] amdgpu kernel modesetting enabled.

The boot does continue successfully afterward and everything works fine. It seems to happen before initialization of the AMD GPU driver (a RX550 card is installed, haven’t tested without)?

The kernel is 5.12.4 from the pre-built SDK image. It also happened with 5.11.

lspci:

00:00.0 PCI bridge: SiFive, Inc. Device 0000
01:00.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
02:00.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
02:02.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
02:03.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
02:04.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
02:08.0 PCI bridge: ASMedia Technology Inc. Device 2824 (rev 01)
04:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]

All in all everything works perfectly*, so it is not a big deal (just a little slower boot), but reporting it just in case the stall covers a potential deeper issue.

* - not entirely, see Intermittent kernel oops under heavy load, but that appears to be entirely unrelated

It’s indeed GPU related. I’ve disconnected the graphics card and the boot is much faster, and no stall message in the kernel log.