Kernel panic

From Wikipedia, the free encyclopedia

The Mac OS X kernel panic alert
Enlarge
The Mac OS X kernel panic alert
Kernel panic on a Linux 2.6 kernel
Enlarge
Kernel panic on a Linux 2.6 kernel

A kernel panic is a message displayed by an operating system upon detecting an internal system error from which it cannot recover; the term is largely specific to Unix and Unix-like systems, as well as the Unix successor Plan 9. The kernel routines that handle panics (in AT&T-derived Unix source code, a routine known as panic()) are generally designed to dump debugging information to either the screen or a specified file and then freeze the computer. The information provided is not always useful to the end user, but can sometimes provide troubleshooting data for a system developer or tech support personnel.

Attempts by the operating system to read an invalid or unpermitted memory address are a common source of kernel panics. A panic may also occur as a result of a hardware failure or a bug in the operating system.

The kernel panic was introduced in an early version of Unix, and demonstrated a major difference between the design philosophies of Unix and its predecessor Multics. Multics developer Tom van Vleck recalls a discussion of this change with Unix developer Dennis Ritchie:

I remarked to Dennis that easily half the code I was writing in Multics was error recovery code. He said, "We left all that stuff out. If there's an error, we have this routine called panic, and when it is called, the machine crashes, and you holler down the hall, 'Hey, reboot it.'"[1]

The original panic() function was essentially unchanged from V5 to the VAX-based 32V and output only an error message with no other information, then dropped the system into an endless idle loop. As the Unix codebase was enhanced, the panic() function was also enhanced to dump various forms of debugging information to the terminal.

A kernel panic usually takes the form of a text dump to the main screen of the computer, sometimes overwriting any graphical content on the screen. A notable exception is that of later versions of Mac OS X, which generally hide the text dump behind a message to reboot the system; the debugging information is still available as a logfile.

[edit] Kernel panic in other operating systems

While "kernel panic" is the term preferred for Unix-based operating systems, the reporting of unrecoverable errors in other systems have other names:

[edit] External links