SSH connection hanging on logout

Markus Friedl Markus.Friedl at informatik.uni-erlangen.de
Fri May 18 00:27:57 EST 2001


On Wed, May 16, 2001 at 10:14:57PM -0000, John Bowman wrote:
> Under linux there is no data corruption and the checksums match:
> 
> [wizard: ~] ssh localhost dd if=/bin/bash bs=65536 count=2 | ( sleep 10 ; md5sum )
> 2+0 records in
> 2+0 records out
> 86d34e869a31df51922ad2bb9bd202bc  -
> [wizard: ~] dd if=/bin/bash bs=65536 count=2 | ( sleep 10 ; md5sum )
> 2+0 records in
> 2+0 records out
> 86d34e869a31df51922ad2bb9bd202bc  -

with my debugging patch,
you should see something like this on the sshd side:

	debug3: channel 0: channel data: 16384
	debug3: channel 0: read rfd 10 len 16384
	debug3: channel 0: channel data: 15907
	debug2: channel 0: rcvd adjust 16861
	debug3: channel 0: channel data: 477
	debug3: channel 0: read rfd 10 len 16384
	debug3: channel 0: channel data: 16384
	debug2: channel 0: rcvd adjust 65536
	debug3: channel 0: read rfd 10 len 16384
	debug3: channel 0: channel data: 16384
	debug3: channel 0: read rfd 10 len 16384
	debug3: channel 0: channel data: 16384
	debug1: Received SIGCHLD.
^^ shell dies
	debug1: session_by_pid: pid 29873
	debug1: session_exit_message: session 0 channel 0 pid 29873
	debug1: session_exit_message: release channel 0
	debug1: channel 0: write failed
	debug1: channel 0: output open -> closed
	debug1: channel 0: close_write
	debug1: session_free: session 0 pid 29873
	debug3: channel 0: read rfd 10 len 16384
^^ more reads from the shell.

if you shutdown at the SIGCHLD, you can no longer read
at this point!

	debug2: channel 0: read 84 from efd 12
	debug3: channel 0: channel data: 16384
	debug2: channel 0: rwin 16384 elen 84 euse 1
	debug2: channel 0: sent ext data 84
	debug1: channel 0: read<=0 rfd 10 len 0
	debug1: channel 0: read failed
	debug1: channel 0: input open -> drain
	debug1: channel 0: close_read
	debug1: channel 0: input: no drain shortcut
	debug1: channel 0: ibuf empty
	debug1: channel 0: input drain -> closed
	debug1: channel 0: send eof




More information about the openssh-unix-dev mailing list