Subject: bin/11480: ssh disconnects when forwarding remote ports
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pollen@astrakan.hig.se>
List: netbsd-bugs
Date: 11/13/2000 06:44:15
>Number:         11480
>Category:       bin
>Synopsis:       ssh disconnects when forwarding remote ports
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 13 06:44:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Petter Lindquist
>Release:        NetBSD 1.5_ALPHA2
>Organization:
Pållen - http://www.astrakan.hig.se/~pollen/
>Environment:
System: NetBSD peli 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (EBI) #4: Tue Oct 17 13:48:13 CEST 2000 peli@peli:/lfs/src/sys/arch/i386/compile/EBI i386

Remote system:
NetBSD NetBSD 1.5_BETA2 (GENERIC) #0: Mon Nov  6 13:13:46 MET 2000     
fvdl@sushi:/work/trees/netbsd-1-5/sys/arch/i386/compile/GENERIC

>Description:
When tunneling an apache server beween two netbsd 1.5 (ALPHA2 and BETA2) 
ssh keeps dropping the connection. Some -v output of ssh:

debug: channel 3: read<=0 rfd 7 len 0
debug: channel 3: read failed
debug: channel 3: input open -> drain
debug: channel 3: close_read
debug: channel 3: input: no drain shortcut
debug: channel 3: ibuf empty
debug: channel 3: input drain -> wait_oclose
debug: channel 3: send ieof
debug: fd 4 setting O_NONBLOCK
debug: channel 0: new [listen port 5080 for peli port 80, connect from 
pc-lpi.hig.se port 1213]
debug: fd 8 setting O_NONBLOCK
debug: channel 4: new [listen port 5080 for peli port 80, connect from 
pc-lpi.hig.se port 1214]
debug: fd 9 setting O_NONBLOCK
debug: channel 5: new [listen port 5080 for peli port 80, connect from 
pc-lpi.hig.se port 1215]
debug: fd 10 setting O_NONBLOCK
debug: channel 6: new [listen port 5080 for peli port 80, connect from 
pc-lpi.hig.se port 1216]
debug: fd 11 setting O_NONBLOCK
debug: channel 7: new [listen port 5080 for peli port 80, connect from 
pc-lpi.hig.se port 1217]
debug: channel 3: rcvd oclose
debug: channel 3: input wait_oclose -> closed
debug: channel 0: rcvd ieof
debug: channel 0: output open -> drain
debug: channel 4: rcvd ieof
debug: channel 4: output open -> drain
debug: channel 5: rcvd ieof
debug: channel 5: output open -> drain
debug: channel 6: rcvd ieof
debug: channel 6: output open -> drain
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: send oclose
debug: channel 0: close_write
debug: channel 4: obuf empty
debug: channel 4: output drain -> closed
debug: channel 4: send oclose
debug: channel 4: close_write
debug: channel 5: obuf empty
debug: channel 5: output drain -> closed
debug: channel 5: send oclose
debug: channel 5: close_write
debug: channel 0: read<=0 rfd 4 len 0
debug: channel 0: read failed
debug: channel 0: input open -> drain
debug: channel 0: close_read
debug: channel 0: input: no drain shortcut
debug: channel 0: ibuf empty
debug: channel 0: input drain -> wait_oclose
debug: channel 0: send ieof
debug: channel 4: read<=0 rfd 8 len 0
debug: channel 4: read failed
debug: channel 4: input open -> drain
debug: channel 4: close_read
debug: channel 4: input: no drain shortcut
debug: channel 4: ibuf empty
debug: channel 4: input drain -> wait_oclose
debug: channel 4: send ieof
debug: channel 5: read<=0 rfd 9 len 0
debug: channel 5: read failed
debug: channel 5: input open -> drain
debug: channel 5: close_read
debug: channel 5: input: no drain shortcut
debug: channel 5: ibuf empty
debug: channel 5: input drain -> wait_oclose
debug: channel 5: send ieof
debug: channel 6: obuf empty
debug: channel 6: output drain -> closed
debug: channel 6: send oclose
debug: channel 6: close_write
debug: channel 6: read<=0 rfd 10 len 0
debug: channel 6: read failed
debug: channel 6: input open -> drain
debug: channel 6: close_read
debug: channel 7: read<=0 rfd 11 len 0
debug: channel 7: read failed
debug: channel 7: input open -> drain
debug: channel 7: close_read
debug: channel 6: ibuf empty
debug: channel 6: input drain -> wait_oclose
debug: channel 6: send ieof
debug: channel 7: ibuf empty
debug: channel 7: input drain -> wait_oclose
debug: channel 7: send ieof
debug: channel 3: rcvd ieof
debug: channel 3: output open -> drain
debug: channel 3: obuf empty
debug: channel 3: output drain -> closed
debug: channel 3: send oclose
debug: channel 3: close_write
debug: channel 3: full closed
debug: channel_free: channel 3: status: The following connections are 
open:
  #0 listen port 5080 for peli port 80, connect from pc-lpi.hig.se port 
1213 (t4 r6 i4/0 o128/0 fd 4/4)
  #1 listen port 5080 for peli port 80, connect from nugate.perceptive.se 
port 55930 (t4 r7 i8/0 o16/0 fd 5/5)
  #2 listen port 5080 for peli port 80, connect from nugate.perceptive.se 
port 55929 (t4 r8 i8/0 o16/0 fd 6/6)
  #3 listen port 5080 for peli port 80, connect from nugate.perceptive.se 
port 55915 (t4 r10 i8/0 o128/0 fd 7/7)
  #4 listen port 5080 for peli port 80, connect from pc-lpi.hig.se port 
1214 (t4 r9 i4/0 o128/0 fd 8/8)
  #5 listen port 5080 for peli port 80, connect from pc-lpi.hig.se port 
1215 (t4 r11 i4/0 o128/0 fd 9/9)
  #6 listen port 5080 for peli port 80, connect from pc-lpi.hig.se port 
1216 (t4 r12 i4/0 o128/0 fd 10/10)
  #7 listen port 5080 for peli port 80, connect from pc-lpi.hig.se port 
1217 (t4 r13 i4/0 o16/0 fd 11/11)

Connection to ribston.astrakan.hig.se closed by remote host.
Connection to ribston.astrakan.hig.se closed.
debug: Transferred: stdin 0, stdout 192, stderr 109 bytes in 175.6 seconds
debug: Bytes per second: stdin 0.0, stdout 1.1, stderr 0.6
debug: Exit status -1

>How-To-Repeat:

ssh user@host -R 5080:peli:80

and then try to load some web pages...

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: