Bug 5074 - Push to a daemon with --only-write-batch modifies dest and then hangs
Push to a daemon with --only-write-batch modifies dest and then hangs
Product: rsync
Classification: Unclassified
Component: core
x86 Linux
: P3 major
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2007-11-11 16:08 UTC by Matt McCutchen
Modified: 2008-07-26 10:18 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matt McCutchen 2007-11-11 16:08:29 UTC
Using the latest development rsync, if I push files to a daemon with --only-write-batch, the daemon makes some of the changes to the destination and then hangs.  The run should finish with no changes made to the destination.

To reproduce, run the following in an empty directory:

export PATH=/path/to/rsync/build/tree:$PATH
wget http://mattmccutchen.net/rsync/instant-daemon.sh
sh instant-daemon.sh module 3141 user
    (Choose a password and enter it twice)
mkdir upload
ln -s . upload/me
echo foo >upload/file
rsync -rl --only-write-batch=thebatch upload/ rsync://user@localhost:3141/module/
    (Enter the password)
    (When the process hangs, press ^C)
ls -la module
    (Note that the symlink was copied.)
Comment 1 Wayne Davison 2007-11-22 13:21:10 UTC
I have checked in a fix for this.  Thanks for finding the problem!

Aside: your instant-daemon.sh script should set mode 600 on the secret file or the daemon might refuse to use it.