Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1493452 - ntpd clears STA_UNSYNC on start
ntpd clears STA_UNSYNC on start
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ntp (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Miroslav Lichvar
Andrej Dzilský
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-20 04:52 EDT by Miroslav Lichvar
Modified: 2018-04-10 11:26 EDT (History)
2 users (show)

See Also:
Fixed In Version: ntp-4.2.6p5-28.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 11:25:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Network Time Protocol 3434 None None None 2017-09-20 04:52 EDT
Red Hat Product Errata RHSA-2018:0855 None None None 2018-04-10 11:26 EDT

  None (edit)
Description Miroslav Lichvar 2017-09-20 04:52:21 EDT
Description of problem:
When ntpd starts, it immediately resets the kernel clock status to STA_PLL
without STA_UNSYNC, before the clock is actually synchronized. This enables synchronization of the RTC and misleads applications that use ntp_gettime()/adjtimex() to check when the clock is synchronized.

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

How reproducible:
Always

Steps to Reproduce:
1. (re)start ntpd
2. run ntptime

Actual results:
ntp_gettime() returns code 0 (OK)
  time dd6ca9a3.d5c171d8  Wed, Sep 20 2017 10:47:31.834, (.834983622),
  maximum error 516 us, estimated error 16 us, TAI offset 0
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.000 us, frequency 0.000 ppm, interval 1 s,
  maximum error 516 us, estimated error 16 us,
  status 0x2001 (PLL,NANO),
  time constant 3, precision 0.001 us, tolerance 500 ppm,


Expected results:
ntp_gettime() returns code 5 (ERROR)
  time dd6ca9c4.cb7142ec  Wed, Sep 20 2017 10:48:04.794, (.794697494),
  maximum error 16000000 us, estimated error 16000000 us, TAI offset 0
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset 0.000 us, frequency 0.000 ppm, interval 1 s,
  maximum error 16000000 us, estimated error 16000000 us,
  status 0x2041 (PLL,UNSYNC,NANO),
  time constant 3, precision 0.001 us, tolerance 500 ppm,


Additional info:

Upstream bug report: http://bugs.ntp.org/show_bug.cgi?id=3434
Comment 2 Andrej Dzilský 2017-10-16 11:47:41 EDT
ntp_adjtime() and ntp_gettime() now correctly return error codes.
Comment 5 errata-xmlrpc 2018-04-10 11:25:54 EDT
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/RHSA-2018:0855

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