SSH connection hanging on logout
Markus Friedl
markus.friedl at informatik.uni-erlangen.de
Thu May 17 08:06:12 EST 2001
On Sun, May 13, 2001 at 06:44:53PM -0000, John Bowman wrote:
> Although still no instances of data loss have been reported with the patch
you should check this:
ssh localhost -2 -v -v -v -p 1234 dd if=/bsd bs=65536 count=2 | \
(sleep 10; md5sum)
on my machine the remote command dies, but sshd
still calls read 3 more times on rfd.
this should not lead to data corruption, i.e. the checksums
must match
dd if=/bsd bs=65536 count=2 | md5sum
-m
use this patch if you want to trace the reads from rfd.
Index: channels.c
===================================================================
RCS file: /home/markus/cvs/ssh/channels.c,v
retrieving revision 1.115
diff -u -r1.115 channels.c
--- channels.c 2001/05/09 22:51:57 1.115
+++ channels.c 2001/05/16 21:52:30
@@ -920,6 +920,7 @@
chan_read_failed(c);
}
} else {
+ debug3("channel %d: read rfd %d len %d", c->self, c->rfd, len);
buffer_append(&c->input, buf, len);
}
}
@@ -1029,9 +1031,10 @@
packet_put_int(c->remote_id);
packet_put_int(c->local_consumed);
packet_send();
- debug2("channel %d: window %d sent adjust %d",
+ debug2("channel %d: window %d sent adjust %d (obuf %d)",
c->self, c->local_window,
- c->local_consumed);
+ c->local_consumed,
+ buffer_len(&c->output));
c->local_window += c->local_consumed;
c->local_consumed = 0;
}
@@ -1270,6 +1273,7 @@
}
}
if (len > 0) {
+ debug3("channel %d: channel data: %d", c->self, len);
packet_start(compat20 ?
SSH2_MSG_CHANNEL_DATA : SSH_MSG_CHANNEL_DATA);
packet_put_int(c->remote_id);
More information about the openssh-unix-dev
mailing list