Repository navigation
d3d12_bindless_churn_test: a scratch folder of its own process (the two ctest entries raced on one folder) - #6184
Conversation
ctest runs this program twice at once (d3d12_bindless_churn and d3d12_bindless_churn_validated). Both wrote the translated shader into a fixed %TEMP%\leonida_bindless_churn_test and remove_all'd it at the end, so the first to finish could delete the other's shader before its PSO was created: "line 142: SUCCEEDED(device->CreateComputePipelineState(...))" under ctest -j. It now uses testfiles::ScratchDir (a per-process name, removed on exit) and testfiles::copy_file. RTX 5060 Ti, LEONIDA_VK_VALIDATION=1, the two tests at -j2: main 3 of 20 paired runs fail, this change 0 of 40. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested cc7e07d on Windows 11 with Vulkan validation: pass on NVIDIA GeForce RTX 4090 (32.0.16.2101) and AMD Radeon(TM) Graphics (32.0.21043.5001). I built the RelWithDebInfo target on the head and parent 561b65a. On each GPU I ran both churn tests together four times per revision. All 16 individual tests passed on each revision. The intermittent pipeline failure did not occur in this sample. I checked the directories while the processes were running. On the parent, two live test processes shared one leonida_bindless_churn_test directory. On the head, processes 21512 and 30188 each had a directory with its own PID suffix. This confirms the change isolates concurrent shader files. Commands for each build:
I set LEONIDA_VK_VALIDATION=1. For NVIDIA I used LEONIDA_VK_DEVICE=4090 and VK_LOADER_DRIVERS_DISABLE=amd. For AMD I used Radeon and nv. Both test programs printed the selected adapter and confirmed validation. The runs used synthetic test shaders. AI-assisted. |
larpinguser
left a comment
There was a problem hiding this comment.
Summary: runtime/test/d3d12_bindless_churn_test.cpp replaces the fixed %TEMP%\leonida_bindless_churn_test folder with testfiles::ScratchDir, copies the shader via testfiles::copy_file, and drops the manual remove_all (the RAII object cleans up). The two ctest registrations of this program previously deleted each other's shader mid-run.
Why merge: Removes an intermittent CreateComputePipelineState failure under ctest -j without touching any other GPU test's temp-folder handling.
Verdict: Approve
|
Summary: Why merge: Removes an intermittent Verdict: Approve |
|
Tested cc7e07d merged onto main 1cc6e3c on an RTX 5090 (driver 621.24), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Tested
No Both fix it; this one also removes the folder on early returns ( |
Claimed in the coordination issue: #5581 (comment)
What and why
d3d12_bindless_churn_validatedfails now and then underctest -j, withline 142: SUCCEEDED(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&pso.p))). The cause isn't the layer.runtime/CMakeLists.txtregisters the same program twice (d3d12_bindless_churnandd3d12_bindless_churn_validated --validated), and ctest runs the two at once. Both wrote the translated shader and its index into a fixed%TEMP%\leonida_bindless_churn_testandremove_all'd it at the end. So the first to finish could delete the other's shader before that one created its PSO.The test now uses
testfiles::ScratchDirfromtest_temp_dir.h: a per-process folder name, emptied on creation and removed on exit, as the other GPU tests use. It also usestestfiles::copy_file, which reports a failed copy instead of throwing. Of the ten tests with a fixed-name temp folder, this is the only one registered twice, so it's the only one that can race. The others are left as they are.Tested
RTX 5060 Ti / 621.14, Windows 11 26300, MSVC 14.51, Vulkan SDK 1.4.363.0,
LEONIDA_VK_VALIDATION=1, the two tests together (ctest -R ^d3d12_bindless_churn -j2):main561b65a8CreateComputePipelineStateline above)On
mainit also showed up in 1 of 3 fullctest -j8runs. Noleonida_bindless_churn_test*folder is left behind afterwards.No game files. AI-assisted (Claude Code, Claude Opus 5.5).