fix(whip,whep): make do-retransmission configurable to work around GStreamer RTX+hdrext crash - #663
fix(whip,whep): make do-retransmission configurable to work around GStreamer RTX+hdrext crash#663wagenet wants to merge 3 commits into
Conversation
…treamer RTX+hdrext crash Diagnosed a hard process crash while testing a WHIP Input -> WHEP Output flow: an upstream gst-plugins-base bug where RTX (retransmission) combined with RTP header-extension aggregation trips an assertion in gst_rtp_base_depayload_handle_buffer (priv->hdrext_buffers not empty when hdrext_delayed is set). Reproduced twice independently on two different code paths hitting the identical assertion, indicating a general invariant bug in the base class rather than something element-specific. A GStreamer upstream bug report is being filed separately. RTX was previously hardcoded on for both whipserversrc (WHIP Input) and whepserversink (WHEP Output). Expose `do_retransmission` as a block property (default true, matching upstream) on both, so it can be disabled as a workaround when this crash is hit, without losing the normal benefit of RTX (cheap resend of lost packets instead of a full PLI/keyframe cycle) for sessions that don't trigger it. Extracted `parse_do_retransmission` as a pure, independently testable function on both blocks, with unit tests for the default and both explicit values. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
RTX combined with RTP header-extension aggregation trips an assertion in
gst_rtp_base_depayload_handle_buffer ('priv->hdrext_delayed' should be
NULL, gstrtpbasedepayload.c:897), taking the whole process down. It has
been hit on two independent code paths, so it looks like an invariant bug
in the base class rather than something element-specific.
Set do_retransmission=false on both the WHIP input and the WHEP output
until the upstream bug is fixed.
Requires Eyevinn/strom#663, which exposes do_retransmission as a block
property on builtin.whip_input and builtin.whep_output. Without it the
property is not read and this change has no effect.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Retracted — this review was misattributed.
The original text of this review described the changes in #665 (jitterbuffer_latency_ms on WHIP Input), not this PR. It was posted here by an automated reviewer that crossed two PRs in the same run, so it never verified this PR's diff at all. The text has been replaced to stop it being read as a review of do-retransmission.
This PR has not yet had a valid review. It will be re-reviewed under a stricter protocol that requires an inline citation — code path, commit, doc section or test — for every claim, and that verifies the PR's own description claim by claim. Nothing here should be taken as a signal about this change's correctness either way.
The original text is retained outside GitHub for the record.
Picks up the rust-toolchain.toml pin (1.97.1) and CI package list from Eyevinn#678, which clear the float_literal_f32_fallback and result_large_err failures on this branch.
Resolves the conflict with Eyevinn#665 (jitterbuffer_latency_ms). Both changes add a new property to the WHIP Input block at the same five insertion points, so git read the additions as competing. Every conflict was resolved by keeping both: - `parse_do_retransmission` / `parse_jitterbuffer_latency_ms` helpers - both `let` bindings in build_whipserversrc_config - both fields in the WhipEndpointConfig literal and in the struct definition - both ExposedProperty entries in the block metadata - both sets of unit tests No behaviour was changed on either side. Verified in a scratch worktree: `cargo check` clean, `cargo test --workspace` all green (512 lib tests, which includes both features' unit tests), `cargo clippy --workspace --all-targets -- -D warnings` exit 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review: the WHEP half of this change cannot work around the crash it citesVerified against the PR diff (commit range of 1.
|
|
Tested this live on macOS today. The crash is now tracked in #685 with the log that locates it: the asserting depayloader is That confirms the review above from measurement rather than reasoning: the WHIP half of this PR is on the right side of the bug, the WHEP half cannot affect it. One thing worth trying before trading RTX away: the header extension in play is TWCC, and Strom turns it up itself ( |
Description
While diagnosing a WHIP Input -> WHEP Output flow (browser publishes via WHIP, another browser views via WHEP), we hit a hard process crash caused by an upstream
gst-plugins-basebug: RTX (retransmission) combined with RTP header-extension aggregation trips an assertion ingst_rtp_base_depayload_handle_buffer(priv->hdrext_buffersnot empty whenhdrext_delayedis set). This was reproduced twice independently on two different code paths hitting the identical assertion, indicating a general invariant bug in the base class rather than something element-specific. A GStreamer upstream bug report is being filed separately.RTX was previously hardcoded on for both
whipserversrc(WHIP Input) andwhepserversink(WHEP Output). This PR exposesdo_retransmissionas a block property (defaulttrue, matching upstream) on both, so it can be disabled as a workaround when this crash is hit, without losing the normal benefit of RTX (cheap resend of lost packets instead of a full PLI/keyframe cycle) for sessions that don't trigger it.Related Issue
N/A — no existing issue; found and fixed live while testing the WHIP/WHEP flow. A GStreamer upstream bug report will be filed and linked here once available.
Type of Change
Checklist
cargo fmt --allcargo clippy --workspace --all-targets -- -D warnings(backend crate is warning-free; the workspace-wide run is currently blocked by a pre-existing, unrelatedfrontend/src/themes.rslint failure — confirmed viacargo clippy -p strom --all-targetsthat no new warnings were introduced)cargo test --workspace(all tests pass, including 6 new unit tests for thedo_retransmissionproperty parsing)🤖 Generated with Claude Code