probbable generator hang bug in rsync

Steve Sether steve at vellmont.com
Mon Sep 12 23:04:16 GMT 2005


Could this be a problem with Linux?  I've tried killing the
stunnel process (as well as the parent stunnel process) on
the server, and the rsync process persists.  Shouldn't rsync
get an error if there's nothing on the receiving end?

I have tried this without stunnel, and the generator dies
like it's supposed to, so there's defintely something funny
going on.

On Mon, Sep 12, 2005 at 12:04:42PM -0700, Wayne Davison wrote:
> 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
> closed.
> 
> ..wayne..


More information about the rsync mailing list