Re: [chrony-dev] Re: Are there known issues in destructive tests on arm64 or ppc64

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Fri, Dec 06, 2019 at 12:35:21PM +0100, Christian Ehrhardt wrote:
> To summarize:
> - RTC init fails
> - SCH_MainLoop then hangs
> Could the second be a consequence of the first?
> Does this make sense to anyone?

It seems the RTC interrupts cannot be enabled. As Vincent suggests
this is probably due to the HW/driver.

With the -s option chronyd waits for the clock to be adjusted by RTC,
but that doesn't happen because there are no interrupts.

As a fix, I think we can change the error message to be fatal.

--- a/rtc_linux.c
+++ b/rtc_linux.c
@@ -566,8 +566,7 @@ switch_interrupts(int onoff)
   if (onoff) {
     status = ioctl(fd, RTC_UIE_ON, 0);
     if (status < 0) {
-      LOG(LOGS_ERR, "Could not %s RTC interrupt : %s", "enable", strerror(errno));
-      return;
+      LOG_FATAL("Could not %s RTC interrupt : %s", "enable", strerror(errno));
     }
     skip_interrupts = 1;
   } else {

Although, I'm not sure if we shouldn'd limit that just to the -s
option. Some users might have enabled rtcfile with such an RTC and
they have syslog full of error messages, but chronyd should otherwise
be working as expected.

As for the rtc system test, it should be modified to detect an RTC
which doesn't support interrupts and skip the test. I'm not sure how.
Does hwclock -r show anything interesting on this RTC?

-- 
Miroslav Lichvar


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/