RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1672779 - Rsync bug resets modification time of every destination file that has not changed
Summary: Rsync bug resets modification time of every destination file that has not cha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsync
Version: 7.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Ruprich
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1709724
TreeView+ depends on / blocked
 
Reported: 2019-02-05 21:50 UTC by Dave Dykstra
Modified: 2020-03-31 19:43 UTC (History)
3 users (show)

Fixed In Version: rsync-3.1.2-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:43:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (2.93 KB, patch)
2019-02-26 09:38 UTC, Michal Ruprich
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1046 0 None None None 2020-03-31 19:43:38 UTC

Description Dave Dykstra 2019-02-05 21:50:57 UTC
Description of problem:
The current rsync version in RHEL 7.6 has a bug that is significantly hurting our performance.  It sets the modification time with utimensat() on every destination file, even when they haven't changed, when the source filesystem has nanosecond granularity and the destination filesystem has second granularity.

Version-Release number of selected component (if applicable):
3.1.2-4.el7

How reproducible:
Very

Steps to Reproduce:
Assuming /tmp is a filesystem like ext4 with nanosecond granularity
1. cd /tmp
2. mkdir in out
3. dd if=/dev/zero of=out.ext3 bs=1M count=10
4. mkfs -t ext3 out.ext3
answer y
5. sudo mount -o loop out.ext3 /tmp/out
6. sudo chown $LOGNAME out
7. echo hello >in/file
9. rsync -a in/ out/
10. strace -f rsync -a in/ out/ 2>&1 | grep utimensat

Actual results:
Prints two calls to utimensat every time command 10 is run.

Expected results:
No calls to utimensat.

Additional info:

This bug was introduced in bug #1393543 which upgraded to rsync-3.1.2-4 and introduced support for nanosecond timestamps.  This is a known bug upstream that was fixed in rsync-3.1.3, released January 2018.  Here is the patch:

https://git.samba.org/?p=rsync.git;a=patch;h=0f8e9e2d8638e47d646a6baba694b303ac84e695;hp=c4a3f55be35726d0a033996dc37b0fb248b45cb5

I added the patch to a private build of the rsync-3.1.2-4.el7.src.rpm and it solved the problem.  

Besides the extra overhead of unnecessarily setting the timestamp, this hurts our performance worse because we are writing into a filesystem based on overlayfs and it is causing every file to be copied into the upper layer.  Those files are then processed further by our application (cvmfs) which has even more overhead.

There were also two security fixes in rsync-3.1.3 that do not appear to be in the RHEL 7.6 distribution.  See these descriptions:

https://rsync.samba.org/security.html#s3_1_3
https://download.samba.org/pub/rsync/src/rsync-3.1.3-NEWS

Comment 2 Michal Ruprich 2019-02-26 09:38:32 UTC
Created attachment 1538721 [details]
Patch

Just adding the patch as an attachment for completion.

Comment 3 Dave Dykstra 2019-08-12 22:12:15 UTC
Please don't forget about this, it's still a problem.

Comment 10 errata-xmlrpc 2020-03-31 19:43:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1046


Note You need to log in before you can comment on or make changes to this bug.