Repository navigation
Conversation
…st look (TEST-COMPILE-POOL-LOAD-FLAKE) test_a_checkpoint_sees_a_demand_that_started_during_it checked its first look (!has_compile_waiter()) inside the checkpoint job, after log.start. The test thread woke on that log.start and submitted the demanded build, so on a loaded machine the build could be queued or running before the checkpoint's thread reached its first look, and the check failed (seen 1 in 64 runs with 16 copies running at once). The job now records the first look and opens a gate; the test waits for that gate (10 s limit, no fixed sleep) before it submits the build, and checks the recorded look. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed at head Verification
Notes
Approve. AI-assisted review + local MSVC verification. |
|
#2510 | head db47785 (merged cleanly with main 3ca0707) | |
Package TEST-COMPILE-POOL-LOAD-FLAKE. Claim: #1608 (comment). This is a test-only change to
runtime/test/d3d12_compile_pool_test.cpp(the test from #2233).The flake
test_a_checkpoint_sees_a_demand_that_started_during_itchecks its first look,EXPECT(!pool.has_compile_waiter())(line 379 on main), inside the checkpoint job, right afterlog.start("checkpoint"). The test thread waits on that samelog.start(log.wait_started(1)) and then submits the demanded build. On a loaded machine the checkpoint's worker can be preempted betweenlog.startand the look. The demanded build is then already queued or running when the look happens, and the check fails. This was found while verifying #2505: with 16 copies running at once, the check failed in 1 of 64 runs of main's test, and the same check failed in 1 of 48 runs with #2505.The fix
The job stores its first look in an atomic and opens a gate. The test waits for that gate with
Gate::wait_for(10s)(new; no fixed sleep), checks the stored look, and only then submits the demanded build. The rest of the test is unchanged.Tested
Profile M: RTX 4070 SUPER, Windows 11, Ryzen 7 9800X3D, MSVC RelWithDebInfo. CPU only.
d3d12_compile_pool_test.exeat once, 13 rounds:sleep_for(200ms)afterlog.start("checkpoint")stands in for a preempted worker. It is not committed.git diff --checkandscripts/check_no_game_data.pyare clean. No game files used.AI-assisted (Claude Code).
🤖 Generated with Claude Code