Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] ntp_adjtime (2) failed: Invalid argument
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
acmondor
n00b
n00b


Joined: 08 Aug 2014
Posts: 35
Location: Canadian Prairies

PostPosted: Fri Mar 20, 2015 11:59 pm    Post subject: [SOLVED] ntp_adjtime (2) failed: Invalid argument Reply with quote

For the past month I had trouble with openntpd on a x86 system. The trouble started after the system was upgraded to sys-kernel/gentoo-sources-3.18.7. The logs on the system looked like this:

Code:
Mar 16 03:21:28 pab001 ntpd[2192]: adjusting local clock by 0.073033s
Mar 16 03:21:28 pab001 ntpd[2194]: clock is now synced
Mar 16 03:26:17 pab001 ntpd[2192]: adjusting local clock by 0.037501s
Mar 16 03:26:49 pab001 ntpd[2194]: clock is now unsynced
Mar 16 03:27:18 pab001 ntpd[2194]: peer 167.88.40.177 now invalid
Mar 16 03:27:52 pab001 ntpd[2194]: peer 208.73.56.29 now invalid
Mar 16 03:29:29 pab001 ntpd[2194]: clock is now synced
Mar 16 03:38:10 pab001 ntpd[2194]: peer 69.28.67.44 now valid
Mar 16 03:38:41 pab001 ntpd[2194]: peer 69.28.67.44 now invalid
Mar 16 03:47:11 pab001 ntpd[2194]: peer 72.51.27.50 now valid
Mar 16 03:49:19 pab001 ntpd[2194]: peer 162.244.25.186 now valid
Mar 16 03:49:22 pab001 ntpd[2192]: adjusting local clock by 0.072779s
Mar 16 03:49:22 pab001 ntpd[2192]: adjusting clock frequency by 67.300426 to 67.300426ppm
Mar 16 03:49:22 pab001 ntpd[2192]: ntp_adjtime (2) failed: Invalid argument
Mar 16 03:50:30 pab001 ntpd[2194]: peer 174.137.63.116 now valid
Mar 16 03:53:04 pab001 ntpd[2192]: adjusting local clock by 0.061307s
Mar 16 03:53:12 pab001 ntpd[2194]: peer 162.244.25.186 now invalid
Mar 16 03:53:37 pab001 ntpd[2192]: adjusting local clock by 0.048340s
Mar 16 03:53:37 pab001 ntpd[2194]: clock is now unsynced
Mar 16 03:58:01 pab001 ntpd[2194]: clock is now synced
Mar 16 04:09:41 pab001 ntpd[2192]: adjusting local clock by 0.036005s
Mar 16 04:18:41 pab001 ntpd[2192]: adjusting clock frequency by 101.729107 to 101.729107ppm
Mar 16 04:18:41 pab001 ntpd[2192]: ntp_adjtime (2) failed: Invalid argument
Mar 16 04:21:20 pab001 ntpd[2194]: peer 208.73.56.29 now valid
Mar 16 04:24:45 pab001 ntpd[2194]: peer 72.51.27.50 now invalid
Mar 16 04:30:06 pab001 ntpd[2194]: peer 69.28.67.44 now valid


That is, the clock kept going in and out of sync and every attempt to adjust the clock frequency failed.

I did many Internet searches to try and resolve the problem and it wasn't until I dug into the code and isolated the problem the kernel that I was able to determine was a known issue.

This problem was fixed by kernel commit 29183a70b0b828500816bd794b3fe192fce89f73 (see https://lkml.org/lkml/2015/3/4/284) and that fix is included in 3.18.9 (see https://www.kernel.org/pub/linux/kernel/v3.0/ChangeLog-3.18.9) which has yet to be stabilized.

I did apply the patch to 3.18.7 manually and it does solve the above mentioned issues.

I hope someone finds this post useful.

Allan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum