From 41587b8fa528fdb1527a35d1e62a78856d43bb8f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 26 Nov 2026 02:27:28 -0800 Subject: [PATCH 1/5] chore(quest): claim quest/m0/shots-scene-remove-flake.md Quest-Claim: 007c42d5a26a046d From 999bc8e5344aec7f99224f25791c41dbd49a1bd9 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 26 Nov 2026 02:36:00 -0800 Subject: [PATCH 2/5] fix(shots): hold the transition while a scene leaving program is removed The test took Interview by the show's 300 ms fade on the real clock, which the program clock ends on its own. Under load it ended before the transitioning assertion, or between the frame kittest read and the click on the sheet's Remove: the sheet then lost its "leaving the program" line, re-centered shorter, and the click landed on the backdrop, closing it. Starting the transition an hour ahead holds it at its start until the removal ends it. Finishes quest/m0/shots-scene-remove-flake.md and adds quest/m0/shots-exit-segfault.md for a crash on exit found while reproducing it. Co-Authored-By: Claude Opus 5.5 --- quest/m0/shots-exit-segfault.md | 23 ++++++++++++++++++++ quest/m0/shots-scene-remove-flake.md | 32 ---------------------------- rs/moq-studio/src/shots.rs | 12 +++++------ 3 files changed, 28 insertions(+), 39 deletions(-) create mode 100644 quest/m0/shots-exit-segfault.md delete mode 100644 quest/m0/shots-scene-remove-flake.md diff --git a/quest/m0/shots-exit-segfault.md b/quest/m0/shots-exit-segfault.md new file mode 100644 index 00000000..5fbf8e0a --- /dev/null +++ b/quest/m0/shots-exit-segfault.md @@ -0,0 +1,23 @@ +# [S] A shots test's process exits cleanly under load + +## Goal + +A `just shots` test process that passed never crashes on its way out, even on +a loaded host, fixed at the root cause in the studio's teardown, wgpu, or +lavapipe (the last two upstream). No retry and no skipped teardown. Under +nextest a crash after a pass still fails the run. + +## Plan + +What is known: while +[shots-scene-remove-flake](https://github.com/moq-dev/studio/pull/271) was +being reproduced, `shots::a_scene_removes_from_its_pad` printed `test result: +ok` and then died with SIGSEGV in 3 of 384 runs. That was 96 copies at once on +a 24-core host. In 48 runs at one copy per core it never crashed. The other +shots tests share the teardown (`quit`, then dropping the harness, the GPU, +and the runtime), so expect them to crash the same way. + +Start by catching a core (`coredumpctl`, or `ulimit -c` under the stress loop +that PR describes) and reading its backtrace. If the crash is in the studio, +fix the order things drop in. If it is upstream, file it there and add a +`Waiting` item. diff --git a/quest/m0/shots-scene-remove-flake.md b/quest/m0/shots-scene-remove-flake.md deleted file mode 100644 index 7f3d3e74..00000000 --- a/quest/m0/shots-scene-remove-flake.md +++ /dev/null @@ -1,32 +0,0 @@ -# [S] Removing a scene passes every time under load - -## Goal - -`shots::a_scene_removes_from_its_pad` passes every time in a full -`just shots` run on a loaded host, fixed at the root cause: either the test -acts before a frame or the engine catches up, or removing a scene has a real -race. No retry, sleep, or longer timeout. The other shots tests are out of -scope. - -## Plan - -Planned 2026-11-26 (maintainer, /quest-run follow-up): ✅ the goal above -(rejected: auditing every shots test, which has no evidence yet; dropping it -until it fails more). ✅ m0, since a flaky `just shots` costs every PR in the -milestone a rerun and an agent turn. - -What is known: the test came in with -[moq-dev/studio#266](https://github.com/moq-dev/studio/pull/266). It failed -once in each of two agents' full `just shots` runs on 2026-11-25 and 26, the -second in [moq-dev/studio#268](https://github.com/moq-dev/studio/pull/268)'s -work. Both times the host was busy. It passed when run alone and on a rerun, -and 8 stress runs did not reproduce it. Neither failure's assertion was -recorded, so start by reproducing it under load (several copies of the full -`just shots` at once, or the test under a CPU hog) and capturing which step -fails. - -Places to suspect first: the `more` helper hovers, clicks, and steps a fixed -two frames before asserting on the engine's scene list, which a command -applied on the runtime may not have reached yet; and the scene on program -being replaced before it is removed. If the root cause is in #266's code -rather than the test, the fix lists #266 under `## Caused by`. diff --git a/rs/moq-studio/src/shots.rs b/rs/moq-studio/src/shots.rs index 24689beb..80dfc06f 100644 --- a/rs/moq-studio/src/shots.rs +++ b/rs/moq-studio/src/shots.rs @@ -822,13 +822,11 @@ fn a_scene_removes_from_its_pad() { harness.run_steps(2); // A scene only leaving program in a transition goes with the transition - // finished on the scene it goes to. - engine - .state - .lock() - .unwrap() - .take("Interview", kio::clock::Instant::now()) - .unwrap(); + // finished on the scene it goes to. The transition starts an hour from now, + // so the program clock holds it at its start rather than ending it while + // the pad works, which would also shorten the sheet under its Remove. + let later = kio::clock::Instant::now().saturating_add(Duration::from_secs(3600)); + engine.state.lock().unwrap().take("Interview", later).unwrap(); assert!(engine.state.lock().unwrap().compositor.transitioning()); more(&mut harness, "Main"); harness.get_all_by_label("Remove").last().unwrap().click(); From 80b33d114273a781f7084e6a8d02187e20bf9d91 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 26 Nov 2026 02:54:45 -0800 Subject: [PATCH 3/5] quest(m0): the shots exit crash names both teardown orders Co-Authored-By: Claude Opus 5.5 --- quest/m0/shots-exit-segfault.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quest/m0/shots-exit-segfault.md b/quest/m0/shots-exit-segfault.md index 5fbf8e0a..31f973d2 100644 --- a/quest/m0/shots-exit-segfault.md +++ b/quest/m0/shots-exit-segfault.md @@ -13,9 +13,11 @@ What is known: while [shots-scene-remove-flake](https://github.com/moq-dev/studio/pull/271) was being reproduced, `shots::a_scene_removes_from_its_pad` printed `test result: ok` and then died with SIGSEGV in 3 of 384 runs. That was 96 copies at once on -a 24-core host. In 48 runs at one copy per core it never crashed. The other -shots tests share the teardown (`quit`, then dropping the harness, the GPU, -and the runtime), so expect them to crash the same way. +a 24-core host. In 48 runs at one copy per core it never crashed. Shots +tests end in one of two orders. That test calls `quit` while its harness is +still alive. The named views drop the harness first and then call `quit` +(`view` in `rs/moq-studio/src/shots.rs`). Whether both orders crash is still +open. Start by catching a core (`coredumpctl`, or `ulimit -c` under the stress loop that PR describes) and reading its backtrace. If the crash is in the studio, From b33180dd92c96f56b4a5d7f9121f4370c392c139 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 26 Nov 2026 17:13:41 -0800 Subject: [PATCH 4/5] quest(m0): record keeping the shots exit crash follow-up Co-Authored-By: Claude Opus 5.5 --- quest/m0/shots-exit-segfault.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quest/m0/shots-exit-segfault.md b/quest/m0/shots-exit-segfault.md index 31f973d2..ad008b98 100644 --- a/quest/m0/shots-exit-segfault.md +++ b/quest/m0/shots-exit-segfault.md @@ -9,6 +9,9 @@ nextest a crash after a pass still fails the run. ## Plan +Decided 2026-11-26 (maintainer, /quest-run): ✅ keep this quest (rejected: +drop it). A rare crash after a pass will turn into a CI flake under nextest. + What is known: while [shots-scene-remove-flake](https://github.com/moq-dev/studio/pull/271) was being reproduced, `shots::a_scene_removes_from_its_pad` printed `test result: From 044ab7ad1338c583437e78b5d073bbdb356ee0bd Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 26 Nov 2026 17:18:23 -0800 Subject: [PATCH 5/5] quest(m0): the shots exit crash names shoot and scopes to tests that quit Co-Authored-By: Claude Opus 5.5 --- quest/m0/shots-exit-segfault.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quest/m0/shots-exit-segfault.md b/quest/m0/shots-exit-segfault.md index ad008b98..87dad3df 100644 --- a/quest/m0/shots-exit-segfault.md +++ b/quest/m0/shots-exit-segfault.md @@ -17,10 +17,10 @@ What is known: while being reproduced, `shots::a_scene_removes_from_its_pad` printed `test result: ok` and then died with SIGSEGV in 3 of 384 runs. That was 96 copies at once on a 24-core host. In 48 runs at one copy per core it never crashed. Shots -tests end in one of two orders. That test calls `quit` while its harness is -still alive. The named views drop the harness first and then call `quit` -(`view` in `rs/moq-studio/src/shots.rs`). Whether both orders crash is still -open. +tests that stop the engine with `quit` do it in one of two orders. That test +calls `quit` while its harness is still alive. The named views drop the +harness first and then call `quit` (`shoot` in `rs/moq-studio/src/shots.rs`). +Whether both orders crash is still open. Start by catching a core (`coredumpctl`, or `ulimit -c` under the stress loop that PR describes) and reading its backtrace. If the crash is in the studio,