rsync 2.6.6 nasty bug?

Jon Nelson jnelson-rsync at jamponi.net
Sat Dec 10 02:06:26 GMT 2005



I believe I have encountered a nasty bug with rsync 2.6.6 
"--delete-excluded" option. When this is enabled, rsync's operation 
appears to break entirely.

I have a script that I've been using for a few years. The script 
hasn't changed in the last year or so. Recently I upgraded from 
SuSE 9.3 to SUSE 10.0 which means that I went from rsync 2.6.3 (+ 
patches, I assume) to rsync 2.6.6.  It was at this point that the script 
stopped working.  I haven't had time to diagnose it until today. These 
are my findings:

To make sure it wasn't some non-rsync aspect of the system, I forcibly 
downgraded the rsync installation to the one from SuSE 9.3.  The script 
worked great!  I then installed the one from SUSE 10.0 - the script was 
broke.

I eventually boiled everything down to this:

The invocation on the client machine is:

rsync -avvvvv --delete-excluded --exclude-from=excludes \
  -e 'ssh' remote_machine:

This is what I get:

[client] parse_filter_file(excludes,0,3)
[client] add_rule(- *.mp3)
...
(Client) Protocol versions: remote=29, negotiated=29
(Server) Protocol versions: remote=29, negotiated=29
building file list ...
[sender] make_file(....) <- lots of this
...
recv_file_list done
rsync: writefd_unbuffered failed to write 4092 bytes: phase 
"send_file_entry" [sender]: Broken pipe (32)
get_local_name count=0 notebook.tmp
generator starting pid=8361 count=0
delta-transmission enabled
generate_files phase=1
recv_files(0) starting
Invalid file index: 1701734919 (count=0) [receiver]
_exit_cleanup(code=2, file=sender.c, line=163): entered
rsync error: protocol incompatibility (code 2) at sender.c(163)
_exit_cleanup(code=2, file=sender.c, line=163): about to call exit(2)
rsync: connection unexpectedly closed (9 bytes received so far) 
[generator]
_exit_cleanup(code=12, file=io.c, line=434): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(434)
_exit_cleanup(code=12, file=io.c, line=434): about to call exit(12)
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
_exit_cleanup(code=12, file=io.c, line=434): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(434)
_exit_cleanup(code=12, file=io.c, line=434): about to call exit(12)


If I remove the --delete-excluded part from the *client* invocation, 
everything appears to work just fine (except the excluded files aren't 
deleted).

It doesn't always die in the same place (same filename), but it always 
dies, and does so fairly quickly.

I can supply portions of straces, etc... if anybody is interested.
This seems like a pretty serious bug.

--
Jon Nelson <jnelson-rsync at jamponi.net>


More information about the rsync mailing list