[PATCH] fix read-batch SEGFAULT [WAS: --write-batch just hangs?]

Chris Shoemaker chris.shoemaker at cox.net
Thu May 6 22:26:15 GMT 2004


On Wed, May 05, 2004 at 11:34:29PM -0700, Jos Backus wrote:
> On Tue, May 04, 2004 at 08:14:22PM -0400, Chris Shoemaker wrote:
> > Just so I'm on the right page, AFAICT, batch mode doesn't work _at all_.  
> 
> If that's the case, it could be that the batch mode code needs to be updated
> to work with recent changes to rsync. Last time I tried running the tests
> (which I posted to the list) it worked fine. I haven't had a chance to try it
> lately though.
> 
> > If anyone knows differently, please let me know.  I've think I've tried 
> > almost every possible test, including the one in the man page.  Anyway, 
> > this patch does allow me to read a batch written locally.  That's a 
> > start, at least.
> > 
> > Next, I'm going to see if I can figure out the hang that I mentioned 
> > earlier...
>  
> Please keep us posted.
> 

Status update: I've just finished tracing through the client behavior
related to the apparent hang.  All seems to go well with client/server
negotiation, until the client tries to receive the file list (calling
recv_file_list).  This just times out, recalling select() every 60
seconds.  I'm guessing that the server just isn't sending the file list 
at the right time (or at all).  Strange, that this only happens with 
--write-batch.  I would think that protocol should be pretty much 
unaffected by batch-mode, since any conflicting options would already 
have been complained about.

I think I'll have to setup an rsync server and trace it during a 
--write-batch connection to find the problem.... maybe tomorrow night...

> 
> Interesting. I have the exact same patch sitting in my CVS tree but I
> can't remember why it's there, sorry :-(

Joe,  got any more?  :)


-Chris


More information about the rsync mailing list