Skip to content

Restore Windows scene lookup characterization after Cargo-core teardown crash #2547

Closed

Description

@zackees

Follow-up to #2543 and PR #2545. The scene_find_source_recursive characterization is temporarily skipped on Windows, with the reason marked “characterized, not endorsed” in the test. Restore it after diagnosing and fixing an intermittent crash in the Cargo-built Windows libobs core.

Evidence: PR #2545 run 40429363810 job 121945950569 crashed after char find inner was destroyed on the deferred destruction queue. Both CMake cores and the Cargo C-reference core passed; the same test passed in twenty isolated cdb reruns, so no faulting stack was captured. The next PR run passed once without the skip. validate.ps1 in #2545 enables a WER dump of this test on Cargo-core failure, but after the skip the affected case must be re-enabled to reproduce it.

Acceptance: reproduce with the lookup case enabled on Windows under the Cargo-built core; retain the original crash dump/stack; fix the cause in libobs or the fixture; remove the Windows-only skip; pass Windows Tier 2 and retain Linux characterization assertions. Do not change the preserved obs-websocket plugin.

Activity

  1. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Update: The targeted Windows skip was reverted in PR #2545 after a second crash moved to another case and the Cargo C-reference core. All assertions are enabled again. PR #2545 now tests CTest RUN_SERIAL for this graphics-less fixture and captures WER dumps in both Cargo builds. If serial execution resolves the CI failure, this follow-up can focus on why parallel execution makes the deferred destruction queue crash; if it does not, use the dump to find the cause.

  2. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Update after run 40439283995: CTest RUN_SERIAL still crashed during deferred source destruction in the Cargo-built Windows core. PR #2545 now takes #2543’s accepted fallback by skipping the entire characterization executable on Windows (CTest exit 77), while preserving all Linux cases and assertions. Restore Windows coverage here once the crash is diagnosed and fixed.

  3. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Claiming: investigation

    1. Reproduce the graphics-less characterization crash in a Windows Cargo-built core and capture the original stack (the prior WER attempt produced no dump).
    2. Compare Cargo and CMake core teardown/loader differences and write a focused failing test or diagnostic.
    3. Mark Ready and open a RED PR once the root failure is characterized. First investigation update today.
  4. added
    needs-investigation
    on Oct 27, 2026
  5. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Investigation update: #2545 reproduced crashes in both Cargo-built Windows cores (Rust and C reference), in different scene cases; RUN_SERIAL did not help, while isolated cdb reruns did not crash. Windows Error Reporting produced no dump on the CI runner. The next diagnostic is a test-local unhandled-exception minidump written from the faulting process, with a gated repro mode that preserves the default Windows skip. This should distinguish a fixture/no-graphics bug from the Cargo core at the actual faulting instruction. Acceptance for the diagnostic PR: collect the faulting stack from both Cargo cores without changing the C tests or public headers; then fix the cause and re-enable the Windows characterization in a follow-up.

  6. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    /ready

  7. added
    ready
    and removed
    needs-investigation
    on Oct 27, 2026
  8. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Status from #2550 (the in-process dump harness): the whole PR is green on Windows now, including both the Cargo-core Tier 2 and Rust Tests jobs on windows-2025-vs2026 (run 40447423147) — so the teardown fault did not fire during that run and the harness has no stack to report yet.

    That is expected for an intermittent fault: the opt-in repro only runs the focused scene/canvas characterization up to 30 times when enabled, and the crash has so far appeared in whole-suite runs (the three #2545 runs). The branch stays in draft as the instrument to catch it.

    Next: if Tier 2 on Windows fails again with the scene teardown crash, re-run that job with the opt-in repro so the exception handler writes the minidump and the job analyzes it. Until then this is a no-op for normal runs — the Windows test keeps its existing skip from #2545.

  9. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Continuing #2547 from the captured failure in #2550 run 40454928969. The original WER dump shows pthread_mutex_unlock -> obs_source_destroy_defer/obs_context_wait, after canvas_scene_remove_and_move destroyed both canvases. A moved scene retains the destination name-table mutex in context.mutex, although deferred destruction must synchronize with the global UUID table used by video ticks. I am adding a deterministic mutex-lifetime regression before the fix, preserving all existing C assertions, then validating Linux and Windows Tier 2.

  10. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Blocked: workspace write approval prevents adding the regression test and source fix. The captured hosted crash stack, supported root-cause hypothesis and event-synchronized regression plan are recorded on #2550. No code change was made or pushed; the diagnostic PR remains draft.

  11. added
    claim-blocked
    on Oct 27, 2026
  12. removed
    claim-blocked
    on Oct 27, 2026
  13. moved this from Triage to In progress in obs-rust Multiviewon Oct 27, 2026
  14. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Progress: captured stack from run 40454928969 job 122031355159 (pthread_mutex_unlock via obs_source_destroy_defer, null handle, after both move canvases were destroyed). Root cause: obs_canvas_insert_source() points source->context.mutex at the canvas name-list mutex; obs_canvas_destroy() frees that mutex synchronously, so a source destroyed just before its canvas has its deferred destroy read freed memory. Draft PR #2581 restores the global source mutex when a source leaves a canvas list (obs_canvas_remove_source) and for sources a canvas is about to free (obs_canvas_destroy), with a regression case in test_canvas_destroy_scene_refs. Still to do: locate and remove the Windows-only skip and re-enable the lookup case on Windows Tier 2; local Tier 2 for this revision not yet completed (Docker image build exceeded the local time budget).

  15. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Recording one acceptance gap after the closure: "pass Windows Tier 2" has not been demonstrated for the fix. #2581's merge-queue run (40475911372) skipped every Windows lane (local-gate stamp), and the PR's own run showed Build 🧱 / Windows skipping, so the restored characterization has not executed on Windows yet; the run that did reach Windows Tier 2 on this test (40454928969) predates the fix. The next nightly Scheduled run exercises Rust Tier 2 windows-2025-vs2026 and will show whether the teardown fault is gone there. Tracked with the header cleanup in #2586 / PR #2587. The WER LocalDumps capture in rust/tools/tier2-validate/validate.ps1 for this executable stays in place for exactly that first Windows run.

  16. moved this from In progress to Done in obs-rust Multiviewon Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions