I know what a kernel panic is, but I've also seen the term "kernel oops". I'd always thought they were the same, but maybe not. So:
What is a kernel oops, and how is it different from a kernel panic?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
An "oops" is a Linux kernel problem bad enough that it may affect system reliability.
Some "oops"es are bad enough that the kernel decides to stop running immediately, lest there be data loss or other damage. These are called kernel panics.
The latter term is primordial, going back to the very earliest versions of Linux's Unix forebears, which also print a "panic" message on the console when they happen. The original AT&T Unix kernel function that handles such conditions is called
panic(). You can trace it back through the public source code releases of AT&T Unix to its very first releases:
The Unix V4 implementation of
panic() was released in 1973. It basically just prints the core state of the kernel to the console and stops the processor.
That function is substantially unchanged in Unix V3 according to Amit Singh, who famously dissected an older version of Mac OS X and explained it. That first link takes you to a lovely article explaining macOS's approach to the implementation of
panic(), which starts off with a relevant historical discussion.
The "unix-jun72" project to resurrect Unix V1 from scanned source code printouts shows a very early PDP-11 assembly version of this function, written sometime before June 1972, before Unix was fully rewritten in C. By this point, its implementation is whittled down to a 6-instruction routine that does little more than restart the PDP-11.
An oops is a specific error the kernel encounters. An Oops contains the following information:
Oops is a way to debug kernel code, and there are utilities for helping with that. A kernel panic means the system cannot recover and must be restarted. However, with an Oops, the system can usually continue. You can configure klogd and syslogd to log oops messages to files, rather than to std out.