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

2004-05-07 Thread Chris Shoemaker
On Thu, May 06, 2004 at 06:26:15PM -0400, Chris Shoemaker wrote:
 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...

Initial examination makes a suspect of the batch-mode handling of 
exclude lists 

 
  
  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?  :)
Er, s/Joe/Jos/.


 
 
 -Chris
 -- 
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-06 Thread Jos Backus
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.

   --Chris

 Index: generator.c
 ===
 RCS file: /cvsroot/rsync/generator.c,v
 retrieving revision 1.79
 diff -r1.79 generator.c
 48a49
  extern int read_batch;
 216c217
  if (whole_file == 0 || write_batch)
 ---
  if (whole_file == 0 || write_batch || read_batch)

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

-- 
Jos Backus   _/  _/_/_/  Sunnyvale, CA
_/  _/   _/
   _/  _/_/_/
  _/  _/  _/_/
jos at catnook.com_/_/   _/_/_/  require 'std/disclaimer'
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-06 Thread Wayne Davison
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.

The batch code worked fine in the tests I ran (as long as the long-
standing --no-whole-file bug is avoided).

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-06 Thread Jos Backus
On Thu, May 06, 2004 at 09:11:15AM -0700, Wayne Davison wrote:
 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.
 
 The batch code worked fine in the tests I ran (as long as the long-
 standing --no-whole-file bug is avoided).

Okay, that explains why I didn't see any problems. Thanks Wayne.

-- 
Jos Backus   _/  _/_/_/  Sunnyvale, CA
_/  _/   _/
   _/  _/_/_/
  _/  _/  _/_/
jos at catnook.com_/_/   _/_/_/  require 'std/disclaimer'
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-06 Thread Chris Shoemaker
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
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-05 Thread Wayne Davison
On Tue, May 04, 2004 at 08:14:22PM -0400, Chris Shoemaker wrote:
 this patch does allow me to read a batch written locally.

Thanks, that insight makes a batch test I tried with 2.5.7 finally work
(i.e. I explicitly specify --no-whole-file in the options), so this bug
has been around for quite awhile.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


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

2004-05-04 Thread Chris Shoemaker
On Fri, Apr 30, 2004 at 10:32:18AM -0700, Wayne Davison wrote:
 On Thu, Apr 29, 2004 at 05:00:32PM -0400, Chris Shoemaker wrote:
  Instead of any update, with the --write-batch=mytest argument, rsync just hangs.
 
 The batch code is still experimental (as noted in the man page), so I'm
 not surprised by this.  The code still needs someone to test it and fix
 it to make it solid.  Any volunteers?
 
 ..wayne..

I'd like to see it working, so I'll see how much I can help.

Just so I'm on the right page, AFAICT, batch mode doesn't work _at all_.  
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...

  --Chris
Index: generator.c
===
RCS file: /cvsroot/rsync/generator.c,v
retrieving revision 1.79
diff -r1.79 generator.c
48a49
 extern int read_batch;
216c217
   if (whole_file == 0 || write_batch)
---
   if (whole_file == 0 || write_batch || read_batch)
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: --write-batch just hangs?

2004-04-30 Thread Wayne Davison
On Thu, Apr 29, 2004 at 05:00:32PM -0400, Chris Shoemaker wrote:
 Instead of any update, with the --write-batch=mytest argument, rsync just hangs.

The batch code is still experimental (as noted in the man page), so I'm
not surprised by this.  The code still needs someone to test it and fix
it to make it solid.  Any volunteers?

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


--write-batch just hangs?

2004-04-29 Thread Chris Shoemaker
I'm using rsync version 2.5.7, and I see this behavior with Debian and Redhat 
installations.

This works:
rsync  rsync://mirror.physics.ncsu.edu/redhat/linux/updates/9/en/os/i386/zebra* ./temp

But this doesn't:
rsync --write-batch=mytest 
rsync://mirror.physics.ncsu.edu/redhat/linux/updates/9/en/os/i386/zebra* ./temp

I've also tried with my normal args, like -v --progress -t --recursive, but 
always with the same results:

Instead of any update, with the --write-batch=mytest argument, rsync just hangs.
I've looked at the issue with strace and ethereal.

What rsync _does_ do, in the --write-batch case, is:
  1) connect to the server
  2) find the directory
  3) print the MOTD
  4) exchange protcol versions (26)
  5) create mytest.rsync_argvs, containing only rsync --read-batch=mytest 
${1:-./temp}, in the current working dir
  6) calls brk successfully
  7) calls select with a timeout of 60 sec, which times-out every time, indefinitely.


Any ideas?

-Chris


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html