DO NOT REPLY [Bug 4413] New: Rsync skips too many files after failing to create a directory

samba-bugs at samba.org samba-bugs at samba.org
Sun Feb 25 17:23:50 GMT 2007


https://bugzilla.samba.org/show_bug.cgi?id=4413

           Summary: Rsync skips too many files after failing to create a
                    directory
           Product: rsync
           Version: 2.6.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: hashproduct+rsync at gmail.com
         QAContact: rsync-qa at samba.org


When rsync fails to create a destination directory, it skips through the file
list until it reaches a file whose depth is less than or equal to that of the
destination directory (saved in missing_below).  This is wrong with
--no-implied -dirs because the failed directory could be followed by a deeper
file whose parent is not in the file list.

I reproduced this as follows:

$ mkdir src src/a src/b dest dest/b
$ echo data >src/b/file
$ chmod u-w dest
$ find . -ls
1590269  0 drwx------  4 matt  matt  96 Feb 25 12:16 .
1871292  0 drwx------  4 matt  matt  96 Feb 25 12:16 ./src
1881303  0 drwx------  2 matt  matt  48 Feb 25 12:16 ./src/a
1881688  0 drwx------  2 matt  matt  72 Feb 25 12:16 ./src/b
1882255  4 -rw-------  1 matt  matt   5 Feb 25 12:16 ./src/b/file
1881706  0 dr-x------  3 matt  matt  72 Feb 25 12:16 ./dest
1882122  0 drwx------  2 matt  matt  48 Feb 25 12:16 ./dest/b
$ rsync -i -a --relative --no-implied-dirs src/./a src/./b/file dest/
cd+++++++++ a/
rsync: recv_generator: mkdir "/home/matt/test/missing-below/dest/a" failed:
Permission denied (13)
*** Skipping everything below this failed directory ***
rsync error: some files could not be transferred (code 23) at main.c(977)
[sender=2.6.9]
$ rsync -i -a --relative --no-implied-dirs src/./b/file dest/
>f+++++++++ b/file

Notice that rsync skips "b/file" on the first run when "a" also happens to be
in the transfer but successfully transfers "b/file" if "a" is not in the
transfer.

I tried to test this with the current CVS rsync but got the following error,
which seems to indicate something awry in the incremental file-list building
(rsync tried to access src/src instead of src):

$ ~/rsync/rsync/rsync -i -a --relative --no-implied-dirs src/./a src/./b/file
dest/
rsync: link_stat "/home/matt/test/missing-below/src/src/./b/file" failed: No
such file or directory (2)

I think the excluded_below mechanism for daemon filters has the same problem as
missing_below.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list