HPUX: ssh hangs after shell exit

Kevin Steves stevesk at pobox.com
Wed Jun 6 09:03:24 EST 2001


On Tue, 5 Jun 2001, Aaron Bush wrote:
:The problem i am having appears to be similar to what others have
:reported where after typing exit in an interactive shell the connection
:is not closed unitl an additional _one_ key stroke is issued (space-bar,
:enter, etc...).
:
:The sshd server is OpenSSH_2.9p1 on HPUX-11.00.  I have tried connecting
:using the OpenSSH_2.9p1 ssh client from Linux-2.4, HPUX-11.00 and
:FreeBSD-4.2.  The behavior so far is _always_ consistent:
:
:1) establish connection to sshd using ssh simply via "ssh remote-host"
:2) type exit in interactive shell on remote-host.
:3) "logout" is echoed to the terminal and the local shell prompt is NOT
:echoed.
:4) type any other key, usually i just hit the space-bar. <<--PROBLEM IS
:HERE
:5) "Connection to remote-host closed." is echoed to the terminal
:followed by the local shell prompt.

can you try the patch at the end?  hp-ux (and possibly the other systems
you mentioned) restart select() when SA_RESTART which we were setting for
SIGCHLD, and we should not have select() restarted.

i would also be interested in someone with Unixware trying this so we can
further verify issues with grantpt(), which is why we added the restart
code in the first place.

:If i do a ps from another session on the remote-host (HPUX-11.00) before
:doing step 4 from above (hitting space-bar) this is what i see
:(cleaned-up to removed non-related processes):
:----
:sysadm$ ps -ef|grep abush
:     UID   PID  PPID  C    STIME TTY       TIME COMMAND
:    root 20088 15876  0 17:49:31 ?         0:00 sshd: abush at 4
:   abush 20090 20088  0 17:49:32 ?         0:00 <defunct>
:
:----
:An additional problem that appears to be realted to this is (but does
:not happen 100% of the time) is that a scp of a file from a HPUX-11.00
:sshd server will hang indefinitely.  Looking at the same ps output will
:show the same <defunct> process again.

i'm not positive, but i think this will fix that issue as well.

:The problem is only seen when the sshd server is running on HPUX,
:connections betweeen other hosts respond as expected.
:
:I can also provide output from sshd -d and ssh -v -v -v if needed and
:anything else that might help to clear this up.

Index: misc.c
===================================================================
RCS file: /var/cvs/openssh/misc.c,v
retrieving revision 1.20
diff -u -r1.20 misc.c
--- misc.c	2001/05/12 00:08:38	1.20
+++ misc.c	2001/06/05 20:55:54
@@ -220,7 +220,7 @@
 		memset(&sa, 0, sizeof(sa));
 		sigemptyset(&sa.sa_mask);
 		sa.sa_flags = 0;
-#if defined(SA_RESTART)
+#if 0
 		if (sig == SIGCHLD)
 			sa.sa_flags |= SA_RESTART;
 #endif




More information about the openssh-unix-dev mailing list