Same problem here, drives me NUTS!
I have tried to repair OSX Mountain a few times, with no luck.
I wish there was an easy way to go back to 10.8.1 where I didn't had this problem.
The problem was getting so worse that I bought an SSD drive to make the macbookpro (early 2008) faster. Just to keep up with the logfile being filled.
I also have cleaned my PRAM several times. But the problem comes back.
Even after a total new installation the problem came back within 1 day.
When I examined the log file, there are a lot of kernel panics in IOUSBFamily.kext. I also noticed that the problem is getting worse when you mac tries to give some sound (music, video, etc).
Also a lot of sandboxd error messages with com.apple.coresymbolicationd.
Also the mac lost the sound interface and then swith to Airplay?
Sometimes the sound only works from the speaker when I insert the jack from the headphone?????
It's lost the sound settings/devices (properly because the mac is so slow)
BUT situation is getting much better after I edit the following Lines in com.apple.audio.coreautiod.sb
cd /usr/share/sandbox/
vi com.apple.audio.coreaudiod.sb
contents of my file:
(version 1)
(deny default)
(import "system.sb")
(debug deny)
;(trace "/Library/Preferences/Audio/coreaudiod_trace.sb")
(allow file-ioctl
(literal "/dev/dtracehelper")
)
(allow file-read*
(subpath "/Library/Audio/Plug-Ins/HAL")
(subpath "/Library/Preferences/Audio")
(subpath "/Library/Audio/Plug-Ins")
(subpath "/System")
(literal "/Library/Preferences/.GlobalPreferences.plist")
(literal "/dev/autofs_nowait")
(literal "/dev/dtracehelper")
(literal "/dev/null")
(literal "/dev/random")
(literal "/usr/sbin")
(literal "/usr/sbin/coreaudiod")
(literal "/usr/sbin/coreaudiod/..namedfork/rsrc")
(subpath "/usr/share")
(literal "/Library/Application Support/CrashReporter/SubmitDiagInfo.domains")
(literal "/Library/Audio/Plug-Ins/Components")
(literal "/Library/Preferences/SystemConfiguration/preferences.plist")
(literal "/Library/Audio/Plug-Ins/Components/A52Codec.component")
(literal "/Library/Keychains/System.keychain")
(literal "/private/var/db/mds/messages/se_SecurityMessages")
(literal "/private/var/db/mds/system/mdsDirectory.db")
(literal "/private/var/db/mds/system/mdsObject.db")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsDirectory\.db$")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsObject\.db$")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mds\.lock$")
)
(allow file-read-metadata
(literal "/")
(literal "/AppleInternal")
(literal "/etc")
(literal "/private/etc")
(literal "/private/etc/localtime")
(literal "/private/var/empty")
(subpath "/usr/lib")
(literal "/var")
(literal "/Library")
(literal "/Library/Keychains")
(literal "/private")
(literal "/private/var")
(literal "/private/var/folders")
(regex "/private/var/folders/[^/]+")
(regex "/private/var/folders/[^/]+/[^/]+")
(literal "/private/var/run/systemkeychaincheck.done")
(regex "^/private/var/folders/[^/]+/[^/]+/C$")
(regex "^/private/var/folders/[^/]+/[^/]+/C/mds$")
)
(allow file-write*
(subpath "/Library/Preferences/Audio")
(literal "/dev/dtracehelper")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsDirectory\.db$")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsDirectory\.db_$")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsObject\.db$")
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mdsObject\.db_$")
)
(allow file-write-data
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds/mds\.lock$")
)
(allow mach-lookup
(global-name "com.apple.CoreServices.coreservicesd")
(global-name "com.apple.PowerManagement.control")
(global-name "com.apple.audio.audiohald")
(global-name "com.apple.distributed_notifications@1v3")
(global-name "com.apple.system.DirectoryService.libinfo_v1")
(global-name "com.apple.system.DirectoryService.membership_v1")
(global-name "com.apple.system.logger")
(global-name "com.apple.system.notification_center")
(global-name "com.apple.windowserver.active")
(global-name "com.apple.SystemConfiguration.configd")
(global-name "com.apple.coresymbolicationd")
(global-name "com.apple.SecurityServer")
(global-name "com.apple.ocspd")
)
(allow ipc-posix-shm)
(allow sysctl-read)
(allow iokit*)
(allow network*)
(allow process-exec
(literal "/usr/sbin/coreaudiod")
)
----------------------------------------------------
I also edited the mdworkers.sb file (pratically the same solution applies here, just keep a keen eye on your log file and then add a filter on "sandboxd" it will give you some clues what you have to adjust.
My mac is now performing much better, but still not what I'm used to it.