Mittwoch, 28. November 2012

Spotlight failing on 10.8.2 (and how to repair that)

After updating my MBP15 to 10.8.2 it started constantly running on 100% CPU. Who needs QA anyway, right Apple?

A quick look into top revealed constantly respawing 'mdworker' threads, process number where already close to 100k.
Console revealed that fact even more, with 50+ messages streaming by every second. 'mdworker' was crashing and immediately respawned by launchd. The crash reports cycled so fast, I needed to do a screen shot to read it:


Ok, the first thing I did is stop spotlight from indexing, and resetting the index:

In the terminal:
sudo mdutil -a -i off
sudo mdutil -E

I put the whole HDD in the privacy tab in the spotlight prefs for good measure. After rebooting the log storm was gone, but Spotlight obviously as well.
I didn't really know I had so much stuff in my application folder, being used to Spotlight. I found myself screaming in frustration, navigating  hierarchically (wow, google spell checking rocks, I entered 'hirachicly' ^^;) though all this crap.

Anyway, I googled around, tried a few fixes and finally found a solution here. In post #60 phobox explains that the errors stemms from the ML sandbox (or failbox as it will come to be known) blocking mdworker from indexing.

The solution:

Append the following to /System/Library/Sandbox/Profiles/system.sb

;;; Spotlight fixes  (allow mach-lookup (global-name "com.apple.ls.boxd"))  (allow mach-lookup (local-name "com.apple.ls.boxd"))

Watch what your doing, by deleting, overwriting or generally messing in this file you can lock yourself out of the OS. 

In true try-all-fixes-at-once-so-that-you-do-not-know-what-helped thoughtlessness, I cleaned my caching folder as well 

sudo rm -r /System/Library/Caches/*


And then did a safeboot to clean up permissions (hold shift key at startup, you will see a progress bar).

Huzza, my spotlight works again! I can again close the lid at the mess in the folders, and just start the app I want to start. ^___^


Keine Kommentare:

Kommentar veröffentlichen