rsync / cygwin hanging problem

cbarratt at users.sourceforge.net cbarratt at users.sourceforge.net
Sat Nov 29 07:49:35 EST 2003


jw schultz writes:

> > So anyway, I know the "rsync sometimes hangs under cygwin"
> > problem has been acknowledged, but does anybody know
> > anything about when it might be identified and resolved?
> 
> As far as i can tell none of the people who know the rsync
> code use Windows with the possible exception of Craig.  He
> has a patch that may reduce the frequency of hangs but his
> recommendation (if i recall correctly) is to not use rsync
> over ssh on windows.  Rsync apparently works OK as a daemon
> on whendoze and when accessing an rsync daemon.

The problem on Cygwin is the parent fails to kill the child at the
end of a receive.  Without finding the root-cause (I don't know
about cygwin internals), I rearranged the code around the msleep
loop to create a patch did solve the problem for me:

    http://lists.samba.org/archive/rsync/msg06500.html

But several other people have reported that it didn't help.

Following that, Anthony Heading came up with a new patch that
used an additional pipe, instead of a signal, to tell the child
to exit:

    http://lists.samba.org/archive/rsync/msg06501.html

with a diff -u patch here:

    http://lists.samba.org/archive/rsync/msg06527.html

James Tillman reported that this fixed his hang problem on Cygwin.
But JW noted this produced an error in regression testing:

    http://lists.samba.org/archive/rsync/msg06615.html

and then he provided an improved patch:

    http://lists.samba.org/archive/rsync/msg06624.html

and Lapo Luchini came up with a test package with the patch:

    http://lists.samba.org/archive/rsync/msg06625.html

but noted it failed make check.  Shortly after that point the thread
died.

The basic approach in the patch looks sound. Unfortunately I haven't had
the time to follow through on these patches.  Plus my test case that used
to create a hang isn't easy to replicate for me.

John Hunt writes:

> If any developer is working on this problem, I would be happy to
> test any new rsync executable for them, to establish if it works
> in my environment.

Why don't you try JW's last patch above?  Something close to this
should be a reliable fix.

Craig



More information about the rsync mailing list