“Kernel panic” in Mac OS X is sometimes irritating problem for end-user and sometimes opportunity to improve the code for developers. But for the end-user it may not be easy to find out why and where this problem occurs. There’s interesting unix command found in Leopard, which can find the root to the instability, when kernel panic occurs.

Apple’s description of kernel panic gives some idea of it. According to the website:

A kernel panic is a type of error that occurs when the core (kernel) of an operating system receives an instruction in an unexpected format, or that it fails to handle properly. A kernel panic may also follow when the operating system is not able to recover from a different type of error. A kernel panic can be caused by damaged or incompatible software or, more rarely, damaged or incompatible hardware.

Using the following command, one can get the list of all installed kernel extensions

kextfind -case-insensitive -bundle-id -substring 'com.apple.' -print | more

kextfind
Uploaded with plasq‘s Skitch!

In case of kernel panic, the following options would be interesting:

  1. by Loaded/Loadable, e.g. -authentic, -loadable, valid,
  2. by Executable, Architecture, or Symbol, e.g. -arch, -defines-symbol, -executable,
  3. by Startup Requirement, e.g. -console, -local-root.

More information can be found using man kextfind.

If one finds the probable candidate, one can remove the device or any software or programme associated with it and then reboot. If the kernel panic doesn’t appear again, then one has possibly cured the problem.