Port-evbmips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
'ntpd' "invalid struct timex pointer" on Lemote Yeeloong (LOONGSON)
Now that LOONGSON-derived systems work again and the NFS-write issues
seem to be fixed (thanks again Nick!), perhaps other issues can be
investigated.
This one is, at the moment, only annoying. Every few minutes a message
like:
Sep 9 10:17:36 chalk ntpd[436]: local_clock: x/current/src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c line 819: invalid struct timex pointer: 0x1010a358
is logged to the console (and /var/log/messages). It is interesting to
note that there are two 'ntpd' processes:
ntpd 436 1 436 f84dc8 0 Ss ? 0:04.04 /usr/sbin/ntpd -u ntpd:ntpd -i /var/chroot/ntpd -p /var/run/ntpd.pid -g
ntpd 470 436 436 f84dc8 0 S ? 0:02.04 /usr/sbin/ntpd -u ntpd:ntpd -i /var/chroot/ntpd -p /var/run/ntpd.pid -g
while all of the properly-operating systems I've seen typically have
just one. I've seen that pattern before on a system where there was
some configuration error (such as file owner/group/modes incorrect),
but I forget the specifics now.
The line number referenced in the log message is around:
815 /*
816 * A squeal is a return status < 0, or a state change.
817 */
818 if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) {
819 kernel_status = ntp_adj_ret;
820 ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
821 }
822 pll_status = ntv.status;
Thoughts, suggestions?
On a GCC 5.4-built system, 'ntpd' emits one message of:
Sep 9 15:42:29 chalk ntpd[411]: set_freq: x/current/src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c line 1083: invalid struct timex pointer: 0x1010cc68
shortly after the system finishes startup and then has so-far not produced
any further 'ntpd'-related messages. There are briefly two 'ntpd' processes
running at that point, but afterwards, only one remains:
ntpd 411 1 411 f84d78 0 Ss ? 0:02.39 /usr/sbin/ntpd -u ntpd:ntpd -i /var/chroot/ntpd -p /var/run/ntpd.pid -g
The line cited in the message is in:
1052 /*
1053 * set_freq - set clock frequency correction
1054 *
1055 * Used to step the frequency correction at startup, possibly again once
1056 * the frequency is measured (that is, transitioning from EVNT_NSET to
1057 * EVNT_FSET), and finally to switch between daemon and kernel loop
1058 * discipline at runtime.
1059 *
1060 * When the kernel loop discipline is available but the daemon loop is
1061 * in use, the kernel frequency correction is disabled (set to 0) to
1062 * ensure drift_comp is applied by only one of the loops.
1063 */
1064 static void
1065 set_freq(
1066 double freq /* frequency update */
1067 )
1068 {
1069 const char * loop_desc;
1070 int ntp_adj_ret;
1071
1072 (void)ntp_adj_ret; /* not always used below... */
1073 drift_comp = freq;
1074 loop_desc = "ntpd";
1075 #ifdef KERNEL_PLL
1076 if (pll_control) {
1077 ZERO(ntv);
1078 ntv.modes = MOD_FREQUENCY;
1079 if (kern_enable) {
1080 loop_desc = "kernel";
1081 ntv.freq = DTOFREQ(drift_comp);
1082 }
1083 if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
1084 ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, 0, 0, __LINE__ - 1);
1085 }
1086 }
1087 #endif /* KERNEL_PLL */
1088 mprintf_event(EVNT_FSET, NULL, "%s %.3f PPM", loop_desc,
1089 drift_comp * 1e6);
1090 }
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index