Bug 1302041

Summary: chrony is unable to correct the time with kernel 4.5
Product: [Fedora] Fedora Reporter: Paul Whalen <pwhalen>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gansalmon, itamar, john.stultz, jonathan, kernel-maint, madhu.chinakonda, mchehab, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-23 18:11:02 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:

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.