All Out of Cache

I’ve been off with my kids visiting my Mom in Minnesota for the last two weeks. Nice little vacation, with lots of hiking, swimming, and beer swilling. (Though the latter was mostly me, not the kids.)

Anyhow, now I’m back at work and getting back into the swing of the server upgrades and imaging issues before school resumes. Our servers needed a lot of TLC because we had an unintentional power outage when I was away—an electrician accidentally flipped the master switch on our server room’s UPS—and they didn’t all come back online properly. So I spent way too much time yesterday and today fighting with some balky issues, the worst of which was my inability to log into the administrative account on our old Xserve.

That particular account is an Active Directory mobile account, and the server is our Open Directory master in the “Golden Triangle” on our network, so I figured that the problem was network-related. The problem itself was a repeatedly crashing systemuiserver and runaway processes upon logging into the administrative account. Other accounts, including root, however, weren’t affected. Deleting the account and re-creating it didn’t solve the problem, though, and I couldn’t replicate the problem with any other AD accounts, either. Thinking that it was a cache problem, I’d deleted the /Users/administrator as well as the contents of /Library/Caches and /System/Library/Caches, but the problem persisted no matter how many times I deleted the administrator account or how I rebuilt it.

Finally, at the end of the day today, I found a little hint in the system logs that suggested that the problem was a corrupted font cache. I thought I’d cleared all of those in my prior troubleshooting, but it turns out that Leopard also stores cache files in subdirectories of /var/folders. So, finding and deleting the directories there that were owned by administrator solved the problem. I’m still not sure whether or not the problem was actually a corrupted font cache, as opposed to some other cache stored in /var/folders, but I can now log back into the Xserve with the administrator account, and for that I’m happy.

And on a side note, the Trader Joe’s “Charles Shaw Blend” Sauvignon Blanc is surprisingly good for a sub-$5 bottle of wine.

Update 11/30/08
I’m not sure whether I’ll get back to regular blogging any time soon, but I figured I’d post a quick update to the above note about font caches. As it turns out, there’s an actual official way of clearing Leopard’s font caches. “atsutil databases -removeUser” clears them for the currently logged in user; “sudo atsutil databases -remove” removes them for all users and the system; and “sudo atsutil server -shutdown” restarts the ATSServer. I wish I’d known about it sooner.

4 Comments Add Yours ↓

  1. Tom McNicholas #

    You know… I love Macs, I really do, but an operating system completely falling on its face and causing hours of PAINFUL troubleshooting because of a damn FONT is all too common. Our graphics design people are always cleaning font caches and rebooting and such. Its an absolute bunch of CRAP is what it is.

  2. 2

    I could almost live with the corrupt font issue, since I’ve dealt with it before. What kills me about this is that in Leopard they added this new location for caches, hidden in /var, with obscure names that don’t reflect the user names or ids. Weren’t /Library/Caches, /System/Library/Caches, and /tmp good enough?

  3. Tom McNicholas #

    Hrmm… good insight… and good to know. However, does this clear 3rd party font management app caches? What about MS Office? Extensis? Adobe? These apps tend to make their own, or so I’ve been told.

    Cocktail seems to get them all!


  4. 4

    I don’t know whether it clears out third party caches, but I’d be surprised if it did. But if Cocktail (or any other similar app) works for you, by all means go with it. A decent GUI and someone else sweating the operational details certainly beats remembering obscure and infrequently used command line tools.

Your Comment