Cygwin/rsync Hang Problem Testing Results

Paul Thompson captbunzo at squirrelmail.org
Fri Oct 3 09:28:06 EST 2003


People of cygwin & rsync,

I recently attempted to get cygwin and rsync working to solve a 
backup/mirroring need in my computer life. Well, as you might guess, I 
ran into a little but of trouble.

Strangely enough, rsync seemed to be regularly hanging when I attempted 
to do a "get" (sycronize a remote to a local dir). Well, considering I 
want to automate this, that was not going to work. So I searched the 
web, mailing lists, etc, and came across all of the posts on the 
subject, but no solution.

Then I stumbled across an idea - to test previous versions of rsync to 
if any of them worked better with cygwin. Here are the (hopefully 
helpful) results of those tests. I did three tests for each version of 
cygwin:

  locallist:
    rsync -n --stats --recursive --rsh=ssh sync/ /home/drsync/

  get:
    RSYNC_CMD="rsync --verbose --progress --stats -auz -e ssh"
    $RSYNC_CMD myuser at myserver.com:sync/ sync/

  put:
    RSYNC_CMD="rsync --verbose --progress --stats -auz -e ssh"
    $RSYNC_CMD sync/ myuser at myserver.com:sync/

When rsync was hanging, it did so usually by the third time I ran the 
command. So I figured running each 10ish times should probably show the 
error.

So I downloaded the last pile of rsync releases and started testing at 
intervals, starting back at 2.3.0 and splitting the difference as I 
zeroed in on the offending release. Here are the results:

    Version   locallist   get       put
    ---------------------------------------
    2.3.0     success     success   success
    2.4.0     success     success   success
    2.4.1     success     success   failure
    2.4.2     success     success   failure
    2.4.3     success     success   failure
    2.4.4     success     success   failure
    2.4.5     success     success   failure
    2.4.6     failure     failure   failure
    2.5.0     failure     failure   success
    2.5.6     failure     failure   success

The failures of the put test (v. 2.4.1 - 2.4.6) happened EVERY time I 
ran the test and returned an error of:

    read error: Connection reset by peer

As those did not occur after 2.4.6, I assume that was a fixed bug, 
unrelated to the hanging problem that was the reason for my tests.

Anyhow, when the locallist and get tests failed, rsync would just plain 
hang - no explanation, error, I could leave it there for an hour and it 
wouldn't have changed. And then, when I ctrl-c killed the process (in my 
cygwin/bash shell), the actual rsync process would stick around and 
require killing via the windows task manager.

So, based on my testing, I would conclude that the infamous cygwin rsync 
hang bug was introduced somewhere in the coding for 2.4.6. As for 
myself, I plan to go ahead and just use version 2.4.0, as it is the most 
recent version of rsync that worked for all three tests. If I can be of 
any more help, including testing patches, please let me know.

Thanks for all of the hard work on cygwin and rsync, folks.

Sincerely,
Paul Thompson
captbunzo at squirrelmail.org




More information about the rsync mailing list