Repository navigation
test: fix the source_profiler_parity race (#1930) - #1931
Merged
Merged
Conversation
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1930.
Cause: not a Rust/C difference.
oracle_sp_calculate(rust/obs-c-oracle/oracle/source_profiler.c) temporarily sets the oracle's staticgpu_enabledaroundcalculate_tick/calculate_render.parity_calculatecalled it without theORACLElock (its comment said "no shared state"), so when it ran in parallel withparity_random_sequencesorparity_gpu_frames, the Csource_profiler_frame_begincould seegpu_enabled == trueand advancetimer_idxon the C side only. That is exactly the reported state: profiler disabled, C index 1, Rust 0. Runningparity_random_sequencesalone never fails (512 cases, repeated runs).Fix:
parity_calculateholdsORACLElike the sequence tests. No change to the port or the oracle.Local RED/GREEN (
soldr cargo test -p obs-data --test obs-tests-core source_profiler_parity, whole file so the tests run in parallel):parity_random_sequencesat line 397,parity_gpu_framesat 464);source_profilerfilter, 36 tests): 0 of 8 runs fail.Test-only; no features.md line.