Skip to content

libobs: source->removed is a plain bool read by the render threads (data race) #2105

Closed

Description

@zackees

obs_source_remove (UI thread) writes source->removed at libobs/obs-source.c.h:963. The render and graphics threads read it with no synchronization: obs_source_removed (:976), obs-scene.c.h:2075 and obs_view_source_removed (obs-view.c.h:80). TSan run 40074741825 (master) has 28 reports of obs-source.c.h:976 against :963.

Fix: volatile bool removed in obs-internal.h (not a public header), with os_atomic_load_bool/os_atomic_set_bool at the five sites, as #2083 did for activate_refs and show_refs. The flag only ever goes false to true, so the visible behavior is unchanged. Low risk (local).

Activity

  1. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Claiming: this issue.

  2. added
    bug
    on Oct 24, 2026
  3. added
    claimed
    on Oct 24, 2026
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

    bugclaimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions