Bug 54983

Summary: ssh chops off the end off data streams
Product: [Retired] Red Hat Linux Reporter: Joe Harrington <jhmail>
Component: opensshAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: jhmail
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-23 22:34:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Harrington 2001-10-23 22:31:37 UTC
Description of Problem:

When transferring finite data streams, ssh exits early.

Version-Release number of selected component (if applicable):

2.9p2-9
(also happened in RH 7.2 release RPM)

How Reproducible:

ssh -n othermach cat bigfile > bigfile

Steps to Reproduce:
1.  set up ssh permissions
2.  start ssh-agent, load keys
3.  make bigfile on othermach
4.  execute command above
5.  compare file sizes

Actual Results:

on oobleck (Intel RH6.2, patched, openssh-2.3.0p1-1):

yes | dd bs=1024 count=1000 of=/tmp/jht
ls -l /tmp/jht
-rw-r--r--    1 jh       jh        1024000 Oct 23 18:23 /tmp/jht

on glup (Intel RH7.2, patched, openssh-2.9p2-9

ssh -n oobleck cat /tmp/jht > jht &
ls -l jht
-rw-r--r--    1 jh       jh         969216 Oct 23 18:24 jht

Expected Results:

no output, all data transferred

Additional Information:
	
This is particularly troublesome in the following idiom:

ssh -n oobleck "(cd /usr ; tar cf - local)" | tar xpf - &
...which has always worked, until now.

The larger the data stream, the more data are lost.  Perhaps it is
forgetting not to count the periodic checksum data in the number of bytes
transferred?

The data that are transferred match the begining of the file being
transferred.

--jh--

Comment 1 Joe Harrington 2001-10-23 22:34:22 UTC
scp on the file does not have the same problem

--jh--


Comment 2 Nalin Dahyabhai 2002-03-07 20:46:10 UTC
This is the flipside of the hangs-on-exit problem, and is specific to the
version of OpenSSH running on the server you're using.  Update the server to
2.9.x (or better yet, the just-released 3.1) and you should stop seeing data
truncations.