You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Late-audio tests flake: the fixture script's summary print, and a racing queue sampler #982
Two tests in rust-modules/media/src/ff_late_audio_tests.rs fail intermittently in Simulator CI's "macOS tests against bundled FFmpeg and ASS" job. This happens on main and on branches that touch none of ff.rs, aq.rs or the engine.
an_audio_lane_filled_to_the_headroom_with_no_video_fails_the_open (:675, "mkv_audio_lead.py could not reorder the fixture").
The fixture script fails before the test runs. tests/mkv_audio_lead.py:119, in its final summary print, raises ValueError: Exceeds the limit (4300 digits) for integer string conversion.
The script prints a value derived from the file's bytes. With the temporal-noise video, that value can come out larger than Python's default conversion limit.
The sampler thread polls aq_bytes with yield_now. On a loaded runner it can miss every moment the lane held audio, so max_queued stays 0. That is a race between the test's own sampler and the demuxer, not a queue failure.
Done when:
the fixture script cannot fail on its own summary line;
the soft-cap test observes the lane's peak depth without a racing sampler, for example from a high-water mark kept by the queue or the test hook;
both are shown failing on the current code first, for example with a forced large value or a descheduled sampler, and passing after.
Hi! While looking at the flaky tests we found that both reported failures are already fixed on main, so I think this issue can be closed once #1181 is looked at. Details:
(a) The ValueError in the fixture script's summary line was ffmpeg's CRC-32 child of Tracks being parsed as a TrackEntry (#1124, 719fa41; tests/test_mkv_audio_lead.py fails against the old script with the 4300-digit error).
(b) The soft-cap test's 0 bytes was a sampler thread that could be told to stop before it ran once (#1126, 0266974; a_lane_probe_finished_at_once_still_samples_the_lane: the old loop read 0 in 198 of 200 rounds).
One window is left and it is NOT a flake. an_ordinary_file_never_raises_the_video_lane_cap (and the cap half of the soft-cap test) read the lane's cap through the same sampler, but a headroom grant can be taken and released again (aq_set_headroom, and the pop path walking the cap back down, aq.rs:470-513), so a grant that lives between two samples would go unseen: a false green, not the reported false red. Queued bytes are different: those lanes are never popped, so the last sample is the peak for bytes. Closing the cap window would need a high-water mark of the cap in the queue; it is left out until a test needs it (if ever, as a test-support-only field, not a production one).
The fixture script itself had one more hole that no muxer reaches (a TrackNumber, TrackType or Cluster Timestamp wider than EBML allows); #1181 bounds those reads (a small, optional hardening; no flake depends on it).
Thanks for filing these with so much detail, it made them quick to trace. (Part of the analysis was done with help from Claude Fable 5.1.)
Activity
Bardioc1977 commentedon Oct 31, 2026
Hi! While looking at the flaky tests we found that both reported failures are already fixed on
main, so I think this issue can be closed once #1181 is looked at. Details:(a) The
ValueErrorin the fixture script's summary line was ffmpeg's CRC-32 child of Tracks being parsed as a TrackEntry (#1124, 719fa41;tests/test_mkv_audio_lead.pyfails against the old script with the 4300-digit error).(b) The soft-cap test's
0 byteswas a sampler thread that could be told to stop before it ran once (#1126, 0266974;a_lane_probe_finished_at_once_still_samples_the_lane: the old loop read 0 in 198 of 200 rounds).One window is left and it is NOT a flake.
an_ordinary_file_never_raises_the_video_lane_cap(and the cap half of the soft-cap test) read the lane's cap through the same sampler, but a headroom grant can be taken and released again (aq_set_headroom, and the pop path walking the cap back down,aq.rs:470-513), so a grant that lives between two samples would go unseen: a false green, not the reported false red. Queued bytes are different: those lanes are never popped, so the last sample is the peak for bytes. Closing the cap window would need a high-water mark of the cap in the queue; it is left out until a test needs it (if ever, as a test-support-only field, not a production one).The fixture script itself had one more hole that no muxer reaches (a TrackNumber, TrackType or Cluster Timestamp wider than EBML allows); #1181 bounds those reads (a small, optional hardening; no flake depends on it).
Thanks for filing these with so much detail, it made them quick to trace. (Part of the analysis was done with help from Claude Fable 5.1.)
GLinnik21 commentedon Oct 31, 2026
Ok, set #1181 as a closing PR. Thank you!