How to debug the cause of infrequent freezes of my iMac?

15,262

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.

Share:
15,262

Related videos on Youtube

LearnCocos2D
Author by

LearnCocos2D

Developer of OpenGW, a game world simulation engines / entity component system with Model-View-Controller architecture that can be used with any rendering engine. Developer of Kobold Kit, the Sprite Kit game engine with tilemap support, game components, scheduling and event dispatching, and all the other things missing from Sprite Kit. Developer of KoboldTouch (commercial) and Kobold2D (free), both game engines build on cocos2d-iphone. KoboldTouch adds MVC and component support and even improves cocos2d's own features, such as Tilemap rendering. Author of the Learn Cocos2D book series published by Apress. The latest edition "Learn cocos2d 2" uses cocos2d 2.0 with ARC enabled and also covers Kobold2D. Steffen's main website is Learn Cocos2D.

Updated on September 17, 2022

Comments

  • LearnCocos2D
    LearnCocos2D almost 2 years

    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!

    • LearnCocos2D
      LearnCocos2D over 13 years
      upps, sorry for posting that on the wrong StackX ...
  • LearnCocos2D
    LearnCocos2D over 13 years
    I have iStat menus running, it's definitely not overheating. I'm worried it might be the RAM so I'll check that.
  • LearnCocos2D
    LearnCocos2D over 13 years
    Great info! I did not know you could SSH into a (GUI) locked Mac. Good to know that Mac install disks have hardware diagnostics, and it's also the first time I heard about a safe mode. That one I'll certainly try to see if it makes the freezes disappear.
  • Gordon Davisson
    Gordon Davisson over 13 years
    If possible, try SSHing into the Mac while it's running normally, then just leaving the session open -- there's a noticeable chance that DirectoryService is involved in the lockup, which means no new authentication, but existing authenticated sessions might keep working. Actually, SSHing in, then doing a sudo -s (so you're already authenticated as root) might be even better.
  • LearnCocos2D
    LearnCocos2D about 12 years
    FWIW: I nailed it down to one of the DIMM modules being defective. Now the machine is pretty stable with a little less memory.