Diagnose and recover from a coreservicesd hang

Oct 17, '03 09:55:00AM

Contributed by: rrrus

I recently had a series of lockups on my Mac OS X 10.2.8 dual 1.25 G4 system. It started with Finder hanging whenever I clicked on a certain folder on my system. This folder contained two apps and several folders containing JPEG photos -- nothing all that out of the ordinary. When the Finder would hang, other apps would start to hang as well, like the Dock and LaunchBar, two apps with which I could launch Terminal. Eventually, all apps would hang and the spinning beachball of death would remain.

ssh-ing into the machine, I discovered that the process coreservicesd was consuming 100% of one of the CPUs. I could kill this process and it would unhang the system, but then no icons would be displayed on any apps, and drag-and-drop would no longer work. The only way to fix this new mode was to reboot. Then clicking on the original folder would cause the hang again. I tried rebooting using the installer disk and ran Disk Utilities, only to find no errors on the disk. I tried rearranging the folder via Terminal to find that the app inside was the culprit. So, I moved it to the trash and deleted it. Upon reboot, the system would hang when logging in. coreservicesd was the culprit again, only now it would do it at login!

Some further poking around, using Find to find files that had changed in the last day, I found files in /Library/Caches had changed. Since coreservicesd seems to be responsible for providing icons and such to apps, this seemed a likely source. Renaming the folder and rebooting fixed the problem! So, it appears that files in /Library/Caches can get corrupted and cause coreservicesd to get wedged which freaks the whole system out, since it seems as though all apps use this service.

If this happens to you, check here. Also, for other issues that may arise one day, try finding files that have been modified in the last day to see what has changed.

Comments (26)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2003101415481414