Resolving Kernel Panics

The "You need to restart your computer" alert indicates a kernel panic. This FAQ, based on the "Kernel Panics" chapter of our book Troubleshooting Mac® OS X, provides a set of procedures which should resolve most kernel panics.

Additional information, including how to use and interpret panic logs for troubleshooting, can be found in the "Kernel Panics" chapter of Troubleshooting Mac OS X.

Before you begin...

The procedures defined herein constitute a testing road map and should be followed in the order specified. Read this FAQ thoroughly before proceeding in order to familiarize yourself with the steps and assure you have the necessary resources available.

WARNING: Some of the testing procedures defined in this FAQ may require that you:

  • Connect and disconnect peripheral devices.
  • Work inside your computer.

Follow all safety instructions specified in the Apple® manual which accompanied your Mac.

In particular:

  • Shut down your Mac and disconnect external power before working inside your Mac.
  • Remove the battery before working inside a laptop or portable computer.

Consult the manual that shipped with your Mac for all safety procedures.

Always follow all Apple-recommended safety procedures without fail.

Causes of kernel panics

General causes of kernel panics

Kernel panics are often caused by one or more of the following issues.

  • Defective or incompatible RAM are the most frequent causes of kernel panics. Despite being a highly-reliable product, RAM can fail. Modern operating systems, like Mac OS X, are sensitive to RAM. Purchase additional RAM from either Apple or third parties who guarantee their RAM is compatible with Mac OS X, offer a liberal exchange policy, and provide a lifetime warranty should the RAM become defective or a later version of Mac OS X introduce incompatibilities.
  • Incompatible, obsolete, or corrupted kernel extensions. If a third-party kernel extension or one of its dependencies is incompatible or obsolete with respect to the version of Mac OS X you are using, kernel panics may occur when the kernel executes such extensions. Likewise, if a kernel extension or one of its dependencies is corrupted, such as the result of hard disk corruption, kernel panics are likely to occur when the kernel attempts to load or execute such.
  • Incompatible, obsolete, or corrupted drivers. Similar to kernel extensions, drivers for third-party hardware which are incompatible with the version of Mac OS X you are using, or which have become corrupted, will cause in kernel panics.
  • Hard disk corruption, including bad sectors, directory corruption, and other hard-disk ills.
  • Incorrect permissions on System-related files or folders.
  • Insufficient RAM and available hard disk space.
  • Improperly installed hardware or software.
  • Defective hardware or software. Hardware failures, including a defective CPU, or programming errors can result in kernel panics.
  • Incompatible hardware. While rare, this is generally the result of a third-party hardware vendor’s product failing to properly respond to the kernel or a kernel extension in an expected way.

Specific causes of kernel panics

The follow specific issues, including a variety of Mac OS X bugs, are known to cause kernel panics. If none of the following issues apply, proceed to the "Troubleshooting kernel panics" section.

Troubleshooting kernel panics

General advice for resolving kernel panics and other startup problems can be found in the AppleCare Knowledge Base document "Your Mac won't start up in Mac OS X." If the instructions in this AppleCare Knowledge Base document do not resolve the issue, try the following steps:

1. Rule out major hardware problems

Kernel panics frequently result from major hardware problems with your Mac. To rule these out, follow the instructions in our "Apple Hardware Test" FAQ to run the Apple Hardware Test distributed with Macintosh® computers manufactured in recent years. In particular, consider the instructions for running the test in Loop Mode which, if supported, is often effective in identifying hardware-related causes of intermittent kernel panics.

If you Mac predates the distribution of the Apple Hardware Test, our "Apple Hardware Test" FAQ also recommends third-party utilities for hardware testing.

If the Apple Hardware Test or your third-party hardware-testing utility identifies problems with RAM, remove the RAM DIMMs (Dual Inline Memory Modules, colloquially known as "sticks") indicated as having failed the hardware test.

If the Apple Hardware Test or your third-party hardware-testing utility identifies problems other than RAM, have these repaired.

Notes about RAM testing
  • If kernel panics have occurred immediately after installing new RAM, assure the DIMMS are properly installed and correctly seated in their expansion slots,  the sockets into which the DIMMs are installed. 
  • While the Apple Hardware Test will almost invariably find defective RAM, there have been situations where defective RAM has been missed. As RAM problems are the leading cause of kernel panics, you may wish to perform additional RAM tests. Additional methods of testing RAM include third-party RAM tests and testing by process of elimination.
    • Third-party RAM tests. Third-party utilities which provide RAM testing include:
      • Micromat TechTool® Pro and TechTool Deluxe, the latter provided with an AppleCare Service Plan.
      • The freeware command-line utility Memtest. The freeware utility Rember provides a graphical user interface (GUI) to Memtest.
    • Testing RAM by process of elimination. You can test individual RAM DIMMs by process of elimination:
      • If your Mac has multiple RAM DIMMs, you can remove all but one and retest your Mac to see if kernel panics recur. If kernel panics do not recur, reinstall a second RAM DIMM and retest. Repeat this process until you have tested all of your RAM. If kernel panics recur at any point, the last DIMM you reinstalled is probably defective and should be replaced.
      • You can also test a known, good DIMM in different expansion slots to help rule out the possibility of a defective slot.
  • Some Macintosh computers, including iBook® and iMac models, have factory-installed RAM, either directly installed on the logic board or in a factory-only accessible memory slot. This RAM cannot be removed for testing purposes. If this RAM proves to be defective, your Mac must be taken in for service. You can only test RAM by process of elimination if that RAM is installed in the user-accessible memory slots in your Mac. Consult the manual which came with your Mac for details and instructions concerning installing and removing RAM.

2. Repair disk and permissions on your Mac OS X startup disk

Run Steps 1-3 of our "Resolving Disk, Permission, and Cache Corruption" FAQ to assure that your Mac OS X startup disk is free of problems.

3. Assure you have sufficient RAM and available disk space

See our "Problems from Insufficient RAM and Free Hard Disk Space" FAQ.

4. Rule out Startup Items or Login Items

Corrupted or incompatible Startup Items or Login Items can cause kernel panics. Follow the procedure specified in our "Troubleshooting Startup and Login Items" FAQ to ascertain if these are causing kernel panics.

5. Rule out an incompatible, defective, or corrupted third-party application

If kernel panics consistently occur when using a specific application:

  • Check the Web site of the application’s developer, publisher, or vendor for updates to the application. Install updates if available.
  • Uninstall, then reinstall the application and any available updates.
  • Contact the application’s developer, publisher, or vendor for further advice.

6. Eliminate other potential hardware problems

6.1. Assure drivers and kernel extensions for third-party hardware are current

If you have installed third-party hardware or peripherals that required you to also install specific, vendor-provided software, such as drivers or kernel extensions, to support that hardware under Mac OS X, check the vendor's Web site to assure you have the latest version of the required software. If the version of the required software installed on your Mac is not current, install the latest version.

Examples of such vendor-provided software include:

  • Drivers or customization utilities for third-party mice or keyboards.
  • Drivers for third-party broadband modems, such as USB-attached cable or DSL modems.
  • Drivers for third-party SCSI- or PCI-based cards.
  • Drivers for the retail versions of third-party video cards.
6.2. Verify connections, cables, and proper installation

Following all of the safety instructions documented in the Apple manual which accompanied your Mac, assure all connections and cables associated with peripherals or internal hardware additions you have installed are good.

If you have installed new hardware inside your computer, such as a new video card, hard disk, or AirPort® card assure that these devices are properly installed.

6.3. Remove peripherals and third-party hardware additions

Incompatible hardware -- peripherals and hardware additions -- or vendor-provided software related to such -- such as kernel extensions -- can cause kernel panics. Ruling out these items by process of elimination is required if testing to this point has not resolved kernel panics.

  1. Following all of the safety instructions documented in the Apple manual which accompanied your Mac, remove all hardware additions you have made to your Mac:
    1. Remove all peripherals -- USB, FireWire®, and related devices -- except the Apple mouse, Apple keyboard, and monitor.
    2. If you have added other internal devices -- such as third-party PCI or other cards -- remove these as well.
    3. Note: Some hardware or peripherals you have added to your Mac may have also required you to install vendor-supplied software, such as drivers or kernel extensions, to support that hardware under Mac OS X. If you are removing hardware that required associated software to be installed, you should also uninstall that software. Consult the documentation that came with the third-party hardware and its software for instructions on uninstalling the associated software.
  2. Start up your Mac and see if the kernel panic recurs. If the panic does not recur, the cause was likely a problem related to one of the hardware additions, or its associated software, you removed in step (1).
  3. Shut down your Mac. Reconnect or reinstall one of the removed hardware components, again following all of the safety instructions documented in the Apple manual which accompanied your Mac. If vendor-provided software is required for this component, install the latest available version of that software as well.
  4. Restart your Mac. If the kernel panic recurs, the last hardware component you added, or its associated software, if any, is the culprit. Remove this component and uninstall any associated vendor-provided software.
  5. Repeat steps (3)-(4) until you have reconnected or reinstalled all of the hardware components and any associated vendor-provided software removed in step (1) except those which caused kernel panics.
  6. Contact the manufacturer of the component(s) responsible for the panics, or check their Web sites, for updated drivers or further advice.

