You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libobs: source show/activate ref counts are read without atomics (TSan, ~150 reports) #2081
obs_source_activate/deactivate/show/hide change activate_refs and show_refs with os_atomic_inc_long/dec, but six places read them as plain fields: obs_source_active() and obs_source_showing() (which the audio thread calls in audio_callback), the tick's now_showing/now_active (obs-source.c.h:1409 and :1432), and the loops in obs_source_add_active_child/remove_active_child. In TSan run 40066620813 these are about 150 reports in 16+ tests (obs-source.c.h:4834/1409/1432 against threading-posix.h:21 and :26).
Fix: read them with os_atomic_load_long; the child loops take one snapshot.
Activity
zackees commentedon Oct 24, 2026
Claiming: atomic loads at the six read sites, TSan run as RED/GREEN evidence. PR today.
zackees commentedon Oct 24, 2026
Fixed by #2083 (merged). TSan reports at the ref-count reads went from 49 to 0, and obs_source_video_tick race sides from 88 to 1.
fix(source): read the show/activate ref counts atomically (obs-rust#2081
obs-source: port obs_source_add_active_child and obs_source_remove_ac…
obs-source: port obs_source_add_active_child and obs_source_remove_ac…