tinypilot
tinypilot copied to clipboard
System clock updates can cause a TinyPilot update to time out
TinyPilot's update service times out if the update takes longer than 10 minutes.
The problem is that TinyPilot has no real time clock and relies on NTP to set time. Every time the Pi shuts off, its system clock falls behind until it contacts NTP to get the latest time.
If the system time updates in the middle of a TinyPilot update, the time jump forward will fool the update process into thinking that the update has timed out.
Example: https://github.com/tiny-pilot/tinypilot/issues/1392#issuecomment-1571733803
It's probably possible to avoid this by timing out based on a monotonic timer that doesn't change due to system time updates like time.monotonic.