If all else fails...

If you have followed all of the troubleshooting steps above and none of the steps have either uncovered a cause or resolved the kernel panics, the following are your remaining options:

  1. Reinstall Mac OS X using the Archive and Install process. See our "General advice on performing an Archive and Install" FAQ.
  2. Perform an Erase and Install of Mac OS X.
    1. Backup your personal data using your comprehensive backup and recovery solution.
    2. Erase your Mac OS X startup disk using the options to "Zero Out Data" or "Zero All Data" depending on the version of Mac OS X you are using. See the following AppleCare Knowledge Base documents:
      1. Tiger: "Disk Utility Help: Erasing a disk or volume."
      2. Panther: "Mac OS X 10.3 Help: Erasing a disk or a volume."
      3. Jaguar: "Mac OS X: How to Zero All Data on a Disk."
    3. Reinstall Mac OS X using the Erase and Install option.
    4. Reinstall your third-party applications, omitting the following types of third-party applications:
      1. Interface modifications: hacks or "haxies."
      2. Menu Extras: the icons on the right side of the Apple menu bar.
    5. Restore the data you backed-up in step (a).
  3. Take your Mac in for service. If there is an Apple Retail Store in your area, we recommend taking your Mac there. Otherwise, you may be able to find an Apple Authorized Service Provider (AASP) in your area. To locate an AASP:
    1. In the US, search this page.
    2. If you are outside the US, see this page or contact Apple for assistance.

Using and interpreting panic logs

Comprehensive advice on using and interpreting panic.log files can be found in the "Kernel Panics" chapter of Troubleshooting Mac® OS X.

Obtaining help with kernel panics

Kernel panics usually generate a file called panic.log in the Computer > Macintosh HD > Library > Logs folder. [1] The panic.log file contains the logs from all panics, with the most recent at the end of the file.

If you have performed all of the troubleshooting steps specified above in the Troubleshooting kernel panics section of this FAQ, and the source of the kernel panics remains unidentified, then you can post recent panic logs to the Apple Discussions for analysis.

We recommend that you do not post the panic log until after you have performed all of the tests recommended above in the Troubleshooting kernel panics section. Otherwise, you will probably be referred back to this FAQ to perform the tests.

Copy and paste the most recent panics from the end of the panic.log file into either:

  • a new reply to the thread on the Apple® Discussions which directed you to this FAQ;
  • a new topic on the appropriate Apple Discussion:

If any of the tests revealed problems, be sure to note that in your post. Likewise, if the panics consistently occur when using a specific application, be sure to note that application in your post, including its name and the version of the application you are using.

Note: If your Mac has experienced multiple kernel panics, remember that the panic.log file contains a panic log for each kernel panic. Post only the most recent panic logs, which will be at the end of the panic.log file. For example, post just the panic logs from kernel panics which occurred today.

Related links

Notes

[1] There are three exceptions which prevent automatic panic logging:

  • If a kernel panic occurs immediately after the startup tone sounds, a panic log may not be written as the file system has yet to be mounted.
  • If remote debugging has been enabled via the debug parameter in boot-args, automatic panic logging is disabled.
  • If the kernel panic is the result of corrupted components of the kernel itself, such as code associated with writing to hard disks or other I/O (Input/Output) peripherals.
Did you find this FAQ helpful? You will find a wealth of additional advice for preventing or resolving Mac OS X problems in Dr. Smoke's book, Troubleshooting Mac® OS X.
Use of this site signifies your agreement to the terms of use.
Copyright © 2003-2008 The X Lab. All rights reserved.