You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

terminal hangs at login occasionally

Hi,

So this has now happened twice. When opening a new terminal window, or new tab, the terminal will just hang at the 'login' process. It will never actually present a prompt. Quitting terminal and restarting did no good. Also, perhaps related, I had to do a hard shutdown, as it hung during the restart process.

Mac Mini (core duo), MacBook Pro, Mac OS X (10.5.2)

Posted on Feb 13, 2008 3:16 PM

Reply
23 replies

Feb 13, 2008 7:56 PM in response to Berndt Jung

Have you made any recent changes to your shell's initialization scripts?


try cranking up the verbosity, typically by using something like: 'set -xv'
Which file to use depends on if you're using a login shell or not.

if login shell add it to one of these files:

~/.bash_profile, ~/.bash_login, or ~/.profile

if not a login shell add it to the ~/.bashrc file.

for example

$ head .profile
#!/bin/bash
set -xv


Then just start another Terminal.app session. Watch for where it hangs.

Feb 21, 2008 2:58 AM in response to Nils C. Anderson

Hi,

I'm having the same problem since I've updated to 10.5.2 - I open the Terminal and it stays white. No prompt whatsoever.

The interesting thing is, that this doesn't happen right after a reboot (at least on my MBP). After a reboot, Terminal works nicely. Then, after a while (maybe after putting it to sleep and waking it up again - I need to do some more observations here), Terminal's dead.

When I wanted to reboot, I had to shut it down using the power button, too. To me it almost looks as if the BSD subsystem has some problems...

Cheers,
Bernd

Feb 25, 2008 10:11 AM in response to Berndt Jung

I'm seeing the same behavior on 10.5.2. A few minutes after starting the OS, new terminal windows hang on the login process. When I look in the output of PS I see one login process under user root for each terminal window I open.

I can still execute command using the Run Script command in BBEdit or TextWrangler, but I can never get a bash prompt once this behavior starts.

If I try to get info about the login processes in Activity Monitor, Activity Monitor will hang about five seconds after the info window opens.

Feb 29, 2008 1:35 PM in response to Berndt Jung

I am experiencing the same exact symptoms though I can do a reboot remotely with Remote Desktop Manager but I fear that if it locks up fully I'll have to get someone in the data center to hard reboot it.

I see no errors in any logs that show what might be going on and I also downloaded the full combo update and re-updated. I am beginning to think it is something in the subsystem because if I leave the first window open after reboot, it will remain alive. After closing it once, that's it no more terminal until reboot.

If I arrive at a solution, I'll post it.

Feb 29, 2008 9:40 PM in response to Gnarlodious

Gnarlodious, very interesting. I just posted a question here earlier today about some problems we're having with Mac hostnames on our network. I was experimenting with it today, changing some settings to see what happens and suddenly I lost my prompt exactly as described above. It took a reboot to bring it back. I would be willing to bet your guess is right.

Incidentally, you mention the hostname lookup as if it's a known issue, and yet dozens of searches on Google today turned up nothing for me. Do you happen to have any links to more info?

Mar 31, 2008 7:59 PM in response to Berndt Jung

I recently installed a set of updates, which became available sometime in the last week (I was on vacation), and now I have having this trouble with Terminal (and iTerm). The networking fix doesn't apply, as I understand it.

Did something in the latest round of updates cause this in my case? Are others just starting to see this?

I wonder if it is related to bash?

==Leonard

Apr 22, 2008 7:47 AM in response to Berndt Jung

Hi, does anyone have a clue as to why this occurs and if there is a solution? I've been having this issue quite a bit lately and I use the terminal a lot for work. I don't see any issues in the logs. I haven't encountered this issue until recently so it might have come from a recent patch of some sort.

I figured I would give this thread a bump to see if anyone has anymore answers. I've searched the forums for additional info, but i can't find anything else about it.

Apr 23, 2008 6:37 PM in response to hseikaly

So is there something in the shell initialization file which might be causing you problems?

/etc/profile
/etc/bash_profile
/etc/bashrc
~/.bash_profile
~/.bashrc
~/.profile

If bash is not your default shell, the list of possible initialization files will be different.

If you can't see anything, try added some "unique" echo commands to each of the initialization files you do find, just to see if you are making any progress.

you might even try adding a

set -x

which should display every shell command executed. You will want to know about

set +x

to turn shell tracing off again.

terminal hangs at login occasionally

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.