infinite loop in rsync daemon on Mac OSX

Anthony DiSante orders at
Tue Sep 28 15:43:40 GMT 2004


I've got rsync --daemon running on an OSX machine, and I have it exporting 
the entire hard disk as [rootpath].  On my Linux machine, I run this:

rsync -avvv --delete --exclude /Volumes macbox::rootpath /mnt/bkup/macbox

I redirect the output from that command to a file (nohup.out), and then tail 
the file, and I see that it never gets beyond the recv_file_name() stage. 
In about 4 hours, the nohup.out file is 4.2GB (yes, gigabytes), and the 
rsync process dies with:

rsync: connection unexpectedly closed (847940065 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)
_exit_cleanup(code=12, file=io.c, line=342): about to call exit(12)

...and it hadn't transferred a single file.  There's only about 35GB of data 
on the macbox, and if I run a bunch of individual rsync commands to copy all 
macbox's directories one at a time, they all complete fine.

So I run the all-at-once rsync command again, but this time I kill it after 
10 minutes to check the nohup.out file (which is now about 170MB), and it 
turns out that it's full of duplicate lines:

[me at linuxbox]$ cat nohup.out |sort|uniq|wc
  469433 1016118 53240522
[me at linuxbox]$ wc nohup.out
1591372 3347600 179505609

So that's 1.6 million recv_file_name() lines, 70% of which are duplicates. 
It appears that it just keeps receiving the same filenames over and over 
till it craps out.  I've done this a few times, rebooted the machines, etc, 
and it happens every time.

Any ideas about this?

Anthony DiSante

More information about the rsync mailing list