How can I troubleshoot Kernel Panics on my iMac

Solution 1:

If I had to guess, I'd say it was caused by the ntfs driver. Since the driver itself is very stable, I suspect something is going on with your drives that is causing it. I suggest checking your drives' SMART status as well as check in the console to see if there is anything interesting there.

EDIT 5/28/2011:

The mds process is likely the trigger, and it's failing on processing something on one of your NTFS-formatted drives. This could either be Spotlight crashing on reading a file or the driver itself crashing. To determine if the driver is at fault, you could try the NTFS-3G driver (http://macntfs-3g.blogspot.com/ -- they also have a commercial product called Tuxera) and see if the panics continue to occur. (Side benefit: you can write to your NTFS drives.)

Furthermore, have you added or installed any files recently? If there is a specific file that is causing mds to crash, removal of the file should take care of the problem. (That said, mds itself shouldn't cause a full kernel panic.)

The kernel panic here is what tells me that something is either going on at the driver level (which should be the only things that cause panics -- normally) or at the hard-drive level. I would again suggest checking the drive status to determine that a drive isn't failing and causing the Apple NTFS driver to panic. In this case, I would expect the NTFS-3G driver would either throw an error or panic as well. If the drive is failing, it will be visible in your drive's S.M.A.

Solution 2:

Kernel Panics are some of the hardest to debug unless you have one that you know exactly how to trigger it. In that case, it's pretty easy to keep eliminating possibilities until the source is obvious.

Here is the best writeup of Mac specific information on Understanding and Debugging Kernel Panics. It is very technical, so take what you wish and move on to the steps below.

Like anything, it's best to isolate the problem to avoid chasing down thousands of potential causes. It's best to be systematic about how you isolate issues, so here are the two articles I would start with in the case of a kernel panic. You will start with general steps and then isolate software before hardware and eventually reinstall the OS.

  • Isolating issues in Mac OS X - great general reference, links to specific sub articles
  • Mac OS X: How to troubleshoot a software issue

In your specific case - the last code on the stack seems to point to Spotlight (mds) processing NTFS (windows) data so you might pay particular attention to any windows drives that are connected in case there is a relation to the crash. Keep in mind, the stack trace is sometimes wrong and you see some innocent bystander was running on the CPU at the time of the crash. Good Luck!