Defect: OpenSSH hangs on logout
Kevin Steves
stevesk at pobox.com
Fri Jun 8 04:42:27 EST 2001
On Thu, 7 Jun 2001, Greg Wooledge wrote:
:> does 10.20 hang with 2.9 without the patch? with the patch?
:
:It hangs both with and without the patch. Every time. (It certainly
:doesn't act like a race condition, as someone else mentioned.)
:
:Just to refresh memories, this is the symptom:
:
: box1$ ssh somewhere
: somewhere$ sleep 500 &
: somewhere$ logout
: (hangs)
:
:Then, if I kill the sleep process in another window, the connection is
:immediately terminated and everything is back to normal.
this is a different problem. it is easy to produce for me on hp-ux 11.11
with protocol 2. i ssh to the hp-ux host, followed by an exit, i see:
bash-2.05$ exit logout
logout
logout
and hang.
on the server:
stevesk 1611 1609 9 11:33:29 ? 0:00 <defunct>
root 1609 912 0 11:33:28 ? 0:00 sshd: stevesk at 1
the server was blocked in select() when the SIGCHLD was received, and it
was restarted, where it is blocked waiting for input. if you enter one
character it will return and process the sigchld hander flag.
the patch i posted, does not set SA_RESTART for SIGCHLD. some systems may
restart select() in this case, and we don't want that behaviour.
More information about the openssh-unix-dev
mailing list