Bug 5074 - Push to a daemon with --only-write-batch modifies dest and then hangs
Summary: Push to a daemon with --only-write-batch modifies dest and then hangs
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.0
Hardware: x86 Linux
: P3 major (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-11 16:08 UTC by Matt McCutchen
Modified: 2008-07-26 10:18 UTC (History)
0 users

See Also:


Attachments

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.)
./stop
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.