[Bug 1965076] Re: rsync --update incorrectly reports file "is newer" than itself
Andreas Hasenack
1965076 at bugs.launchpad.net
Fri Nov 11 20:42:09 UTC 2022
** Description changed:
[Impact]
- This bug causes rsync 3.2.3 to wrongly report files with an exact same mtime as being "newer"
- implying they would need to be transfered/sync'ed where in fact they are "uptodate".
+ This bug causes rsync 3.2.3 to wrongly report files with an exact same
+ mtime as being "newer" implying they would need to be transfered/sync'ed
+ where in fact they are "uptodate".
- This breaks users' scripts depending on "is newer" to signal that files need to be sync'ed
- when in fact, they don't need to be.
+ This breaks users' scripts depending on "is newer" to signal that files
+ need to be sync'ed when in fact, they don't need to be.
[Test Plan]
Steps to reproduce:
1. Create a local file:
$ touch foo
2. Check if rsync would transfer it using the --update option:
$ rsync -avv --update foo .
-
If the regression is present, "foo is newer" would be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is newer
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 61 bytes received 96 bytes 314.00 bytes/sec
total size is 0 speedup is 0.00
```
If the updated package is installed (from -proposed), "foo is uptodate"
should be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is uptodate
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 60 bytes received 106 bytes 332.00 bytes/sec
total size is 0 speedup is 0.00
```
[Regression potential]
The patch changes the behavior of --update so if something goes wrong, it could break backup/sync
jobs. To mitiate that, manual testing of rsync with and without the --update option was done
in addition to the quick [Test Plan] outlined above.
Please note the patch restores the behavior from before version 3.2.3 and has been integrated by upstream
in September 2021. It also is in Kinetic where no visible regression was observed.
-
[Original description]
rsync 3.2.3 has a broken "--update" option. See the examples below.
The "--update" option incorrectly makes rsync say a file is newer than itself.
Remove the "--update" option, and rsync correctly says the file is "uptodate".
The right output should of course be "is uptodate" in all cases.
This bug also shows up between machines if the source rsync is 3.1.3 and the destination is 3.2.3.
The bug does not show up if the source rsync is 3.2.3 and the destination is 3.1.3.
The bug was fixed upstream in June 2020: https://github.com/WayneD/rsync/issues/98
$ touch foo
$ rsync --update --info=skip foo foo
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
Obviously a file should not be listed as newer than itself. Another
way:
$ touch foo
$ rsync -avv --update foo .
delta-transmission disabled for local transfer or --whole-file
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 38 bytes received 96 bytes 268.00 bytes/sec
total size is 0 speedup is 0.00
$ rsync -avv foo .
delta-transmission disabled for local transfer or --whole-file
foo is uptodate <=== THIS IS CORRECT
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 41 bytes received 106 bytes 294.00 bytes/sec
total size is 0 speedup is 0.00
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: rsync 3.2.3-4ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-35.40-generic 5.13.19
Uname: Linux 5.13.0-35-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 15 22:47:44 2022
InstallationDate: Installed on 2022-03-16 (0 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: rsync
UpgradeStatus: No upgrade log present (probably fresh install)
** Description changed:
[Impact]
This bug causes rsync 3.2.3 to wrongly report files with an exact same
mtime as being "newer" implying they would need to be transfered/sync'ed
where in fact they are "uptodate".
This breaks users' scripts depending on "is newer" to signal that files
need to be sync'ed when in fact, they don't need to be.
[Test Plan]
Steps to reproduce:
1. Create a local file:
$ touch foo
2. Check if rsync would transfer it using the --update option:
$ rsync -avv --update foo .
If the regression is present, "foo is newer" would be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is newer
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 61 bytes received 96 bytes 314.00 bytes/sec
total size is 0 speedup is 0.00
```
If the updated package is installed (from -proposed), "foo is uptodate"
should be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is uptodate
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 60 bytes received 106 bytes 332.00 bytes/sec
total size is 0 speedup is 0.00
```
[Regression potential]
- The patch changes the behavior of --update so if something goes wrong, it could break backup/sync
- jobs. To mitiate that, manual testing of rsync with and without the --update option was done
- in addition to the quick [Test Plan] outlined above.
+ The patch changes the behavior of --update so if something goes wrong,
+ it could break backup/sync jobs. To mitiate that, manual testing of
+ rsync with and without the --update option was done in addition to the
+ quick [Test Plan] outlined above.
- Please note the patch restores the behavior from before version 3.2.3 and has been integrated by upstream
- in September 2021. It also is in Kinetic where no visible regression was observed.
+ Please note the patch restores the behavior from before version 3.2.3
+ and has been integrated by upstream in September 2021. It also is in
+ Kinetic where no visible regression was observed.
[Original description]
rsync 3.2.3 has a broken "--update" option. See the examples below.
The "--update" option incorrectly makes rsync say a file is newer than itself.
Remove the "--update" option, and rsync correctly says the file is "uptodate".
The right output should of course be "is uptodate" in all cases.
This bug also shows up between machines if the source rsync is 3.1.3 and the destination is 3.2.3.
The bug does not show up if the source rsync is 3.2.3 and the destination is 3.1.3.
The bug was fixed upstream in June 2020: https://github.com/WayneD/rsync/issues/98
$ touch foo
$ rsync --update --info=skip foo foo
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
Obviously a file should not be listed as newer than itself. Another
way:
$ touch foo
$ rsync -avv --update foo .
delta-transmission disabled for local transfer or --whole-file
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 38 bytes received 96 bytes 268.00 bytes/sec
total size is 0 speedup is 0.00
$ rsync -avv foo .
delta-transmission disabled for local transfer or --whole-file
foo is uptodate <=== THIS IS CORRECT
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 41 bytes received 106 bytes 294.00 bytes/sec
total size is 0 speedup is 0.00
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: rsync 3.2.3-4ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-35.40-generic 5.13.19
Uname: Linux 5.13.0-35-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 15 22:47:44 2022
InstallationDate: Installed on 2022-03-16 (0 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: rsync
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1965076
Title:
rsync --update incorrectly reports file "is newer" than itself
Status in rsync:
Fix Released
Status in rsync package in Ubuntu:
Fix Released
Status in rsync source package in Jammy:
In Progress
Bug description:
[Impact]
This bug causes rsync 3.2.3 to wrongly report files with an exact same
mtime as being "newer" implying they would need to be
transfered/sync'ed where in fact they are "uptodate".
This breaks users' scripts depending on "is newer" to signal that
files need to be sync'ed when in fact, they don't need to be.
[Test Plan]
Steps to reproduce:
1. Create a local file:
$ touch foo
2. Check if rsync would transfer it using the --update option:
$ rsync -avv --update foo .
If the regression is present, "foo is newer" would be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is newer
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 61 bytes received 96 bytes 314.00 bytes/sec
total size is 0 speedup is 0.00
```
If the updated package is installed (from -proposed), "foo is
uptodate" should be reported:
```
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
foo is uptodate
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 60 bytes received 106 bytes 332.00 bytes/sec
total size is 0 speedup is 0.00
```
[Regression potential]
The patch changes the behavior of --update so if something goes wrong,
it could break backup/sync jobs. To mitiate that, manual testing of
rsync with and without the --update option was done in addition to the
quick [Test Plan] outlined above.
Please note the patch restores the behavior from before version 3.2.3
and has been integrated by upstream in September 2021. It also is in
Kinetic where no visible regression was observed.
[Original description]
rsync 3.2.3 has a broken "--update" option. See the examples below.
The "--update" option incorrectly makes rsync say a file is newer than itself.
Remove the "--update" option, and rsync correctly says the file is "uptodate".
The right output should of course be "is uptodate" in all cases.
This bug also shows up between machines if the source rsync is 3.1.3 and the destination is 3.2.3.
The bug does not show up if the source rsync is 3.2.3 and the destination is 3.1.3.
The bug was fixed upstream in June 2020: https://github.com/WayneD/rsync/issues/98
$ touch foo
$ rsync --update --info=skip foo foo
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
Obviously a file should not be listed as newer than itself. Another
way:
$ touch foo
$ rsync -avv --update foo .
delta-transmission disabled for local transfer or --whole-file
foo is newer <=== THIS IS NOT CORRECT - A file can't be newer than itself.
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 38 bytes received 96 bytes 268.00 bytes/sec
total size is 0 speedup is 0.00
$ rsync -avv foo .
delta-transmission disabled for local transfer or --whole-file
foo is uptodate <=== THIS IS CORRECT
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 41 bytes received 106 bytes 294.00 bytes/sec
total size is 0 speedup is 0.00
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: rsync 3.2.3-4ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-35.40-generic 5.13.19
Uname: Linux 5.13.0-35-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 15 22:47:44 2022
InstallationDate: Installed on 2022-03-16 (0 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: rsync
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/rsync/+bug/1965076/+subscriptions
More information about the foundations-bugs
mailing list