ntpd should take a -x parameter w/out an option. The version distributed says -x
requires an argument incorrectly.
The bug came from the droproot patch to ntpd. The patch below is what needs to
change to get the -x to operate correctly. This is against the cmd_args.c file
in ntp/ntpd. The : following the option indicates the option requires an
argument. The droproot patch mistakenly added a : after the x when appending the
This problem exists in at least 2.1AS and 8.0. I was working with the 8.0 SRPM.
It should be very similar if not identical for the 2.1AS.
--- cmd_args.c.orig 2002-10-09 16:23:31.000000000 -0500
+++ cmd_args.c 2002-10-09 16:23:13.000000000 -0500
@@ -15,7 +15,7 @@
extern char const *progname;
int listen_to_virtual_ips = 0;
-static const char *ntp_options = "aAbc:dD:f:gk:l:LmnN:p:P:qr:s:t:v:V:x:U:T:";
+static const char *ntp_options = "aAbc:dD:f:gk:l:LmnN:p:P:qr:s:t:v:V:xU:T:";
/* Drop root patch */
extern char *server_user;
good point... dooh..
there will be an erratum
Is this available in an errata yet?
waiting in the QA queue... sorry
Will the anticipated errata also keep ntp from slightly skewing the time when
using the -x option?
The recommended -g parameter in addition to the step tickers file to correct the
drift has no effect. The clock continues to slew out of sync. Ntp produced the
same results. Once ntp begins to slew the clock, it will never slew the time
back into sync and ntp continues to adjust the time futher out of sync.
Regardless of the time source, ntp works correctly if it is set to step time.
ntp fails miserably if it slews the time.
Also, ntp-4.1.1a-8.AS21.1 still has the same problem as the prior versions.
We are seeing many customers with this problem. Please, please fix.
hmm, ntp uses adjtime, maybe the error is there??
Ulrich, Jakub? Any known issues? Also, should ntp use ntp_adjtime??
All adjtime is doing is converting the time back and forth from and to struct
timeval format and then it calls ntp_adjtime. ntp_adjtime takes the time as an
integer in 5sec. It should make much of a difference to call ntp_adjtime directly.
you may want to try
This version uses ntp_adjtime vs. __adjtime in the old version.
Please give it the -x slew test..
that is... sorry
is with minimal changes... erratum is in the queue
Created attachment 89416 [details]
fix ntpd -x skew bug
This patch is to fix ntpd -x skewing bug.
Apply to "/usr/src/linux-2.4/kernel/time.c".
This problem causes kernel bug.
The do_adjtimex() function in /usr/src/linux-2.4/kernel/time.c is wrong
implementation. When the time difference of a server and a client becames
0.512 or more, ntpd stop skewing.
Since a clock is set by "step" with a difference for 0.128 seconds while not
using -x options, this is happend only while using -x option.
This implementation is very strange in comparison with other OS's,
such as FreeBSD, Solaris and HP-UX.
Then, I corrected Linux kernel to reference for the source code of FreeBSD.
Try my patch.
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.