specifying --bwlimit together with --daemon fails
paul at debian.org
Wed Nov 17 18:20:34 GMT 2004
I received a bug report that starting with 2.6.3, rsync fails when
started from inetd with the --bwlimit option (actually, I narrowed it
down to that :-). Earlier rsync versions did work.
What I see from the strace output is that the rsync --daemon process
sets fd 0 to ON_NONBLOCK, then does a select() on fd 0 for write (which
shows it's ready for writing), and then does a write of zero bytes,
which returns 0 (of course), and that is apparently interpreted as a
failure, at which point it syslogs the following:
Nov 17 19:07:38 preston rsyncd: rsync: writefd_unbuffered failed to write 12 bytes: phase "unknown" [receiver]: Success (0)
Nov 17 19:07:38 preston rsyncd: rsync error: error in rsync protocol data stream (code 12) at io.c(909)
I see it thinks it's trying to write 12 bytes, but strace tells
otherwise... I guess that the bwlimit algorithm is working against us
here. Unfortunately I can't look into the code right now; I'll look
tomorrow (GMT) if no one else has beaten me to it...
For reference, the bug report can be found at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug= 281519 (remove the
space after bug= ; these pages are regularly harvested by spammers :-( ).
More information about the rsync