My mid 2011 27″ iMac recently decided that it had tolerated enough abuse from its owner, me. I had upgraded its primary disk to a Crucial M4 256GB solid state drive (SSD) and its memory to 32 GB. Every now and then it runs a full virtualization infrastructure (Citrix XenApp) for my testing purposes.
So what did it do recently? Random kernel panics, applications crashes, failure to locate boot drive (SSD) during boot drive (gray screen with loading bar before shutting down by itself). Initially I thought it was time to replace my two year old iMac. To top it off, the disk structure exhibited some missing links and OSX 10.8.2 (Mountain Lion) determined that it cannot repair the disk on its own and it had to be wiped clean and reinstalled.
At first I thought all these weird issues were due to the partially corrupted disk structure, so I did a clean OSX installation and restored my data from my trusty time machine backups (users, applications, documents, computer settings, etc.). Did it solve the problem? No.
After much googling, it led me to think that it could be issues with the Crucial M4 256 GB SSD instead. Without a tool to test the health of the SSD, I had to do quite a fair bit of reading to see if others had encountered such weird issues.
Viola, I found that most complaint about the crappy firmwares that Crucial has rolled out in recent months after 0309 (100F, 010G, 040H). Some had luck by changing their SSD firmware. Well, why not give it a shot? I downloaded the firmware upgrade ISO, booted up from the CD and upgraded the firmware. The Crucial firmware upgrade process is straight forward – the software will detect eligible SSD, prompt you to upgrade it. Jumped from 100F to 040H, then to 010G, down to 0309 and up to 100F. So did it solve the problem? No.
Next, I started to suspect my RAM dimms are the ones causing the issues. Abrupt application quits, operating system not booting up, corrupted file system / disk structure, etc. It sure sounds like a faulty memory chip. Did a thorough Apple Hardware Test and memory test using MemTest. Both diagnostic software give the RAM dimms a pink state of health. I am simply at my wits end.
PRAM reset is my last resort. So what is PRAM? It is the Parameter Random Access Memory. Apparently it keeps information about the hardware in your Apple hardware and details about which disk to boot from. Did the PRAM reset procedure, it is easy to follow. Just a little tricky with my wireless Apple keyboard but I still managed to do it. So did it solve the problem? Nope.
SMC reset was my last resort. Did the magical 15 seconds power button press without the power, followed by a 5 seconds wait. Top it off with a boot up with my fingers crossed. Nope, it still give me issues.
I left the iMac for bed and attended to it the very next evening.
Did my OSX installation once again and restored most of my data from Time Machine (everything except for the other computer settings or sort). The random reboot and bad directory structure did not appear! It went fine for an hour and passed all the disk utility health checks. My itchy fingers and inquisitive mind led me to restore the “other computer settings” to see what happens. After restoring, the computer restarted while doing disk utility checks. I briefly saw that it pointed to a familiar “IOAHCIBlockStorage”. It appears that the Trim Hack was causing the issue.
Reinstalled OSX (once again). Did all my restores and left out the part that modifies IOAHCIBlockStorage. Did my disk utility checks and everything went fine! The system has been running for the past week and no hickups of any sort.
So if you are using the Trim Hack / Trim Enabler and you are having kernel panic issues / OSX issues. Try reverting the changes and see if it fixes it.