In the first what is sure to be an ongoing series of entries on how Mac OS X sucks, I’ll describe an issue I came across recently and how I solved it.
Yesterday I restarted my PowerBook (which is running Mac OS X 10.2.6) and found that I could not log in. The login dialog would appear, it would go through the motions, then disappear, then finally reappear.
I suspected that something early in the login process was crashing so hard it was taking down the login process itself. After a couple hours of snooping, and some luck (I was able to ssh in from another machine and watch the system log report the crashes), I discovered that Launch Services’ cache was corrupted, and was causing lsregister to seg fault. Removing that file (/Library/Caches/ allowed login to proceed normally.
Update (2009-03-10): Thanks to this post, I now know that the filenames have changed in more recent OS releases. Launch Services caches information per-user, in files of the form<uid>.csstore, where <uid> should be replaced with the user ID of the user with which you're having trouble (my default user ID was 501).