MacOS – How to start the mds process

macosspotlight

Revised Question

I am getting errors that mds cannot be started:

9/18/12 9:04:45.262 AM com.apple.launchd[1]: (com.apple.metadata.mds[4720]) Job appears to have crashed: Segmentation fault: 11

Crash Report: PasteBin

Original Question

I ran cd /System/Library/LaunchDaemons
sudo launchctl load -w com.apple.metadata.mds.plist
which returned com.apple.metadata.mds: Already loaded but when I go to my Activity Monitor and change my filter to All Processes and search for mds I don't see anything, is there a way to force mds to start?

I've tried everything on these sites:

I don't see anything

Best Answer

My guess is that it's launching, then crashing or erroring out in some form. Try sudo launchctl list com.apple.metadata.mds, and look at the PID (id of currently running process, probably 0 since it's not running) and LastExitStatus (which would be 0 if it exited successfully, but may be something else in this case). Also, look at /var/log/system.log (with either Console.app or 'tail') and see if it holds any clues. Also, look in /Library/Logs/CrashReporter for any relevant reports.

As for possible causes: if the logs don't tell you where the problem is, my first guess would be a broken mdimporter plug-in; I'd remove everything (temporarily) from /Library/Spotlight and ~/Library/Spotlight. Also, check /System/Library/Spotlight, and make sure these are the only mdimporters there:

Application Archives Audio Automator Bookmarks Chat CoreMedia Font Image MIDI Mail Notes PDF PS QuartzComposer RichText SystemPrefs iCal iPhoto iPhoto8 vCard

Another possible cause is a badly corrupted spotlight database. If removing suspect mdimporters doesn't get it started, try dismounting everything but the startup volume (& if that solves it, remount them one at a time and see which kills it). If that doesn't do it, try removing the existing spotlight database with sudo mv /.Spotlight-V100 /.Spotlight-V100-disabled (I'm not certain how thoroughly sudo mdutil -E / wipes out the old DB, but renaming it should force a full rebuild).