Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 76926 - Exit from a ssh session may end with a dead console.
Summary: Exit from a ssh session may end with a dead console.
Status: CLOSED DUPLICATE of bug 39128
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-29 15:47 UTC by Ivo Sarak
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-02-07 13:09:53 UTC
Type: ---

Attachments (Terms of Use)

Description Ivo Sarak 2002-10-29 15:47:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

Description of problem:
If to ssh to another machine, "work" there some time and return by 'exit' will
at most cases result with dead console.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Go with ssh to different machine;
2.Work there for some time;
3.Type 'exit' to leave this ssh session;

Actual Results:  Console will at most cases become empty but no prompt will
appear and no keyboard input will make any difference (ctrl+c and such):


Expected Results:  Previous console prompt.

Additional info:

There is no differences between console and X - chances to get dead console is
very high.

Comment 1 Leonid Mamtchenkov 2002-10-30 13:11:29 UTC
Actually, it waits for some timeout.  If you will leave console in such state
for some time (few minutes), the prompt will come back, and you will get
"expected results". :)  Sometimes it could be really annoying though.

Comment 2 Ivo Sarak 2002-10-30 14:27:51 UTC
OK, I have to try it, but is it still a bug or is it intentional?

Somehow I think it is a bug.

Comment 3 Ivo Sarak 2002-11-06 19:49:49 UTC
So I am waiting for this timeout - 4 hours already...

Comment 4 Ivo Sarak 2002-11-07 06:45:23 UTC
I found the cause of the problem:
if user started a background program during ssh session, ssh is not capable to
exit until this background program has been terminated.

Test A:

1) ssh to a host;
2) run:
sleep 10 >/dev/null &

It takes 10 seconds to regain working console.

Test B:

1) ssh to a host;
2) run:
sleep 100 >/dev/null &

It takes 100 seconds to regain working console.

If program happens to not exit itself then there will be permanently dead console.

Comment 5 Ivo Sarak 2002-11-07 21:07:09 UTC
'>/dev/null' is overkill as 'sleep' will not print out anything...

Comment 6 Ivo Sarak 2002-12-27 20:50:22 UTC
I changed it over to bash as I suspect it to be source of this problem.

Comment 7 Tim Waugh 2003-01-15 10:41:28 UTC
Why do you think that?  Seems like an ssh problem to me.

Comment 8 Craig Kelley 2003-10-09 16:37:13 UTC
You can also cause this to happen by logging into a RedHat server, restart cron
with something like this:

 service crond restart

then logout.  Your shell is now forever locked.

Comment 9 John Klingler 2003-10-22 00:32:06 UTC
Perhaps this problem should be renamed "background tasks hang ssh". It is very
annoying but after a while you get trained to remember to stop background tasks
before exiting. I got caught again a few minutes ago, which is why I'm here now.
However, what if you want to start a background task and exit? It still should
be fixed (or defended?) but I think severity should be normal or low.

Comment 10 Ivo Sarak 2004-06-24 13:52:21 UTC
Just to remind - the issue is still here even with FC2.

Comment 11 Darryl Dixon 2004-06-28 21:40:13 UTC
It's not only background tasks - I can replicate this problem
precisely every time if I wish.  In the cases that I have seen it
relates to receiving certain output onto the ssh console while
working.  If I then try to exit it will hang.  Either ssh receives a
bad character that it "doesn't like" or it receives something to
stdout/stderr that it doesn't like - perhaps a program leaving one of
these open?  Either way, it isn't just background tasks :(

Comment 12 Ken Snider 2004-12-07 17:33:57 UTC
This is a known issue in the openssh faq:


basically, ssh can't close its FDs if a subprocess still has

Comment 13 Tomas Mraz 2005-02-07 13:09:53 UTC

*** This bug has been marked as a duplicate of 39128 ***

Note You need to log in before you can comment on or make changes to this bug.