Macos – How to debug the cause of infrequent freezes of the iMac

crashdebugfreezemacos

I have an iMac that freezes up on me irregularly. Sometimes I can work for two weeks and everything is fine. Other times I experience 3 or more freezes a day. On average my iMac (bought in June 2010) freezes about once every other day, so the problem is persistant enough to really, really bother me. And when I say freeze, I mean it locks up. No reaction to input, mouse cursor isn't moving, the screen is completely frozen – so all I can do is shut off power and restart.

I've already uninstalled a few apps that I thought might be the cause but to no avail. In my desperation I even hooked up my iMac to a different power outlet not used by all the other equipment. Haven't had a freeze since but I've just done that 10 minutes ago, so… 🙂

On Windows, you could download the debug symbols and then debug the crash dump to at least get an idea what might be causing a bluescreen. On Mac OS X, all I learned so far is that there's a "last" command which shows me a history of shutdowns and crashes.

Is there any other way I can get more information about the freezes, or more info out of the last command? Can I put my OS into debug mode somehow and could that help me nail down the cause?

What are some diagnostic tools you would recommend to check if it's a hardware related problem?

I'm desperate and thankful for any tips!

Best Answer

OS X logs kernel panics (equivalent to bluescreen) to /Library/Logs/DiagnosticReports (under 10.6) or /Library/Logs/PanicReporter (10.2-10.5); see Apple's KB article #HT1392.

But from your description, it doesn't sound like a panic, it sounds like some critical system process is locking up without actually crashing. This is somewhat nastier to debug, as there's no "event" to trigger logging, etc. Depending on how completely the computer's locked up, you might be able to e.g. SSH in and check out what's going on while it's locked, but that'll only work if it's just the GUI that's locked.

So, I'll turn to diagnostic tools. First, try running the hardware diagnostic that comes on the install DVD(s) that came with the Mac. Depending on what version of OS X your computer shipped with, put in either Mac OS X Install Disc 1 (through 10.5.4) or Applications Install Disc 2 (10.5.5 or later), then boot holding down the D key; see KB #HT1509 for details.

I'd also try running a good RAM test. I like memtest, which isn't free but is only $1.39. You can also get it with AppleJack (you have to use the Customize option in the installer to include memtest); AppleJack can also run some other useful diagnostic/rebuild processes that're worth running through.

Also, you might try running the computer in Safe Mode by booting with the Shift key down (see KB #HT1564 and #HT1455) -- this disables noncritical system extensions, third-party daemons, and a bunch of other possibly-problematic system components. You'll be missing some functionality (IIRC sound and wireless networking both get disabled), but if you can run in this mode for a few days (/until it crashes) it'll give you a better idea if the problem is coming from one of the things that get disabled in Safe Mode.

Related Question