Bug 8565 - rsync hangs when using --only-write-batch and --hard-links
Summary: rsync hangs when using --only-write-batch and --hard-links
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
: 8804 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-02 22:02 UTC by samba-bugzilla
Modified: 2012-03-13 00:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description samba-bugzilla 2011-11-02 22:02:44 UTC
rsync (sometimes) hangs when trying to build a batch file containing hardlinked files.

Here's a way to reproduce the problem:
mkdir new; cd new; mkdir a; mkdir a/b; mkdir c; touch a/b/1; ln a/b/1 c/2; cd ..; rsync --only-write-batch=batch_file -a -H --delete new/ old/

Expected result:
rsync exits normally (leaving behind a well-formed batch_file) or at least exits with an error

Actual result:
rsync hangs indefinitely, causing any script which called it to wait on it forever

I confirmed the issue with the sources in http://rsync.samba.org/ftp/rsync/nightly/rsync-HEAD-20111022-1730GMT.tar.gz but 3.0.9 was already affected.
Comment 1 Wayne Davison 2012-01-28 20:07:49 UTC
I'm checking in a fix for this.  Thanks for the report!
Comment 2 Wayne Davison 2012-03-13 00:11:41 UTC
*** Bug 8804 has been marked as a duplicate of this bug. ***