cv2(gpu-death): guest self-detect permanent renderer/GPU death → signal + recycle (the #154 residual fix) #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cv2/gpu-death-recycle"
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?
The #154 residual — the last thing between CV2 WebRTC and ≥90%
Root-caused live 2026-07-10 by correlating a failed portal session to physics logs: the full WebRTC handshake completes (offer + answer + ICE all delivered bidirectionally, ICE connected) yet the guest sends 0 RTP / 0 frames. That is the run11-class residual — a guest whose BeginFrame ack-loop is outwardly healthy (issued≈acked≈29fps post-GPU-reinit) while the renderer produces ZERO frames forever. No watchdog-timing fix sees it; the capture-rearm fix (#38) doesn't cover it (renderer never produces from the start, not a nav-swap). The per-worker poisoned-golden gate + recycler (tf-multiverse) don't catch it either — the worker's golden is healthy; this is a per-session boot death.
The fix (guest-side detect → signal → recycle)
cb_begin_frame_driver): count consecutive EmitDiagnostic ticks withcaptured_delta==0(renderer PRODUCTION, not ack-chain liveness — the only substrate that sees this failure). At 6 ticks / 30s (kZeroProductionTicksBeforeDeath) fire a one-shotSetPermanentDeathCallback+CV2-GPU-DEATHlog. 30s = 2× the =15 watchdog's 15s worst-case rebind, so a slow-but-recovering guest's catch-up burst resets the streak first — never false-positives.cb_wire_envelope+cb_offerer_driver): newEnvelopeType::kSessionUnhealthy(distinct frombyeso physics tells "user closed tab" from "guest self-detected death");CloseUnhealthy()emits it before teardown. + round-trip test.main_parts):OnGpuPermanentDeath→offerer_driver_->CloseUnhealthy("gpu-permanent-death")→ delayed quit (flush the envelope) so the dead microVM frees promptly and physics re-pins a fresh guest.Physics-side consumer (
kSessionUnhealthy→registry.release+ recycle) already landed in tf-multiverse (#157). This is the guest emitter half — authored 2026-07-06, never merged.Strings-gate marker:
CV2-GPU-DEATH. Composes cleanly with the deployed capture-rearm fix (#38) — verifiedSetRecaptureOnRvhSwapCallbackintact.🤖 Generated with Claude Code