Repository navigation
Description
Setup: AMD Radeon RX 7900 XTX 24 GB (driver 32.0.32029.2010), Ryzen 9 7950X3D, 31 GB RAM, Windows 11 Pro 26300, Rust 1.100.0, release, DXC 1.8.2505.32. Tree: amd-dev 7c795f5 + #3024 (b7fc3b4) + #3025 (d818f46) applied as patches. XCL_NETWORK=0 throughout.
What happens: the title stops presenting, the xcl-activity thread stops logging (no activity / profile / memory
lines), nothing is building, audio keeps playing. No device removal, no crash. It is a race: it hit 1 of 7 runs of the same exe.
Evidence: I attached a read-only debugger (cdb -pv) to the stalled game process and printed every thread's stack. Three
threads are on one chain (function names only; the build is amd-dev 7c795f5 + #3024 + #3025):
thread A (title texture refresh):
title_textures::refresh -> refresh_once -> upload_all -> vram::before_execute <- holds PAGES
-> vram::Pages::flush_zero_tiles -> title_textures::own_work
-> ID3D12GraphicsCommandList::Reset -> real::cl_reset -> list_x::on_pc_reset
-> list_x::reset_copy_scratch -> Mutex::lock_contended <- waits for COPY_SCRATCH
thread B (title copy):
list_x::copy_texture_region_x -> format_alias::try_copy_texture_region
-> copy_one_subresource_through_buffer -> list_x::acquire_scratch_for_copy
-> CopyScratchCache::acquire <- holds COPY_SCRATCH
-> real::res_release -> late_release::hold/enqueue -> late_release::drain_known
-> vram::recycle_ready -> Mutex<BTreeMap<usize, Option<Pages>>>::lock (PAGES) <- waits for PAGES
thread C (xcl-activity): vram::page_bytes -> PAGES.lock() <- also waits for PAGES
In the source: COPY_SCRATCH is one global Mutex<CopyScratchCache> (list_x.rs). acquire_scratch_for_copy locks it and
CopyScratchCache::acquire releases a resource while holding it; reset_copy_scratch locks it again. flush_zero_tiles
(added by d625b20, only on amd-dev, main has none) runs a command list from before_execute, which holds PAGES
(Pages::flush_zero_tiles is called on &mut Pages under PAGES.lock()).
Earlier sighting: on amd-dev b5c0275 a stalled run showed a different stack in the same area (flush_zero_tiles ->
own_work -> q_execute_command_lists -> present::note_execute -> late_release::drain_known -> vram::recycle_ready,
all under PAGES). That is not the cycle above.
What I have: one occurrence, in the run described below, and the stacks above. What I do not have: a way to trigger it on
demand, a second occurrence, or a fix. I am not proposing one in this issue.
Run: the setup line above. XCL_DIRECT_DXIL=1 XCL_PIPELINE_MAX_KB=1500 XCL_SPLIT_WAVE64=1 XCL_RT_GATE=auto XCL_DRED=1 XCL_FRAME_DUMP=45, A pressed every 6 s. The activity lines stopped at 494 s.
AI use: Claude Code, Claude Sonnet 5.5 ran the runs, read the stacks and wrote this.
Activity
thehollowedone commentedon Nov 28, 2026
The reported two-thread cycle has a narrower entry point than
flush_zero_tilesitself. Onamd-devat7c795f5, the zero-fill list resets insidetitle_textures::own_workwhilePAGESis held. A successful PC Reset still calls the title-list reset hook, which entersCOPY_SCRATCHthroughreset_copy_scratch. In the other direction,CopyScratchCache::acquirecan drop a replaced resource while holdingCOPY_SCRATCH; its COM release can drain intovram::recycle_ready, which waits forPAGES. That matches the two stacks in this issue. #2703 bypasses the title hooks for internalExecuteCommandLists, but does not cover Reset.For this Reset edge, I suggest skipping the title-list reset hook during XCL's own work. Keep the native Reset, vtable preservation, HRESULT handling and DRED bookkeeping. The ZeroRing list records native buffer copies and barriers; it has no title-list scratch or binding state to clear.
Candidate one-line guard
A focused regression can use the existing fake adopted-list pattern in
real::queue_testsand the test-onlydispatch_chain::seed_shared_for_test/has_shared_for_testhelpers: seed state for the fake list, call successful native Reset insideown_work, and verify native Reset ran while the title-list reset hook did not clear that state. A normal successful Reset should clear it; a failed Reset should leave it. A repeated run of the reported AMD setup would then check the actual hang.This guard addresses the observed
PAGES -> COPY_SCRATCHReset edge. COM releases elsewhere underCOPY_SCRATCHand other internal calls made while holdingPAGESstill need a separate lock-order audit. I checked the source path; I have not run this candidate or a title test.AI use: Codex (GPT-6.2 Sol) traced the path and wrote this note; Codex (GPT-6.2 Astra) independently checked the lock and lifecycle edges.
D3D12.X: drop CopyScratch resources outside COPY_SCRATCH lock and ski…
D3D12.X: drop CopyScratch resources outside COPY_SCRATCH lock and ski…
D3D12.X: drop CopyScratch resources outside COPY_SCRATCH lock and ski…