Interactive engineering lab

Pull progress watchdog: missed events and false timeouts

Pull progress watchdog: missed events and false timeouts. Replay an image pull and see when a skipped event cancels a working unpack.

By Sandeep Belgavi · Published 2026-12-06

Synthetic local computation. No reviewer queue, registry or remote service is contacted.

Experiment workspace

Decision trace

    The mechanism

    containerd stops an image pull when an active request makes no progress for image_pull_progress_timeout, 5 minutes by default. The reporter counts active requests from progress events: the first downloading event for a layer adds one, a complete event removes it. A tracker polls every 300 ms and sends the event that matches the state it finds. If unpacking of a layer starts before the poll that would have seen its download finish, the tracker sends extracting instead of complete. Version 2.4.2 ignores extracting, so the counter leaks; 2.4.3 treats it as completion.

    Synthetic fixture and controls

    The default image has three layers: base 40 MB downloaded in 3.1 s, weights 3,800 MB downloaded in 60.1 s, and config 15 MB downloaded in 1.5 s. Downloads run in parallel; unpacking runs in layer order, starting after the configured gap and after the previous unpack. The weights layer takes 340 s to unpack. A smaller image replaces the weights with a 220 MB layer. Controls set the handler version, the image, the gap between download and unpack, the tracker poll interval and the no-progress timeout, where 0 disables the watchdog.

    Expected outcomes

    With 2.4.2, a 50 ms gap, 300 ms polls and the 300 s timeout, the base and weights layers both start unpacking before a poll sees their downloads finish, so 2 counters leak. The last new bytes arrive at 60 s, and with checks every 10 s the watchdog cancels the pull at 370 s, before it would have finished at 402.15 s. With 2.4.3 the same pull completes. With a 400 ms gap every download is seen as complete first and 2.4.2 also completes. A timeout of 0 lets the pull finish with the counter still leaked. The smaller image finishes at 34.15 s, long before the timeout matters.

    Read the decisions

    Times in the trace are seconds from the start of the pull. Download done and unpack start lines show the race directly: when unpack starts before the next poll, the line says so. Request done lines show the counter falling. Event ignored lines show a 2.4.2 handler dropping an extracting or extracted event. A cancelled line shows the check that fired, the active count and when bytes last increased. The layer timeline below the metrics lists when each download ended and when each unpack ran.

    Experiment before changing a timeout

    Find the smallest gap at which 2.4.2 stops leaking with 300 ms polls, then change the poll interval and see how the window moves. Raise the timeout until 2.4.2 completes the default image and compare that value with the unpack time of the weights layer. Lower the timeout to 10 s and note that checks then run every 5 s. Switch to 2.4.3 and confirm that no setting of gap or poll interval leaks. Export records the inputs, the layer timeline and the full trace.

    Limits and production verification

    This models the CRI transfer progress reporter and the transfer tracker from the 2.4.2 and 2.4.3 source with fixed, synthetic timings. It does not model registry behaviour, real unpack progress reporting, concurrent pulls or the local pull path. It was not run against containerd. To check a node, read the containerd version and image_pull_progress_timeout, look for no progress cancellations in the containerd log, and upgrade to 2.4.3, 2.3.8 or later as the linked article describes.

    Views are my own and do not represent any employer, past or present.