Bug 1793880

Summary: Unreliable RTC synchronization (11-minute mode)
Product: Red Hat Enterprise Linux 8 Reporter: Miroslav Lichvar <mlichvar>
Component: kernelAssignee: Phil Auld <pauld>
kernel sub component: Scheduler QA Contact: Qiao Zhao <qzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: bhu, brdeoliv, chuhu, ffotorel, fgarciad, jeharris, jhuo, longman, mpoole, nmurray, pauld, pdwyer, prarit, qzhao, ravpatil, ruyang, shtiwari, skitt, smeisner, tnagata
Version: 8.1Keywords: Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-4.18.0-302.1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2135417 (view as bug list) Environment:
Last Closed: 2021-11-09 18:56:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Lichvar 2020-01-22 08:07:05 UTC
Description of problem:
The kernel doesn't seem to synchronize the RTC to the system clock reliably. It should normally set the RTC about every 11 minutes, but it may take a very long time (hours, days, or possibly never) for the update to actually happen. The problem seems to be in inaccurate scheduling of the update. This was observed with upstream kernels and also RHEL kernels.

An upstream report:
https://lkml.org/lkml/2019/11/27/263

Version-Release number of selected component (if applicable):
kernel-4.18.0-167.el8.x86_64

How reproducible:
Often, but not always.

Steps to Reproduce:
1. start chronyd with rtcsync in chrony.conf (that is the default)
2. chronyc waitsync
3. hwclock --set --date '10 sec'
4. wait >11 minutes
5. run timedatectl and compare "Local time" with "RTC time"

Actual results:
RTC time off by about 10 seconds

Expected results:
RTC time within <1 second of the Local time

Additional info:

Comment 12 Miroslav Lichvar 2020-12-14 09:32:26 UTC
After some discussion, a different fix was prepared (using a hrtimer) and is waiting to be merged:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=c9e6189fb03123a7dfb93589280347b46f30b161

Comment 22 kernel-workflow-bot 2021-03-12 22:42:27 UTC
The following Merge Request has pipeline job artifacts available:

Title: [RHEL8.5] Fix RTC synchronization
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/merge_requests/158
Pipeline: https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/pipelines/269596926

This Repo URL is *not* accessible from a web browser! It only functions as a dnf or yum baseurl.
Repo URL: https://s3.upshift.redhat.com/DH-PROD-CKI/internal/269596973/$basearch/4.18.0-296.el8.test.$basearch


4.18.0-296.el8.test.s390x:
Job: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420022
Gitlab browser: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420022/artifacts/browse/artifacts/repo/4.18.0-296.el8.test.s390x/
Current automated test status: success

4.18.0-296.el8.test.ppc64le:
Job: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420019
Gitlab browser: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420019/artifacts/browse/artifacts/repo/4.18.0-296.el8.test.ppc64le/
Current automated test status: success

4.18.0-296.el8.test.aarch64:
Job: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420018
Gitlab browser: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420018/artifacts/browse/artifacts/repo/4.18.0-296.el8.test.aarch64/
Current automated test status: success

4.18.0-296.el8.test.x86_64:
Job: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420017
Gitlab browser: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-internal-contributors/-/jobs/1093420017/artifacts/browse/artifacts/repo/4.18.0-296.el8.test.x86_64/
Current automated test status: success

Comment 36 errata-xmlrpc 2021-11-09 18:56:34 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 (Moderate: kernel security, bug fix, and enhancement update), 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/RHSA-2021:4356

Comment 41 Red Hat Bugzilla 2023-09-18 00:19:54 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days