capture+signaling: batch R — the worker redials the broker (verified live); the resize GPU abort is gone #108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "capture/batch-r-audio-resize-redial"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes for the three guest defects found on 2026-09-07, plus a broker fix the first one uncovered. Six lane builds, four live measurement rounds. Every claim below was measured on the k8s standalone stack.
1. Redial — FIXED, VERIFIED LIVE
cb_signaling_reconnect(R7) had been compiled by every lane since M3 and constructed by nothing.main_partsnow owns it instead of the bare ws client; it IS-ASignalingTransportso the driver's raw pointer survives a redial. On reconnect the embedder re-offers unless a viewer is still attached;OnGaveUprecycles the process.Two latent bugs in the wrapper that six months of disuse had hidden: a clean 1000 close from a broker shutting down went terminal (exactly the rollout case it existed for), and nothing distinguished our own
Disconnect. Its BUILD.gn TODO had promised tests "in a follow-up commit" since M3 —cb_signaling_reconnect_test.ccnow exists and the t7 lane compiles it.That alone was not enough: with the guest redialing, the attached viewer still lost video, because the broker synthesised a
byeto every peer as it shut down. Every socket closing at once is indistinguishable from every peer leaving.hub.shuttingDownsuppresses it (TestWS_ShutdownDoesNotSynthesiseByes, watched fail).Measured with a viewer attached across a broker rollout:
framesDecoded2. Resize — HALF FIXED (abort gone, freeze remains)
Attempt 1 (settle 100 ms, then re-issue) moved the GPU abort from 15 s to 108 ms — which confirms the mechanism beyond doubt: any issue before viz runs its pending callback is the double-issue. Attempt 2 (wait for the ack; nudge with
ScheduleFullRedrawonce a second) eliminated the abort (33 nudges, no FATAL) but the ack still never came, so the picture freezes andCV2-GPU-DEATHrecycles instead.Both attempts and the three next probes are in the finding.
CHROMELESS_VIEWPORT_FOLLOW=0(already default off) keeps the stack usable meanwhile.3. Audio — THREE THEORIES REFUTED, not fixed
Each was implemented, built, deployed and measured. The ADM is already stopped at re-arm (it was asked:
recording=0).Terminate/Initis unsafe —quit_is set and never cleared, so the record thread would die for the life of the process. Pre-arming the ADM reachednow_recording=1and was still silent. The finding now records all three and names the next probe: instrument libwebrtc's audio send stream, not the ADM.Verified
OutOfmemoryat admission — a scheduling rejection, not a compile error.)tests/interactive65/65 against the batch-R guest: no regressions.make lint,make lint-cxx,go test ./...insignalingall clean.stack.yaml+guest-release.json; broker imagebatchr-ff7e944rolled and pinned.🤖 Generated with Claude Code
The first audio attempt asked the ADM what state it was in before stopping it, and the answer refuted the fix: CV2-REARM-AUDIO: ADM before re-arm: recording=0 rec_initialized=0; StopRecording() rc=0 ...4 ms later: failed to activate recording Already stopped, so an explicit stop is a no-op. The 4 ms is the real clue: AudioDeviceLinuxPulse::StartRecording waits up to TEN seconds on _recStartEvent, so failing 4 ms in means that wait returned instantly on an event left set by the previous session, then found _recording false. Nothing clears that event between sessions. Terminate/Init is not an escape: Terminate sets quit_ and nothing ever clears it, so the record thread would exit for the life of the process. So stop taking that path. AudioState::AddSendingStream only starts recording when !adm->Recording(); if the ADM is already recording when the next send stream is added, libwebrtc attaches to the running capture — the state a first session leaves behind. Rearm now stops, re-inits and starts the ADM itself on the ADM's own thread, and logs all four return codes plus the resulting Recording(), so the next run says plainly whether it worked rather than needing another theory. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>