We are currently testing out Ubuntu Core for a system we are developing. It runs on an industrial PC (Intel Atom CPU). One of the tests we are doing is repeated boot-ups: the PC gets powered on, we try to SSH in and see if everything is running, see how long it takes to full operational state, and then power it off again. The PCs are not power down gracefully but hard (which might be part of the problem, but is unavoidable). These devices don’t have a permanent internet connection so we test them “offline” (just local LAN).
What happens is that after maybe 100 cycles, the system clock and real time clock are messed up. The RTC jumps back to (I’m guessing the production date) 2012 and the system clock jumps back to the last time the device had a internet connection (some weeks ago) and, I guess, received something on the NTP service.
I tried deactivating and masking the NTP-service for a test. I read that in some Linux distributions the NTP service updates the RTC in regular intervals to make sure they stay in sync and I was wondering if something gets messed up, if just during such an update the device gets shut off. But it didn’t help. Now the system clock jumps back to some date beginning of 2018 (I’m guessing that might have something to do with the image using core18 and the compilation time of some component of it).
Has anybody experienced something similar and/or knows what might cause it? Does anybody know how the interaction between RTC, NTP and system clock works on Ubuntu Core? I’m far from being an expert in these matters, so any help or pointer what to check next would be greatly appreciated.