test: hold the recorder at each ordering point in test_recorder_sync's thread scenarios #2251
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2251
Loading…
Reference in a new issue
No description provided.
Delete branch "test/recorder-sync-deterministic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
tests/test_recorder_sync.pysometimes fails on a busy CI runner for no reason in the code. It deliberately builds broken recorders and checks each one is caught. For the thread recorder, "caught" depended on timing: the fake driver takes 1 µs a call so the recorder thread falls behind, and the broken variant is only caught if it is still behind at the moment the producer should have waited. On a loaded runner the recorder sometimes catches up first, and the check reports a broken recorder asNOT CAUGHT. Two recent runs failed this way: 43006448114 ("the replay lock let go without waiting for the recorder") and 42987766874 ("no wait before vkQueueSubmit2"). Neither PR touched the recorder.What changed
The thread scenarios that check ordering now hold the recorder thread for 50 ms just before each point where the producer must wait for it:
This is the same hold the status-read scenario already used. A correct recorder simply waits out the hold. A broken one always reaches that point with commands still in flight, so it is caught every time, however loaded the runner is. The direct reference runs and the defer runs have no hold.
Test only:
gpu/vk/vk_recorder.handgpu/vk/vk_work.hare unchanged, and every existing check still runs.How it was tested
tests/test_recorder_sync.pypasses in full, and every broken variant (defer and thread) is reported caught.--only thread) of the unbroken build and of each of the 11 deliberately broken thread variants 30 times. They ran as parallel jobs, each pinned to a single core, alongside the other builds. The unbroken build passed 30 of 30 times, and each broken variant was caught 30 of 30 times: 360 of 360, no flakes.github-sync referenced this pull request2026-11-12 06:22:54 +00:00