News: 0001664290

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux Lands Fix for Rare, Varying SMP Boot Hangs Affecting Kernels Since 2024

([Linux Kernel] 5 Hours Ago KThreads NBCON)


Among the flurry of last minute patch activity ahead of tomorrow's presumed [1]Linux 7.3 stable kernel release is a fix for addressing some rare hangs at boot time. The reports varied but ultimately tracked down to a kernel change made two years ago.

Various bug reports have come about for common place SMP systems hanging on boot and was ultimately narrowed down to the non-blocking console "NBCON" code. To avoid these boot hangs, moving the start of the NBCON console printing KThreads to later in the boot process avoids these possible system hangs.

Linutronix engineer John Ogness explained in the now-merged [2]fix of postponing the KThread start-up:

"There have been various bug reports related to SMP systems hanging on boot. The reports vary but seem to have some overlap with regard to missed IPI's during SMP setup. The reports also show that reverting NBCON console usage allows the bugs to disappear.

The NBCON kthreads for console printing are started very early during boot using early_initcall(). Since these kthreads are asynchronously enabling/disabling interrupts during early boot, they may be interfering with early SMP setup on some hardware platforms.

Starting the console printing kthreads later has shown to avoid the hanging on systems that could previously reproduce the issue.

Postpone kthread starting until after all arch initcalls have completed."

This is treated as a fix for Linux kernel code present since September 2024 when printer KThreads were first introduced in the printk() code. Thus will presumably be back-ported in the days ahead from Linux 7.3 to other currently supported kernel branches.



[1] https://www.phoronix.com/search/Linux+7.3

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f339c46f153184570f16c8e789c9709b14cbe8b



Violence is molding.