Repository navigation
fix(runtime/test): warm up two CreateProcessW starts in queue_proxy_test handle check (TEST-779) - #3799
Conversation
…est handle check On Windows 11 26200, check_child_runner() previously ran one successful CreateProcessW and one failed CreateProcessW before recording handles_before. However, NtQueryObject shows that the second successful CreateProcessW still opens and caches one persistent HKCU registry key handle (\REGISTRY\USER\<SID>) in the parent process before stabilizing at +0 handles on the third and later calls. That caused `handles_after == handles_before` (e.g. 123 vs 124 under ctest) to abort queue_proxy_test before testing WARP, hardware D3D12, or Vulkan queue/fence proxies. Warm up two successful `run_self(L"--child-flood 0", 30000)` starts before recording `handles_before`, while keeping the strict `handles_after == handles_before` handle-leak assertion intact. AI-assisted with Argon (Antigravity).
|
Tested |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head merged with main 4c52ce2, MSVC 14.51):
This is a test-only change (warm-up of the two |
|
Data point from Windows 11 build 26300, MSVC 19.44, Ninja RelWithDebInfo (RTX 4070 SUPER plus Intel UHD 770): I can't reproduce the false failure on main, and this PR passes.
So on 26300, the handle that the second successful AI-assisted (Claude Code). No game files. |
|
Data point from the build the PR names: Windows 11 10.0.26200.7840, NVIDIA GeForce RTX 5060 (driver 617.14), MSVC 14.44, Vulkan SDK 1.4.363.1, Ninja RelWithDebInfo. I can't reproduce the false failure on
So it isn't simply 26200 vs 26300, as @CowBoYdu76 suggested from 26300: on 26200 at update revision .7840, the extra handle that the second successful AI-assisted check (Claude Code). No game files. |
|
Another 26200 data point, at a later cumulative update than @Mayzkl's: Windows 11 Pro 26200.9457 (25H2), AMD Radeon RX 7600 (driver 26.11.2), MSVC 19.44.35230, Ninja RelWithDebInfo. No false failure on
So 26200.7840 and 26200.9457 both pass on |
|
Tested
PR head as-is, no game files. AI-assisted. |
|
Tested
AI-assisted run (Claude). No game files involved. |
|
Tested Windows 11 (26200), MSVC 14.50 (VS 2026), Ninja RelWithDebInfo. Two GPUs: Ryzen 7 9700X iGPU (RDNA2, AMD 32.0.21042.62) and RTX 3070 (NVIDIA 610.74), picked with
Not checked: the handle-type breakdown in the description ( AI-assisted; measured on my PC. |
|
Static review only (no GPU/build here): MERGEABLE, one file, applies cleanly. The loop runs two successful Residual risk worth a sentence in the body: a handle leaked only on the second successful Mergeable. AI-assisted review, no game files, no GPU. |
Summary
Fixes TEST-779: a deterministic false failure in
runtime/test/queue_proxy_test.cpp(check_child_runner()) on Windows 11 (10.0.26200) that aborted the entirequeue_proxyCTest target at line 1049 before reaching thehost WARP,host NVIDIA GeForce RTX 4060, andVulkanproxy suites.Root Cause
check_child_runner()previously warmed up one successfulCreateProcessW(--child-flood 0) and one failedCreateProcessW(.missing.exe) before callingGetProcessHandleCount(GetCurrentProcess(), &handles_before).Using
NtQueryObject(ObjectTypeInformation / ObjectNameInformation)on Windows 11 26200:CreateProcessWopens and caches 8EtwRegistrationhandles,\REGISTRY\MACHINE, and\REGISTRY\USER\<SID>\Software\Microsoft\Windows NT\CurrentVersion.CreateProcessWopens 41-42 persistent AppCompat/PCA handles.CreateProcessWopens and caches one additional persistent registryKeyhandle in the parent process:\REGISTRY\USER\<SID>(HKEY_CURRENT_USERroot).CreateProcessWcalls open 0 persistent handles.Because
check_child_runner()only ran one successfulCreateProcessWbefore samplinghandles_before, the 2nd successfulCreateProcessWran inside the measured window (--child-flood 8388608), causinghandles_after == handles_beforeto fail by+1(123 -> 124underctest,116 -> 117standalone) even though zero handles were leaked.Change
--child-flood 0warmup twice incheck_child_runner()before samplinghandles_before, updating the inline comment to reflect the second-start\REGISTRY\USER\<SID>handle cache behavior.EXPECT(handles_after == handles_before)strict (+0tolerance).Verification & GPU Results (No Game Files)
10.0.26200), NVIDIA GeForce RTX 4060 (driver621.01), Vulkan1.4.357(Vulkan SDK1.4.363.0), MSVC19.44.35230.0.origin/mainf847748c):ctest --test-dir runtime/build -C RelWithDebInfo -R queue_proxy --output-on-failure: FAILED (123 handles before, 124 afterat line 1049).queue_proxy_test.exe: FAILED (116 handles before, 117 afterat line 1049).fix/queue-proxy-test-handle-warmup6c6843fc):ctest --test-dir runtime/build -C RelWithDebInfo -R queue_proxy --output-on-failure: 1/1 passed (14.07 secon run 1,12.22 secon run 2).LEONIDA_VK_VALIDATION=1queue_proxy_test.exe: PASS (queue_proxy_test: 3 backend(s) passed) acrosshost WARP,host NVIDIA GeForce RTX 4060, andVulkan(0 validation errors, 27/27/32 differential edge cases, 8-thread stress, 12 create/release rounds, console-style client).ctest --test-dir runtime/build -C RelWithDebInfo -R "^(queue_proxy|device_proxy)$" --output-on-failure: 2/2 passed (13.20 sec).CreateEventWhandle inside the measured window failshandles_after == handles_before(120 handles before, 121 after, exit code1).Coordination & Dependencies
TEST-779): Coordinating who works on what (18) (moved to #3796) #3574 (comment)runtime/test/queue_proxy_test.cpp).AI-assisted with Argon (Antigravity).