Skip to content

test: test_missing_files_list's first case is flaky on Windows (bnum_allocs off by one after obs_startup) #663

Closed

Description

@zackees

Seen on #660's Rust Tier 2 windows-2025-vs2026 run: test_disabled_makes_no_list failed with 225 != 224 (test_missing_files_list.c:152). It passed on the Windows Tier 2 runs of #653, #654, #657 and #658 earlier the same day.

The case asserts that missing_files_list_create(true), which just returns NULL, leaves bnum_allocs() unchanged. It is the first case after group_setup's obs_startup(), and bnum_allocs counts allocations from every thread, so a lazy allocation on one of libobs's background threads between the two reads makes it off by one.

Fix direction (existing C tests are not edited): find which libobs thread allocates lazily after obs_startup on Windows (task threads, hotkey thread, audio monitoring enumeration) and make that allocation happen during obs_startup, so the count is stable when obs_startup returns. Or add a new test seam that waits for those threads to go idle.

Activity

  1. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Additional startup path to inspect: obs_hotkey_thread in libobs/obs-hotkey.c:1330 calls profile_store_name and profile_register_root after pthread_create has returned to obs_init_hotkeys (obs.c:1171). obs_startup does not wait for that thread initialization. These profiler paths can allocate through libobs bmem (the C profiler root mutex and call structs also use bmalloc). This is a concrete candidate for the late global allocation, not yet a proven cause. Keep the existing C test unchanged and prove the allocating thread before choosing a startup barrier or moving initialization.

  2. added
    claimed
    on Oct 14, 2026
  3. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Claiming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions