Due to running out of disk space, plus a forced shutdown, I ended up with a corrupted keychain and quite a few corrupted plist preference files in OS X; the applications would mostly delete them and create new ones, but it was causing problems. Luckily I had recent backups, while a couple of useful applications came to the rescue for making sure everything was fixed:
- Applejack, which automatically runs all the disk checking, permission repairing and cache cleaning operations from Single User Mode so you don't have to boot from a DVD.
- Preferential Treatment, because Applejack can't detect corrupted preference files inside a FileVault image, so you need to use this to detect them while logged in.