Repository navigation
Description
Describe the bug
Two Raspberry Pi Zero W Rev 1.1 boards running 32-bit Raspbian Bookworm have intermittently fallen behind by about 71 min 35 s during operation. The application detects a large NTP offset and corrects the clock forward. The trigger is unknown.
| Board | Running kernel | Observation |
|---|---|---|
| A | 6.12.96+rpt-rpi-v6 | 2026-09-27: NTPsec recorded +4294.936 s and exited; the journal confirms a subsequent clock correction. |
| A | 6.12.109+rpt-rpi-v6 | 2026-10-13: +4294.035920 s measured and corrected. |
| B | 6.12.96+rpt-rpi-v6 | 2026-10-19: application logged a 4294 s correction; no journal confirmation of the step. |
| A | 6.12.109+rpt-rpi-v6 | 2026-11-17: +4294.844522 s measured; residual after correction −0.011612 s. |
On an earlier incident on board A, two public NTP references and the LAN reference independently agreed that the local clock was behind by about 4296 s.
Steps to reproduce the behaviour
No deterministic reproduction. The boards run headless, with Wi-Fi and Bluetooth active, and an application periodically comparing the local clock against NTP. Expected: the clock advances correctly during unattended operation. Observed: a sporadic large deficit, subsequently corrected forward. No stock-image or kernel-only A/B test has been performed.
Device (s)
Raspberry Pi Zero W / WH
System
Raspberry Pi Zero W Rev 1.1; Raspbian GNU/Linux 12 (Bookworm), armv6l.
Board A on 2026-11-17: 6.12.109+rpt-rpi-v6, package 1:6.12.109-1+rpt1 (build 2026-09-11); boot firmware 2026-09-14 (a86983925695); get_throttled=0x0. The refreshed Bookworm ARMv6 candidate 1:6.12.115-1+rpt1 has not yet been tested in this setup.
All four comparison boards reported active clocksource timer, mask 0xffffffff, and a 32-bit 1 MHz timer in the boot journal. All loaded the same BCM43430 WLAN firmware (7.45.98, FWID 01-8e14b897) and used NTPsec 1.2.2.
Logs
2026-11-17, monotonic journal timeline (seconds since boot):
- 313440.978: locally generated Wi-Fi disconnection; connection to a different AP 0.567 s later. DHCP renewed the same IPv4 address about 1.0 s after the disconnection.
- 313613.414: NTPsec stopped normally for the application-initiated correction, about 172 s after disconnection. No panic exit in this window.
- 313619.298: Tailscale detected the forward clock step during correction; this is not evidence of suspend.
- 313620.930: NTPsec started again.
- 313621.682: correction verified at 08:04:45 CET, applied correction +4294.844522 s, residual −0.011612 s.
About 45 minutes after correction two public NTP sources reported offsets below 2 ms. The latest large offset itself was measured against the LAN reference. The October journal also showed a nearby Wi-Fi reassociation but does not establish a causal link. No matching kernel error was found in the available journal.
Additional context
Two comparable Zero W Rev 1.1 boards still running 6.1.21+ with older boot firmware have no known matching incidents. Kernel, boot firmware and some user-space packages changed together, so this is an association, not an isolated kernel regression.
A full 32-bit timer period at 1 MHz is 4294.967296 s. The latest correction was about 0.123 s smaller. Could this signature indicate lost time in BCM2835 clocksource or clockevent handling? What low-overhead diagnostics would help distinguish a clock accounting error, an unexpected clock-set operation, and a prolonged stall?
A historical FreeBSD report gives a similar offset but does not establish a Linux cause: https://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004443.html
Activity
pelwell commentedon Nov 17, 2026
Thanks for the clear report. My first thought that the issue was the timer wrap handling, but this uses common Linux code and wrap is handled. Claude things instead that delays with interrupts disabled, as could easily happen on the single-core BCM2835, allow the timer to wrap while the interrupt is being configured, causing the 71 minute delay.
#7765 is a patch that detects that wrap and asks the kernel to retry. It has been compile-tested but not actually run on a BCM2835. You will be able to install a trial build in about 25 minutes by running
sudo rpi-update pulls/7765, after first reading the caveats.pelwell commentedon Nov 17, 2026
#7768 is the same change on rpi-6.12.y, if you'd rather test that.
FadiBunni commentedon Nov 28, 2026
A data point on what triggers this, and a confirmation that #7768 fixes it.
Setup: Pi Zero W (BCM2835, UP,
PREEMPT_VOLUNTARY, HZ=100), ondemand governor. After moving from 6.12.25 to 6.12.93 (rpi-6.12.yd8ab4e90), units started to hang completely every few hours:A unit caught alive showed the ondemand worker blocked in the firmware mailbox:
mbox_send_message()waits fortx_complete, which only the poll hrtimer delivers. That fits a missed compare match stopping all hrtimers. Meanwhile 125 SD writes were stuck in flight and 22 tasks were in D state.What made it frequent: stable commit 81c5d23 ("cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency") gives cpufreq-dt a 1 ms transition latency. That cuts the ondemand sampling interval on the Zero from about 6.4 s (6.12.25) to 20 ms. We measured about 350 frequency transitions per minute on a lightly loaded unit, and each does several firmware property calls with zero-delay hrtimers.
Reproducer: the
userspacegovernor plus a loop writing 700000 and 1000000 toscaling_setspeed, about 470 transitions per second.max_delta_nsof thetimerclock event device showed 2147483795001, so the patch was active.bgrasshoff commentedon Nov 28, 2026
My dedicated Raspberry Pi Zero W Rev 1.1 test unit has been running the #7768 build, kernel 6.12.118+, commit 0e8108f, since November 20, with no matching incident observed so far. It uses the ondemand governor. I have not run the frequency-switching reproducer.
A production unit retained on 6.12.109+rpt-rpi-v6 had another incident on November 25, requiring a +4294.684011-second correction. A separate unit running the stock 6.12.115+rpt-rpi-v6 package is also currently unaffected, with its latest boot on November 25.
bgrasshoff commentedon Dec 4, 2026
Update to my November 28 report: the production Pi Zero W Rev 1.1 running the stock 6.12.115+rpt-rpi-v6 package (1:6.12.115-1+rpt1) has now had a matching incident on December 4. This is the unit previously reported as unaffected on that version.
The application logs show the following sequence (local device wall-clock times, CET):
The measured deficit is only 0.051730 s below the 4294.967296 s period of a 32-bit 1 MHz timer. The discrepancy was already present before the 00:29 detection time. These application logs do not establish the exact onset or a causal relationship with WLAN; no kernel journal or independent monotonic timeline is available for this event.
This recurrence is on the stock 6.12.115 unit. The separate #7768 test unit is the 6.12.118+ build identified in my previous comment.