Launching Terminal Freezes the System for 5 Minutes in Mavericks Only recently, when I launch Terminal in Mavericks, the system becomes unresponsive temporarily: the spinning wheel appears; I can still move the mouse pointer but nothing responds; if Activity Monitor is running, it doesn't update any activity; the seconds indicator of the digital clock on the menu bar stops ticking. Terminal displays 'login' on the title bar. After 5 minutes, Terminal displays 'Log in timed out after 300 seconds' and the system becomes responsive again.

I have tried the following to no avail:


Deleted the plist file (~/Library/Preferences/com.apple.Terminal.plist) and restarted the system. This tells me it is not due to the corrupt plist file.
Used another user to log-in to the system and launched Terminal. This tells me the problem is not user-specific.


I enabled Remote Login in System Preferences and logged in from another computer using SSH. I get the password prompt immediately. However, only after about five minutes, do I get a command prompt. Again, during this time, if I go back to the computer, the system is unresponsive. When I get the command prompt, I can browse and navigate the files without any delay (discarding the network latency). I am trying to use the terminal to run git commands. Perhaps, the the following is related: if I run ssh-add to add my github key, it says: Could not open a connection to your authentication agent. Before, I was able to run ssh-add without any problems.

Any idea what is going on and how to fix this?
After Googling and trying a few things, I have got this resolved. As described here http://hints.macworld.com/article.php?story=20100623054627388 and elsewhere, there are a lot of log files accumulated in the the /private/var/log/asl directory. I downloaded Onyx http://www.macupdate.com/app/mac/11582/onyx and used it to delete the system logs and cache files. After restarting the computer, Terminal launches quickly. There are no delays when logging in from SSH or from the log-in screen either.

The error message from ssh-add seems to be a different problem.