FULL AI ANALYSIS

Ubuntu 22.04 LXC container clock jumps forward after host resume, cron misses jobs and ACME renewal fails

Generated Oct 18, 2026, 9:45:27 AM

Analysis summary

LXC containers inherit the host kernel clock namespace but may use virtualized RTC or have systemd behavior that ignores large steps. On resume, the host kernel time advances, but container userland sees differing RTC/time-source offsets (e.g., /dev/rtc or adjtime). systemd inside containers can refuse to step time if it's outside allowed bounds, leaving internal monotonic vs realtime mismatch. Common fixes: make container use host's realtime clock (mount /dev/rtc or /dev/ptp0), ensure systemd is allowed to step large offsets (configure TimeSync/Timezone settings), or run a small on-resume hook on the host to nsenter into containers to force an ntp sync. Also confirm kernel tick behavior and TSC stability flags.

Possible causes

Container systemd-timesyncd refuses to step large clock jumps; container sees stale RTC/timestamps after host resume

80%

LXC configuration isolates or provides an inconsistent /dev/rtc or pts time source leading to divergent realtime inside container

60%

Host kernel TSC/clocksource switch on resume not propagated into container namespaces causing monotonic/realtime mismatch

35%

Application-level caches/timeouts relying on monotonic clock misinterpret resumed host walltime leading to scheduled tasks skipped

20%

Suggested fixes

1

Diagnostic step 1

Configure containers to use host clock devices: in LXC config add lxc.cgroup.devices.allow for /dev/rtc and bind-mount /dev/rtc into container; test resume behavior.

2

Diagnostic step 2

Enable host-side resume hook that runs 'nsenter -t $(pidof systemd) -m -- systemctl restart systemd-timesyncd' for each container (or run timed 'ntpdate' inside containers) — reversible and safe.

3

Diagnostic step 3

Adjust systemd-timesyncd in containers: allow-step=true and lower the MaximumInitialClockDistance to permit stepping on large offsets; test on a single container.

4

Diagnostic step 4

If issues persist, enable detailed container journal logging for time events and consider filing with LXC/proxmox if kernel clocksource handling seems wrong.