Bug 1190619

Summary: ntpd -x steps clock on leap second
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Lichvar <mlichvar>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: Jakub Prokes <jprokes>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.6CC: chorn, fkrska, jherrman, john.haxby, jprokes, juzou, mdshaikh, michele, mmatsuya, mschuppe, msugaya, ovasik, psklenar, qguo, rupatel, rvdwees
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ntp-4.2.6p5-3.el6 Doc Type: Bug Fix
Doc Text:
Previously, when the ntpd daemon was configured with the "-x" option to adjust the system clock slowly instead of changing the time instantaneously, the system clock was incorrectly changed instantaneously when a leap second occurred. In certain applications, this could lead to a variety of system clock related problems, such as incorrect event sorting or triggering. To fix this bug, ntpd now adjusts for the leap second slowly over a long interval, which prevents the described problems.
Story Points: ---
Clone Of:
: 1191122 1196635 1199978 1381600 (view as bug list) Environment:
Last Closed: 2015-07-22 07:00:28 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:
Bug Depends On:    
Bug Blocks: 1199978, 1381600    

Description Miroslav Lichvar 2015-02-09 09:49:28 UTC
Description of problem:
With older ntp versions, the -x option was sometimes used as a workaround to avoid kernel inserting/deleting leap seconds by stepping the clock and possibly upsetting running applications. That no longer works with 4.2.6 as ntpd steps the clock itself when a leap second occurs.

The fix is to treat the one second offset gained during leap second as a normal offset and check the stepping threshold (set by -x or tinker step) to decide if a step should be applied.

Version-Release number of selected component (if applicable):
ntp-4.2.6p5

How reproducible:
Always

Steps to Reproduce:
1. add -x to /etc/sysconfig/ntpd
2. wait for leap second
3. observe how was clock corrected

Actual results:
step

Expected results:
slew

Comment 1 Christian Horn 2015-02-18 08:34:00 UTC
Just so its all together:

upstream bz: http://bugs.ntp.org/show_bug.cgi?id=2745

discussion in upstream seeded by Miroslav, wether one should get the behaviour to "get leapseconds slowly" or not: 
http://lists.ntp.org/pipermail/questions/2015-February/039885.html

Comment 14 Muneaki Sugaya 2015-03-23 06:21:02 UTC
Bug 1199978 is this clone for rhel-6.6.z and has released ntp-4.2.6p5-3.el6_6 which can be used for the following:

Red Hat Enterprise Linux Desktop (v. 6)
Red Hat Enterprise Linux HPC Node (v. 6)
Red Hat Enterprise Linux Server (v. 6)
Red Hat Enterprise Linux Server EUS (v. 6.6.z)
Red Hat Enterprise Linux Workstation (v. 6)

cf.
https://rhn.redhat.com/errata/RHBA-2015-0690.html

Comment 17 errata-xmlrpc 2015-07-22 07:00:28 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://rhn.redhat.com/errata/RHSA-2015-1459.html