loginwindow process out of control

I have an early 2010 27" iMac that is the family computer. It has 5 user accounts on it. (Not sure if this is relevant or not).

Often times I'll come home and the login screen won't appear. Usually I can ssh in from my MBP and kill that process and everything works.

This time, however, I see that there's a few hundred loginwindow processes running, and I can't kill them. Doing a ps ax | grep loginwindow | wc -l told me there was 829 of them!

It started with a frozen screensaver. I killed the ScreenSaverEngine process and it brought me to a stuck login screen.

I'm guessing there is a severe software conflict on the machine, but I am not sure how to diagnose this. It is certainly frustrating to have to power off the machine.

Any ideas on what I should do to fix this issue? How would I begin to figure out the root cause?


Alright these are the olden goldies for fixing stuff like that:

1) Repair Permissions:

This is often a bit of a sacrificial chicken but in this case it could very well be that something has caused the permissions on the login database or an associated file to end up corrupted.

2) Verify the disk: It's unlikely to be a disk problem but whilst you're in there you might as well clear that off.

If they don't do the trick once you're logged back in go to Console in Utilities and post the log files up here, there might be some useful information in them.