Skip to content

bug: libobs: transition load ownership checks fail on parallel master Tier 2 #4800

Closed

Description

@zackees

The latest completed master push run 43340889737, head 00e363cc8029c7d82a292d887b52ca6c9eed329e, fails test_transition_load_release in job 131622494510 (Tier 2 Linux, tests ON, parallel full suite). Both serial ON shards and the OFF full suite passed.

The log reports load_releases_shown_source at line 360: old source still referenced after its last owner let go; then load_releases_hidden_source at line 378: slot A still holds the old source, and the old source remains referenced. Duplicate source names in the second case follow the first failure. Previous completed master dc2cd8b6411220133b77e04b282e0b3d7acdebff passed. The intervening cancelled push means this does not establish the causing commit. This resembles the lifetime-under-load problem tracked in #4680 but exercises transition load rather than clear.

Investigate on current master by repeating the unchanged suite against both real hybrid and C-reference libraries, including parallel load. Proposed direction: find the outstanding real owner or asynchronous release and synchronize the implementation deterministically; never edit the existing C test. Acceptance: unchanged test passes both implementations under repeated parallel load, with RED/GREEN evidence if an implementation fix is needed.

Discovered during pool port-next-6 admission. No transition fix attempted: the assigned unit is a separate small libobs extraction and an ownership/synchronization change needs focused investigation. No hosted rerun requested because infrastructure failure has not been established.

Activity

  1. vpacher commented on Nov 13, 2026

    @vpacher
    Member

    /investigate
    Coordinator triage. There is one master failure (run 43340889737) and no reproduction yet.

    Missing:

    1. A local reproduction of test_transition_load_release under parallel load, with the command, the repeat count and the failure rate.
    2. The result against the C reference as well as hybrid libobs.
    3. Whether it shares the asynchronous release path of Flaky Tier 2: test_source_transition_slots clear_empties_both_slots child_alive under load #4680. If it does, link Flaky Tier 2: test_source_transition_slots clear_empties_both_slots child_alive under load #4680 as the blocker or close this as a duplicate.
  2. added
    bug
    P2
    needs-investigation
    on Nov 13, 2026
  3. moved this from Triage to Investigating in obs-rust Multiviewon Nov 14, 2026
  4. rdoupe commented on Nov 14, 2026

    @rdoupe
    Collaborator

    Could not reproduce on today's master (2026-11-14).

    The unchanged test_transition_load_release binary against a RelWithDebInfo hybrid libobs from today's master, 16 parallel lanes × 100 runs, each on its own Xvfb display with ctest's environment (LP_NUM_THREADS=1, the rundir as working directory): 1600 runs, 0 failures. With the same setup, test_source_transition_slots (#4680) also passed 2400 runs on each of the hybrid and C-reference builds, plus 1280 CPU-starved runs on the hybrid. Details are in my comment on #4680.

    Both tests check that a source is gone through a weak reference right after its last owner lets go. Any transient strong reference on another thread keeps that weak reference alive for a moment, for example the per-frame obs_source_get_ref()/obs_source_release() in tick_sources() (libobs/obs-video.c.h:47-66). That is a candidate shared cause, not a confirmed one. I'd keep this open next to #4680 rather than close it as a duplicate until one of them reproduces.

  5. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    #5054 merged at 08:23Z: this test is now in test/cmocka/known-flaky.txt, so a merge-queue run whose ONLY failures are registered tests retries them once and passes with a ::warning:: (and a step-summary line) instead of ejecting the group. This shields the queue; it does not resolve the root cause, so this issue stays open. Remove the registry line in the PR that fixes it.

  6. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    This looks like the race in #5405. released_source_is_destroyed() (test_transition_load_release.c:322) releases the source, calls obs_wait_for_destroy_queue() and checks the weak reference. The fixture resets video only (line 447). Without audio, obs_wait_for_destroy_queue() doesn't wait for the video thread, so tick_sources() can still hold its tick reference when the check runs. #5407, now in the merge queue, makes the wait cover the video thread whenever it runs, and its new test reproduces that deterministically. Once it merges, I'll stress this test against both libobs builds, then remove its known-flaky.txt line and close this.

    #4680 is a different case: clear_empties_both_slots checks child_alive() without any obs_wait_for_destroy_queue(), so #5407 doesn't cover it.

  7. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    #5407 merged. With a 30 ms delay injected into tick_sources(), the unchanged test fails at lines 360/378 with the old wait and passes with the new one. Without the injection it passed 30/30 on both builds. #5413 removes its known-flaky.txt line and closes this issue.

  8. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Claiming: investigation

    The investigation is done (see the two comments above): the cause was the destroy-queue wait race fixed by #5407, and #5413 removes the test from known-flaky.txt.

  9. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    /ready

    Cause found and fixed by #5407 (reproduced with a 30 ms delay injected into tick_sources(): fails at lines 360/378 before, passes after). What remains is #5413, dropping the test from the known-flaky list.

  10. added
    ready
    and removed
    needs-investigation
    on Nov 21, 2026
  11. moved this from Investigating to Done in obs-rust Multiviewon Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions