Bug 1493452 - ntpd clears STA_UNSYNC on start
Summary: ntpd clears STA_UNSYNC on start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ntp
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: Andrej Dzilský
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-20 08:52 UTC by Miroslav Lichvar
Modified: 2018-04-10 15:26 UTC (History)
2 users (show)

Fixed In Version: ntp-4.2.6p5-28.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:25:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Network Time Protocol 3434 0 None None None 2019-03-12 15:37:14 UTC
Red Hat Product Errata RHSA-2018:0855 0 None None None 2018-04-10 15:26:24 UTC

Description Miroslav Lichvar 2017-09-20 08:52:21 UTC
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 15:47:41 UTC
ntp_adjtime() and ntp_gettime() now correctly return error codes.

Comment 5 errata-xmlrpc 2018-04-10 15:25:54 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/RHSA-2018:0855


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