probbable generator hang bug in rsync

Wayne Davison wayned at
Mon Sep 12 19:04:42 GMT 2005

On Fri, Sep 09, 2005 at 08:53:48PM -0500, Steve Sether wrote:
> The generator process on an rsync server seems to get stuck in 
> an infinite loop after a client process dies.

That's very strange.  The generator is trying to write data down the
socket, and if the other end of the socket connection goes away, the
select() call should report that the fd is not "ready" so that rsync
will try to write to it and get an error.  It's very weird that this
does not happen.  Older rsync versions probably avoid this scenario by
having an extra descriptor in the select() call (to check on the pipe
from the receiver to the generator), but newer rsync versions avoid
this when the generator is trying to finish writing a packet of data,
which avoids the potential for protocol corruption.

So, it seems to me that stunnel is the root cause of the hang, since
it is not letting someone attempting to write the socket that it is


More information about the rsync mailing list