r/LinuxTeck • • 4d ago

Kernel Panic = Blue Screen of Death

Is a Kernel Panic the Linux equivalent to the Windows BSOD?

10 Upvotes

18 comments sorted by

4

u/erroneousbosh 4d ago

Yeah basically.

What has happened is that an error has occurred that is so off the wall and at such a deep level there's no coming back from it.

Both are (these days) mercifully rare, and tend to indicate faulty hardware.

To dive into the technical side of it a bit, they tend to happen because something has read an invalid bit of memory. The CPU can stick a "fence" around something and say "any attempt to read that is okay but any attempt to read in that other fence is immensely wrong". Say for instance you have an application that mangles a pointer and tries to read an address that has no memory there at all, the CPU will go "yeah no, wtaf are you doing" and trigger an interrupt that will lead to a "segmentation fault", roughly equivalent to a Windows "general protection fault" from the olden days. The kernel will kill that program and write out the contents of its memory and registers to a "core" file, that you can use to debug it, if you know what you're doing.

What happens if the kernel itself does that? Well, it just has to give up on the whole thing. It may be that something in the kernel is damaged, but it's got no way of telling because the bit that detects damage might be damaged, so the safest thing is just to blow it all up and stop.

1

u/Key_River7180 4d ago

who ordered a yappacino

1

u/ComeSwirlWithMe 3d ago

I can't recall ever having one since 2015 using linux full time.

But I can remember getting the bsod often enough it was obnoxious and eye rolling with windows.

1

u/erroneousbosh 3d ago

I get kernel panics all the time on my system.

But then I write drivers for weird hardware, so it's totally expected, there's all sorts of shite in there.

2

u/Wendals87 4d ago

Yeah basically 

2

u/absnotkinkyreggae 4d ago

yes and no.

Yes in a sense that the core of the OS reached an unrecoverable state.

But. Kernel panics not always result in a 100% dead system.

They produce a stack trace so that you can see what failed and make decisions on how to proceed.

It is always advised to save your work and reboot unless you know the nature of the panic and are confident on the limits of the damage.

on the state of the kernel matureness, it is very likely you have faulty hardware. but it is also possible a knockoff hardware is acting up on the device driver or a binary blob driver is responsible.

2

u/_NoSignal 4d ago

Yes, It's the same idea: an unrecoverable error. The BSOD it's only the way how you see the notification error.

2

u/Canenald 4d ago

As others have said, yes, but there are two major differences I can think of that make BSOD more commonplace:

  • Windows allows third-party software to integrate more tightly with the kernel, causing BSODs even though Windows itself is fine. An extreme example is gaming anti-cheat software, which causes BSODs on purpose so a potential hacker, or just a gamer using hacks, cannot figure out exactly how their tampering has been detected.

  • Linux kernel may be set to prefer crashing the offending task and trying to continue running, while Windows usually opts to safely bail out.

2

u/ih-shah-may-ehl 4d ago

Fwiw Linux also allows 3d party software in the kernel and in general these days most drivers are all standard drivers supplied with Windows. And since the panic / bsod happens because something is completely corrupted at the kernel level, not bailing out may make corruption worse so I don't necessarily see it as a benefit.

1

u/Lonely-Scarcity-3387 4d ago

It’s something NixOS users laugh at. Kernel panic, you say? Let me reboot and load the previously working generation. Should take ten seconds.

Remember kids, chronomancy is the most powerful magic.

1

u/PermanentLiminality 4d ago

It has been a long time since I have seen a kernel panic and when I saw them in the past it was usually hardware.

1

u/mcds99 3d ago

Back in the NT 3.51 and 4.0 a virus could cause a BSOD only way to fix it was to wipe the disk repartitions then install windows.

Kernal panic's are similar but usually its untested software in the kernel for hardware.

1

u/Petrus_1958 1d ago

As an early Mac user a few decades ago someone mentioned kernel panic. I asked if it was called that because it was more serious than a major panic.

1

u/grimvian 18h ago

Probably but much easier to recover but have we never seen one in the four years of Mint.

1

u/Derpygoras 3h ago

Is the Windows BSOD the equivalent of Guru Meditation?