Subject: kern/25685: ssh2 ssh connections hang from xterm/rxvt with fast output
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <nb-pr@gendalia.org>
List: netbsd-bugs
Date: 05/23/2004 02:39:36
>Number:         25685
>Category:       kern
>Synopsis:       ssh2 ssh connections hang from xterm/rxvt with fast output
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 23 07:45:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tracy Di Marco White
>Release:        NetBSD 2.0_BETA
>Organization:
NetBSD
>Environment:
System: NetBSD satai 2.0_BETA NetBSD 2.0_BETA (GENERIC) #3: Tue May 11 22:25:28 CDT 2004 gendalia@satai:/usr/obj/i386/GENERIC i386
Architecture: i386
Machine: i386
>Description:
When ssh'ing from a NetBSD machine to another machine, ssh.com or openssh
server, and having a lot of output quickly, the process will block.  ssh
can be killed or the ssh escape key can be used to kill the connection,
but that's about all that can be done.
The local terminal is in either xterm or rxvt (so far) but this problem
is not evident from one of the virtual terminals.
mutt redrawing in a screen session will also freeze it.

A 'ktrace -i ssh toybox' followed by running 'cat /usr/share/dict/words'
shows this as the last 50 lines (more available on request):
% kdump ktrace.out | tail -50
  2726 ssh2     GIO   fd 3 read 16 bytes
       "e\M^Z\M-"\M^P]\^BC\M-E\M-y\M-8\M-m
        \M-a3X\M^Z"
  2726 ssh2     RET   read 16/0x10
  2726 ssh2     CALL  read(3,0x8151c18,0x224)
  2726 ssh2     GIO   fd 3 read 548 bytes
       "\M-K4z\^\)_\M-@4L\M-e\M^E\M^\ #t\^O\M-l,@       \M^J\M-@\M-U\M-X\
                \M-|\M^_gkuxX,E\M^F\M-2c6\M-_\M^P\M-X\M-p/\v\M^[\M-N\^F\M-:\
        \M-@!\M^B\M-9]_z\"\M-7z\M-6\M-5\M^D\M^[\^?\M^S\^P\^U|\M-{\M^I\M^NL]\\R\
        \M^E\M-s\M-M\M^ZJ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-G\M-x\M^F\M-t\M^E\M-L&\M-V\M^I\M-CN\M-J\^S\
        \M^N5y\M^Cx\M-R\M-o\M-g\^X\M-'\M^@d5\r\M-Oyo\^X#w!\M^S\^F\M-@\M-h6\M^^\
        \M-4e~\M-&\a\M-H\^B\M-DKb\^WV\M^R\^C\M^\\M-k\M^Y;'^\^Nj\M-K\M-V\^X#c\
        \240P\M-Mn\M-4\M^C\M-k\M^S\M^N4\^F\M-Vys6\M-i\M-7\M-z\\\M^_\M-x2e\M-J\
        \\b\^W\M-L{Tv|\^TQ}\M-@\az\M-z/x\M-@\M-&\^X\^Q3\M-_\M-dUE@\M-y\M-<\M-1\
        \M-A\M-I\M-I\M-)\f\^R\M-x0\^P\M-Wu"
  2726 ssh2     RET   read 548/0x224
  2726 ssh2     CALL  read(3,0x8134608,0x10)
  2726 ssh2     RET   read -1 errno 35 Resource temporarily unavailable
  2726 ssh2     CALL  gettimeofday(0xbfbfefd0,0)
  2726 ssh2     RET   gettimeofday 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  __sigaction_sigtramp(0xd,0xbfbfed90,0xbfbfed70,0x482af99c,1)
  2726 ssh2     RET   __sigaction_sigtramp 0
  2726 ssh2     CALL  gettimeofday(0xbfbfefd0,0)
  2726 ssh2     RET   gettimeofday 0
  2726 ssh2     CALL  select(4,0xbfbff010,0xbfbfeff0,0,0xbfbfefc0)

>How-To-Repeat:
install ssh2
from an xterm/rxvt:
/usr/pkg/bin/ssh remotehost
cat /usr/share/dict/words or ls -laR /

>Fix:
currently unknown.  split screens in ssh sometimes work around it, but not
always, not consistently.
>Release-Note:
>Audit-Trail:
>Unformatted:
 I've seen this since ssh2 was added to pkgsrc.  Which covers a lot of
 1.6[A-Z]* & 1.6.x and several versions of ssh2