SSH connection hanging on logout
John Bowman
bowman at math.ualberta.ca
Thu May 10 14:05:34 EST 2001
> The patch does not work for protocol 1:
>
> while [ 1 ] ; do ssh -p 2222 -o Protocol=1 -oForwardX11=no djm at localhost dd if=/dev/zero bs=1024 count=100 | wc -c ; done
>
> Write failed flushing stdout buffer.
> 100+0 records in
> 100+0 records out
> 16384
> Write failed flushing stdout buffer.
> 100+0 records in
> 100+0 records out
> 20480
> Write failed flushing stdout buffer.
> 100+0 records in
> 100+0 records out
> 20480
> Write failed flushing stdout buffer.
> 100+0 records in
> 100+0 records out
> 20480
>
Interesting. First of all, this reminds me to point out that the patch only
fixes the hang-on-exit bug for Protocol 2 anyway. Which OS and which
platform did this occur on? On RedHat Linux 6.2 no data loss appears to
occur under Protocol 1. But I haven't tested it extensively since under
this protocol it doesn't fix the bug anyway.
while [ 1 ] ; do ssh -o Protocol=1 -oForwardX11=no localhost dd if=/dev/zero bs=1024 count=100 | wc -c ; done
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
100+0 records in
100+0 records out
102400
In any case, given what you have found, I agree that users who are still
supporting Protocol 1 should either not apply the patch at all or else modify
it to call chan_shutdown_read only under Protocol 2.
-- John Bowman
http://www.math.ualberta.ca/~bowman
More information about the openssh-unix-dev
mailing list