"rsync -e ssh" hangs when lots of data is being transferred -- USE_PIPES in OpenSSH is the culprit

Jonathan Kamens jik@curl.com
Sun Nov 4 01:54:00 GMT 2001

I have my C: drive mounted as /c and my D: drive mounted as /d.  If I
run this command:

  rsync -v -a -e ssh localhost:/c/cygwin/ /d/cygwin/

If you don't have a D: drive or some other separate drive you can use
as the target directory for this test (using something underneath /c
is a bad idea, because you run the risk of rsync trying to copy the
directory hierarchy that it's creating), you can do the test remotely
from a separate box, i.e., "rsync -v -a -e ssh "remote-host:/c/cygwin/
/some/local/directory/" -- the failure described below still occurs.

Rsync reliably hangs part of the way through the transfer.  When I run
"ps" after ^C'ing the hung rsync, I see:

        223       1     223        223    0 1000 09:08:06 /usr/bin/bash
        261       1     261        261    1 1000 13:09:35 /usr/bin/bash
        186       1     186        186    ? 1000 14:11:34 /d/scratch/jik/openssh_cvs-20010517/sshd
  O     191     186     186        191    ? 1000 14:12:24 /d/scratch/jik/openssh_cvs-20010517/sshd
  O      89     191      89        140    ? 1000 14:12:25 /usr/local/bin/rsync
        205     223     205        197    0 1000 14:24:40 /usr/bin/ps

Neither rsync nor sshd responds to kill -TERM -- I need to use "kill
-9" to make them die.

By stepping back through the OpenSSH anonymous CVS repository, I
discovered that the first day on which this problem occurs is May 17.
This is the first day in which Corinna's change to enable USE_PIPES
appears.  If I compile sshd.exe from the current OpenSSH anonymous CVS
repository sources with the USE_PIPES line removed from configure.ac,
the problem goes away.

My understanding is that pipes behave somewhat poorly under Cygwin
because pipes behave somewhat poorly under Windows :-).  It would seem
that Cygwin pipes don't behave reliably enough for OpenSSH to use
them.  I'd suggest removing USE_PIPES from OpenSSH for Cygwin.


More information about the Cygwin-apps mailing list