New systemd update will bring Windows’ infamous Blue Screen of Death to Linux

'Windows' infamous "Blue Screen of Death" is a bit of a punchline. People have made a hobby of spotting them out in the wild, and in some circles, they remain a byword for the supposed flakiness and instability of PCs. To this day, networked PCs in macOS are represented by beige CRT monitors displaying a BSOD. But the BSOD is supposed to be a diagnostic tool, an informational screen that technicians can use to begin homing in on the problem that caused the crash in the first place; that old Windows' BSOD error codes were often so broad and vague as to be useless doesn't make the idea a bad one. Today, version 255 of the Linux systemd project honors that original intent by adding a systemd-bsod component that generates a full-screen display of some error messages when a Linux system crashes. The systemd-bsod component is currently listed as "experimental" and "subject to change." But the functionality is simple: any logged error message that reaches the LOG_EMERG level will be displayed full-screen to allow people to take a photo or write it down. Phoronix reports that, as with BSODs in modern Windows, the Linux version will also generate a QR code to make it easier to look up information on your phone.' -- source: https://arstechnica.com/gadgets/2023/12/linux-distros-are-about-to-get-a-kil... Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, Hamilton, NZ Mobile +64 22 190 2375 https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

On Fri, 8 Dec 2023 11:04:25 +1300, Peter Reutemann quoted:
'Today, version 255 of the Linux systemd project honors that original intent ...'
My Debian Unstable system got systemd 255 (OK, an RC version) on its last upgrade back on November 21: root(a)theon:~ # ls -l /var/cache/apt/archives/*systemd*255* ... -rw-r--r-- 1 root root 3535680 Nov 21 12:42 /var/cache/apt/archives/systemd_255~rc2-3_amd64.deb ... And yes, that includes the new systemd-bsod.service. Phoronix has a good list of the important changes <https://www.phoronix.com/news/systemd-255>. I was intrigued by this one: There's been an overhaul to the way systemd services are spawned. Rather than forking the process that shared all of the manager's memory via CoW before exec'ing the target executable, the new process is now spawned using CLONE_VM and CLONE_VFORK via posix_spawn(). posix_spawn(3) <https://manpages.debian.org/3/posix_spawn.3.html> was defined by POSIX to allow implementation on machines which could not handle a full fork(2) call. However, on Linux, it is implemented via the abovementioned options to the clone(2) <manpages.debian.org/2/clone.2.html> call, just as a more efficient alternative to the traditional *nix fork-followed-by-exec sequence. Also, there is this new use of varlink, which I hadn’t heard of before <https://varlink.org/>.

On Fri, 8 Dec 2023 11:04:25 +1300, Peter Reutemann quoted:
'Windows' infamous "Blue Screen of Death" is a bit of a punchline.'
Apropos that, I just discovered this entertaining little gem <https://www.osnews.com/story/138395/bugcheck2linux-run-linux-in-a-tiny-risc-v-emulator-during-a-windows-bsod/> called “BugCheck2Linux”: during a Windows “Blue Screen” crash, it starts up a tiny RISC-V emulator running a very bare-bones Linux installation, with an extremely limited shell. Could, in principle, be useful for gathering diagnostics on what caused Windows to crash ... or just for running Doom ...

On Fri, 8 Dec 2023 11:04:25 +1300, Peter Reutemann quoted:
'The systemd-bsod component is currently listed as "experimental" and "subject to change." But the functionality is simple: any logged error message that reaches the LOG_EMERG level will be displayed full-screen to allow people to take a photo or write it down. Phoronix reports that, as with BSODs in modern Windows, the Linux version will also generate a QR code to make it easier to look up information on your phone.'
-- source: https://arstechnica.com/gadgets/2023/12/linux-distros-are-about-to-get-a-kil...
Trouble is, systemd-bsod doesn’t work in crashes that render user-space inoperable. So what would be better? How about building the BSOD functionality into the kernel? Yes, it exists, and it’s called DRM_Panic. <https://www.tomshardware.com/software/linux/linuxs-true-bsod-equivalent-drm-panic-is-now-supported-by-the-current-amd-gpus>
participants (2)
-
Lawrence D'Oliveiro
-
Peter Reutemann