:: Re: [DNG] systemd breaking linuxcnc…
Top Page
Delete this message
Reply to this message
Author: Andreas Messer
Date:  
To: dng
Subject: Re: [DNG] systemd breaking linuxcnc ...
On Mon, Jan 27, 2020 at 04:17:20PM -0800, Rick Moen wrote:
> Quoting Dr. Nikolaus Klepp (dr.klepp@???):
>
> > Just for your amusement: systemd breaks linuxcnc on RPi4 - who's not
> > into machining will most likely not see the fun part of it, but anyway
> > :)
> >
> > https://www.youtube.com/watch?v=RDKaFJmB254
> [...]
> un-gentle jerk-forward-or-back of time all at once -- as opposed to the
> gradual adjustment any of the real NTP daemons would do -- and that such
> rough time discontinuities are problematic for real-time operations.


Problems are not limited to real time operation. Stepping time,
especially stepping backward will also break time flow of file timestamps.
This can cause problem e.g. if you have script, which relies on file
timestamps and the time steps back between touching a file and using
its timestamp. Also it can happen that the atime becomes earlier than the
ctime of a file. The "make" build tool also uses timestamps :-)

> (It's distinctive that the entire RPi series lacks by default any RTC
> circuitry, so it's particularly vulnerable to such software problems.)


This problem has no relation to the existence of a hardware RTC or not.
On Linux, the hardware RTC is in almost any case only read when the system
boots/resumes and updated on system shutdown/sleep. During operation,
Linux always uses a software RTC. (Otherwise system would be very slow,
since accessing a hardware RTC is time consuming operation)

The point with RPi is, that it has no RTC and thus can not restore
current time on boot/resume. Thus in order to get the current time,
an RPi must use some kind of NTP protocol. (And needs connection to
a time server)

cheers,
Andreas
--
gnuPG keyid: 8C2BAF51
fingerprint: 28EE 8438 E688 D992 3661 C753 90B3 BAAA 8C2B AF51