Bug 1302041 - chrony is unable to correct the time with kernel 4.5
Summary: chrony is unable to correct the time with kernel 4.5
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-26 15:48 UTC by Paul Whalen
Modified: 2016-02-23 18:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-23 18:11:02 UTC
Type: Bug


Attachments (Terms of Use)

Description Paul Whalen 2016-01-26 15:48:19 UTC
Description of problem:
chrony is unable to correct the time with kernel 4.5.

Version-Release number of selected component (if applicable):
chrony-2.2.1-1.fc24.armv7hl
kernel-lpae-4.5.0-0.rc1.git0.1.fc24

How reproducible:
everytime, not arch specific 


Steps to Reproduce:
1. Stop chrony, move the system time back an hour, restart chrony

Actual results:
systemctl status chronyd
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-01-26 09:38:07 CST; 3min 0s ago
  Process: 1344 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
  Process: 1338 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 1342 (chronyd)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/chronyd.service
           └─1342 /usr/sbin/chronyd

Jan 26 09:38:13 localhost.localdomain chronyd[1342]: System clock wrong by 15.504773 seconds, adjustment started
Jan 26 09:38:13 localhost.localdomain chronyd[1342]: Could not step clock
Jan 26 09:38:15 localhost.localdomain chronyd[1342]: Received KoD RATE with poll 9 from 142.137.247.109, minpoll set to 9
Jan 26 09:38:15 localhost.localdomain chronyd[1342]: Received KoD RATE from 142.137.247.109, burst sampling stopped
Jan 26 09:38:15 localhost.localdomain chronyd[1342]: Selected source 192.95.20.208
Jan 26 09:38:15 localhost.localdomain chronyd[1342]: System clock wrong by 15.507726 seconds, adjustment started
Jan 26 09:38:15 localhost.localdomain chronyd[1342]: Could not step clock
Jan 26 09:39:19 localhost.localdomain chronyd[1342]: System clock wrong by 15.503298 seconds, adjustment started
Jan 26 09:39:19 localhost.localdomain chronyd[1342]: Could not step clock
Jan 26 09:40:24 localhost.localdomain chronyd[1342]: System clock wrong by 15.505400 seconds, adjustment started



Expected results:
corrected system time. 

Additional info:

Comment 1 Miroslav Lichvar 2016-01-26 16:22:56 UTC
This looks like a kernel bug, possibly from

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=37cf4dc3370fbca0344e23bb96446eb2c3548ba7

When chronyd tries to step the clock by calling adjtimex() with modes set to ADJ_SETOFFSET|ADJ_NANO, tv_usec is checked as microseconds, even though it's in nanoseconds, and for values >= 1000000 it fails with EINVAL.

Comment 2 John Stultz 2016-01-26 16:25:08 UTC
Yep. Fix for 4.5-rc is pending in the -tip/timers/urgent tree.

http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=timers/urgent&id=dd4e17ab704269bce71402285f5e8b9ac24b1eff

Comment 3 Paul Whalen 2016-02-23 18:11:02 UTC
This is now working again with later RC's. Closing.


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