Repository navigation
Conversation
The watchdog thread takes its pair's lock, reads ARMED_GPU_WAITS and sleeps on the condvar when it is 0. The arm in try_gpu_wait called notify_one() without taking that lock, so a notify falling between the watchdog's read of 0 and its cv.wait was lost: the watchdog slept with the wait armed, its timeout never ran, and a wait with no producer was never released on the CPU (no "did not complete" line). Only a later arm woke it. The notify now takes the pair's lock (notify_sync_watchdog). The lock is a leaf: the watchdog takes no other lock while it holds it, so the notifier's SYNC_GRAPH or queue locks cannot invert with it. The check and sleep move to sync_watchdog_sleep_if_idle, with an after_check hook the new test uses to arm and notify between the read and the wait; it fails on main (the watchdog does not wake within 2 s) and passes with the fix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 62f3721)
|
Ran the GPU-wait watchdog tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. Both deterministic CPU tests pass, including the case where a wait is armed between the watchdog's counter check and its sleep. The PR has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti. The author's run was on an RTX 3060 Ti in release; mine is debug here. Not tested: a real GPU wait in a title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
Backport #2499 by Tiago Leal (@tiagonleal), original commit
62f372122cb7c5efa8c2e78e4979e310b87dcb61, ontonvidia-dev54225f5884a94cd23b7aab3f703a7c975070aa77. This is the NVIDIA branch port of that existing main PR. The watchdog could miss an armed wait's notification between checking its counter and sleeping, leaving the timeout monitor asleep.What is in it
Tested
497b3c008eb21422d16b93df5b238550f1434508.d50f6656fb50b7927a2279d4c78b24222be3da54:cargo build --locked --release -p xcl --target-dir <isolated-target>exited 0 in 228.576s, with 9 warnings. This includes the change but is not a standalone build/test of this PR head.f94b44ac88a71feab670b6983f35b9837703ec00, before the later diagnostic/shader additions:cargo test --locked --release -p xcl --lib <filter> --target-dir <isolated-target> -- --exact --test-threads=1 --nocapture. Filtershle::d3d12x::list_x::tests::a_wait_armed_during_the_watchdogs_check_wakes_itandhle::d3d12x::list_x::tests::sync_watchdog_pair_is_set_before_the_thread_starts: each 1 passed, 0 failed, 0 ignored, 1,871 filtered, no SKIPPED messages. No before-fix run was performed in this batch.Regression run
Pending paired clean-head main/PR title runs. No smoke result or confirmed world-loading recovery is claimed. Draft while required validation remains incomplete.
Not tested
AI use
Codex (GPT-6) checked overlap, reviewed and ported the existing change, and prepared this description. The original contributor and AI provenance remain in the preserved commit.
Optional temporary Discord for coordinating contributor work, testing and comparing results: https://discord.gg/6B4TykyC4W