Benches macOS

15

terminal hangs at login occasionally

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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.

15 replies

Sign in or join Beachball Help to reply.

  1. 0

    Nils C. Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  2. 0

    bernd_muc

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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

  3. 0

    abowman

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  4. 0

    bjbehrens

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  5. 0

    Gnarlodious

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I have read of the same problem on other Mac forums. I wonder if it is because the Mac can't find a hostname? Apple may be trying to fix the hostname lookup bug that has been so troublesome. If Terminal can't get a hostname from local DNS, maybe it can't open.

    Would be interesting to see what happens when the prompt is set to no hostname.

  6. 0

    Rick Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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?

  7. 0

    Rick Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Bumping this back up in the hopes that Gnarlodious sees my question in the previous post.

  8. 0

    Nils C. Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    just curious could it be related to the problem described here. there's a work around at the bottom,

    if so.

  9. 0

    bernd_muc

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Funny thing... since a few days, I don't have the issue anymore - even before I installed the security update... weird.

    I hope that you all will have the same "solution" 🙂

    Cheers,

    Bernd

  10. 0

    Gnarlodious

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I would suggest opening the Sharing preference panel and then click the "Edit" button as if to change the Computer name. In that window, deselect "Use Dynamic Global Hostname".

    That should untether your Mac from the tyranny of the router.

  11. 0

    sitongia

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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

  12. 0

    hseikaly

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  13. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    As an experiment, have you tried using another terminal emulator, such as iTerm to see if the same problem affect that emulator?

    <http://iterm.sourceforge.net/&gt;

    This would help isolate the problem to the terminal emulator or something under the surface used by both emulators.

  14. 0

    hseikaly

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi, yes, I have tried iTerm as well, but still the same issue. Maybe it has something to do with the underlying BSD subsystem or some process that has clogged it up. My cpus don't seem to be doing anything though while this happens though.

  15. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.