Bug 1985 - rsync hangs reading pipe
Summary: rsync hangs reading pipe
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.3
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-02 05:59 UTC by Ruediger Oertel
Modified: 2005-04-01 11:22 UTC (History)
0 users

See Also:


Attachments
shell script to reproduce the rsync problem (203 bytes, text/plain)
2004-11-02 23:13 UTC, Uwe Girlich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruediger Oertel 2004-11-02 05:59:54 UTC
(got this bug report as maintainer here at suse) 
If rsync runs with --link-dest and there is a named pipe in link-dest with the 
same name as one of the regular files in the source dir, rsync hangs in opening 
this pipe (to compare the content with the file). 
 
If the object types are different (file vs named pipe), no comparison is needed 
any more.
Comment 1 Uwe Girlich 2004-11-02 23:13:28 UTC
Created attachment 753 [details]
shell script to reproduce the rsync problem

This shell script creates some directories, a file and a named pipe. Then
it tries to copy the "from" directory to "to" with respect to the directory
"link". rsync is started with maximum verbose mode. It will hang opening the
pipe.
Comment 2 Wayne Davison 2004-11-03 13:21:13 UTC
The generator is smart enough to avoid the named pipe, but the receiver is doing
a much cruder, duplicate search to try to deduce what basis file the generator
selected.  The proper fix is to start having the generator tell the receiver
what basis file it used, thus avoiding the duplicate search, any potential
confusion caused by selecting the wrong basis file, and (of course) this
named-pipe bug.

I just checked in a new version of the patches/g2r-basis-filename.diff into CVS
that optimizes the flushing of the buffered I/O (which was the one thing I
wanted to finish before considering the patch for inclusion on the trunk).

So, this improvement will be checked into the trunk very soon now.  If you'd
like to try out the patches/g2r-basis-filename.diff, feel free.  It needs some
robustness testing before being inflicted on an unsuspecting world, however.
Comment 3 Wayne Davison 2004-11-19 10:14:40 UTC
The fix for this was checked into CVS.