d3d12: check device removal during prefix fence waits #259

Merged
Valdi320 merged 1 commit from upstream-pr/259 into main 2026-11-26 21:27:17 +00:00
Valdi320 commented 2026-11-26 18:45:57 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T18:45:57Z.


A narrow robustness improvement related to the device-loss symptoms in #215/#232. A memory-wait worker used an infinite event wait before inspecting the fence again, and a wakeup did not establish the requested prefix value had completed. Use one registered event with bounded 100 ms sleeps and recheck actual completion and GetDeviceRemovedReason. No new deadline on a healthy slow prefix; no release on a lost device or stale notification. Preserve the existing failure propagation and stop the worker. If a failed registration may still retain the event, retain the handle to process exit (at most once per failed worker).

Four deterministic tests: stale notification, missing notification with removal, removal sentinel, already complete/wait failure. Native isolated test binary passed 4/4. The Windows D3D12 test binary ran the entire memory_wait module under GE-Proton11-14: 18/18 passed, hardware paths confirmed adapter 10de:2704. Six no-GPU groups and 10/10 Lanes controls passed, with rebuilt provider and unchanged Lanes/XMem/BVH/GameInput fixture sources verified before staging. This is not a reproduction or a fix of NVIDIA Xid, nor does it break a genuine cross-queue dependency cycle. The missing-notification scenario is simulated, not a driver fault injection. Full GPU and AMD validation outstanding. Draft for review; independent of the label-bridging work.

<!-- greyfinch-sync:brcly/TuxBox:issue:5515488451 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/259). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T18:45:57Z. --- A narrow robustness improvement related to the device-loss symptoms in #215/#232. A memory-wait worker used an infinite event wait before inspecting the fence again, and a wakeup did not establish the requested prefix value had completed. Use one registered event with bounded 100 ms sleeps and recheck actual completion and GetDeviceRemovedReason. No new deadline on a healthy slow prefix; no release on a lost device or stale notification. Preserve the existing failure propagation and stop the worker. If a failed registration may still retain the event, retain the handle to process exit (at most once per failed worker). Four deterministic tests: stale notification, missing notification with removal, removal sentinel, already complete/wait failure. Native isolated test binary passed 4/4. The Windows D3D12 test binary ran the entire memory_wait module under GE-Proton11-14: 18/18 passed, hardware paths confirmed adapter 10de:2704. Six no-GPU groups and 10/10 Lanes controls passed, with rebuilt provider and unchanged Lanes/XMem/BVH/GameInput fixture sources verified before staging. This is not a reproduction or a fix of NVIDIA Xid, nor does it break a genuine cross-queue dependency cycle. The missing-notification scenario is simulated, not a driver fault injection. Full GPU and AMD validation outstanding. Draft for review; independent of the label-bridging work.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!259
No description provided.