Quite frequently these messages popped up in my system.log:
Jun 3 00:32:13 zoidberg.z.net mdworker[5556]: Unable to talk to lsboxd
Jun 3 00:32:13 zoidberg.z.net sandboxd[5560] ([5558]): mdworker(5558) deny mach-lookup com.apple.ls.boxd
Browsing for an explanation for these sandbox issues I found out that they're
not quite uncommon for systems which were upgraded directly from 10.6 to
10.8 (exactly what I did). A frequently recommended solution is to
boot into safe mode, which I tried. However, my machine would always
freeze at the same
fsck stage during safe boot.
It turns out that this is due to a bug in
fsck_hfs in OSX
(at least up to 10.8.3) which pops up when your machine has
more than 2GB of main memory. Luckily It's easy to workaround this bug, by
putting a
fsck_hfs cover in place which always provides
the necessary
-c2g option to
fsck_hfs.
$ sudo -s
$ sudo mv /sbin/fsck_hfs /sbin/fsck_hfs.orig
$ cat << EOF > /sbin/fsck_hfs
#!/bin/sh
echo /sbin/fsck_hfs -c2g $*
/sbin/fsck_hfs.orig -c2g $*
EOF
$ chown root:wheel /sbin/fsck_hfs
$ chmod 555 /sbin/fsck_hfs
[
Source]
After booting into safe mode and logging into my account, it seems the
sandbox issues have indeed vanished.