Repository navigation
test(latency): skip the mixer latency tests on the macOS and Windows runners, and say why they fail - #1106
Conversation
…runners, and say why they fail Both tests from #1073 fail now and then on the macOS and Windows runners: the mixer posts no "Impossible to configure latency" warning at all. In a diag run on the macOS runner the unit test failed 1 of 12 full lib-suite runs with CI's environment, and 0 of 25 runs on its own. They now skip there through skip_known_ci_failure and still run on Linux and locally. The real-pipeline test moves from the lib into latency_diagnosis_test so it can reach that helper. When either fails, its message now carries the pipeline state, the warnings the bus carried, and what each mixer input answers at the deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
srperens
left a comment
There was a problem hiding this comment.
Area: tests, mixer latency diagnosis
Skips both #1073 mixer-latency tests on the macOS and Windows CI runners and adds failure diagnostics. The diagnostics are useful and the skip is precise. The stated cause is not settled, though, and the skip removes the only coverage on the two platforms where the failure is still unexplained.
Neighbours: no open PR touches this area. #964 matters here: Linux CI runs GStreamer 1.24.2, so after this PR these tests run only on 1.24.2. They no longer run on 1.26 (production) or 1.28 (macOS), which is where they fail.
- The skip is a runtime check (
backend/tests/common/mod.rs:69-77) and the list does not includelinux, so Linux CI still runs both tests. Local runs are not skipped either. - No issue tracks the cause or re-enabling the tests. If the mixer really goes silent under load, an operator on macOS or Windows gets no diagnosis, and Strom ships there. Naming an issue in the skip reason would let the
SKIP:line in CI logs point to it. - The 3 s and 5 s windows sit close to the 2 s jitterbuffer (inline).
Not verified: anything on the runners themselves. The upstream aggregator reading below comes from source and was not tested.
| //! | ||
| //! On a loaded runner the mixer sometimes posts no latency warning at all | ||
| //! (no warning reached the bus in 5 s, 1 of 12 full lib-suite runs on the | ||
| //! macOS runner). So both tests skip on the macOS and Windows runners, and |
There was a problem hiding this comment.
The PR body's lead cause is that the latency query fails at the PLAYING transition and "nothing queries again". Upstream GstAggregator (1.28 gstaggregator.c) does not seem to work that way. gst_aggregator_get_latency_unlocked re-runs the query while has_peer_latency is FALSE, which is only set on success, and gst_aggregator_wait_and_check calls it on every src-task wake. So the first slow buffer, about 2 s after PLAYING, should trigger a fresh query and a warning. Five silent seconds then points to a query that keeps failing, or to a src task that does not wake. A GST_DEBUG=aggregator:5 trace from the runner would tell these apart. Not verified on the runner's build.
| // a few seconds, well inside the gate's interval, one warning gets out. | ||
| let mut latency_warnings = Vec::new(); | ||
| let mut other_warnings = Vec::new(); | ||
| let _ = tokio::time::timeout(Duration::from_secs(3), async { |
There was a problem hiding this comment.
This test listens for only 3 s, and slow sits behind rtpjitterbuffer latency=2000. If the warning at the PLAYING transition is missed, the next chance comes when slow data reaches the mixer, at least 2 s in. That leaves under 1 s on a loaded Windows runner, where this test failed. A window of about 8 s would still be inside the 10 s gate interval (backend/src/gst/pipeline/warning_gate.rs:12), so len() == 1 would still hold. That may be a fix, not just a skip. Not verified as the cause.
Refs #1073
Problem
The two real-pipeline tests from #1073 fail now and then on the macOS and Windows runners, and turn main red there:
finds_both_inputs_of_a_mixer_that_cannot_configure_latencya_mixer_latency_failure_is_reported_once_with_its_inputsWhen they fail, the message says only
the mixer never warnedorexpected the latency warning once, got [], which does not show why.Change
common::skip_known_ci_failure. Linux CI still runs them, and so does a local run.finds_both_inputs_of_a_mixer_that_cannot_configure_latencymoves from thelatency_diagnosisunit tests intobackend/tests/latency_diagnosis_test.rs. It runs a real GStreamer pipeline, and the skip helper lives intests/common. The puredescribetests stay in the lib.Rejected for now: changing
bus.rsor the diagnosis. The cause is not shown yet (below), and the new messages are there to show it.Evidence
A diag workflow on the macOS runner (temporary
diag/branch, deleted) looped the unit test with a trace of every warning and what each input answered:slowmin 2023 ms,bridgemax 1000 ms).STROM_REQUIRE_GST_PLUGINS,STROM_REQUIRE_GL,STROM_SKIP_KNOWN_CI_FAILURES): 5 of 5 alone passed, 11 of 12 full lib-suite runs passed. The failed run logged no warning at all. So in the failure the mixer posts no "Impossible to configure latency" warning in 5 s. It is not the diagnosis returning nothing.Unverified: why the mixer posts none. A lead: on a loaded runner the latency query at the PLAYING transition may fail outright ("Latency query failed" shows up in these logs), and nothing queries again. If so, an operator can miss the diagnosis too. The new failure messages should show it the next time this fails on Linux or locally.
Tests
cargo test --features efp --test latency_diagnosis_test(2 passed), and the same withSTROM_SKIP_KNOWN_CI_FAILURES=1(both printSKIP: known CI runner failureand return).cargo test --features efp --lib latency_diagnosis(2 passed).cargo clippy --features efp --all-targets -D warningsclean.ci:macosandci:windows, so both runners exercise the skips.For the reviewer
level_3_1_offer_gets_1080p_video_encoded_by_the_blockalso fails on the Windows runner on main (WHEP endpoint ... never listened, runs 39574947907 and 39585112531). It is not touched here.Out of scope
Finding why the mixer posts no warning under load, and whether production code should query again.
🤖 Generated with Claude Code