GPU: stale list reset frees live dynamic slots in a replacement descriptor heap #3606

Open
opened 2026-11-27 20:30:40 +00:00 by github-bot · 0 comments
Owner

@⁠pickles976 on GitHub · 2026-11-27 20:29 UTC · original

Reproduced a descriptor-slot ownership bug on canonical 63bcca43c6a00a758510398fa43096ce7e4f7df0, independently of title execution. Existing owned fix: https://github.com/fxceless/victory-fork/pull/1324 (52ac4ec0f8a03f103c146e60228e53612759d435), also carried as github.com/trustno1-coder/VIctory-NVIDIA@47747d6236 . This is the dynamic-range release identity, distinct from #1331's native-heap rebinding cache.

State::dynamic records a title heap address, first slot and count. On reset/drop, descriptor::release_dynamic finds whichever heap is currently registered at that address. If a new title heap occupies the same address, an old State releases the replacement's live range.

Deterministic consumer repro (test-only; no GPU commands submitted):

  1. Construct a real shader-visible title Heap in fixed Box<MaybeUninit<Heap>> storage; register it normally. Allocate one host dynamic slot and retain it in an old State.
  2. Destroy the old Heap, including normal registry removal; construct/register a replacement Heap in that exact storage address.
  3. Allocate its first dynamic slot into a new live State (same slot index 4). Occupy all remaining dynamic slots.
  4. Call production old.reset(null()). A subsequent new_host.dynamic(1) must return None because the rightful range remains live.
  5. Drop the rightful State; allocation must then return Some(4).

Matched result on physical NVIDIA RTX 4060 Laptop (vendor 0x10de, non-software flag required), Wine 11 / Linux 6.17 / NVIDIA 590.48.1 / 16GiB RAM:

  • Canonical production + only fixture/helper/test accessor: 0/1, step 4 returns Some(4), expected None. Fresh compile 8.89s; test 0.70s. No freed-pointer dereference or intentionally stalled GPU.
  • Same canonical base + the owned monotonic HostHeap-ID port and same fixture: 1/1, 0.69s after fresh 5.59s compile. Stale reset preserves the live range; rightful State drop returns it. Local port commit 6234114cb98b386de0476c762e01f08d55500797 plus one corrected test import; not an exact upstream-head result.

Filter: draw::tests::stale_state_cannot_release_a_replacement_heaps_dynamic_range, Windows MSVC, --features diagnostics -- --exact --nocapture --test-threads=1. Evidence directories: verify-heap-identity-parent-control-20261127T202559Z/ and verify-heap-identity-address-reuse-corrected-20261127T202529Z/. An earlier local fixture compile-only failure used the wrong DXGI constant module and is not a production failure.

Installed vkd3d is diagnostic-relaxed 2576c0b4adfae4a+, not stock certification; vendor masking off, resource limits unchanged (9GiB/512MiB scope, 2048MiB available-RAM floor, 6000MiB GPU ceiling, 10GiB disk floor). The test creates native descriptor heaps but does not dispatch shaders or prove visible title corruption, black-HDR causality, performance or RAM savings.

Suggested owner action: bring the existing generation identity through every dynamic-range allocation/reset/drop path; retain this exact-address replacement consumer regression, not only a direct wrong-ID HostHeap.release test. No code PR or game assets attached.

**@⁠pickles976** on GitHub · 2026-11-27 20:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/3606) Reproduced a descriptor-slot ownership bug on canonical `63bcca43c6a00a758510398fa43096ce7e4f7df0`, independently of title execution. Existing owned fix: https://github.com/fxceless/victory-fork/pull/1324 (`52ac4ec0f8a03f103c146e60228e53612759d435`), also carried as https://github.com/trustno1-coder/VIctory-NVIDIA/commit/47747d62369a90bd708840622f13c7f55559a6f3 . This is the dynamic-range **release** identity, distinct from #1331's native-heap rebinding cache. `State::dynamic` records a title heap address, first slot and count. On reset/drop, `descriptor::release_dynamic` finds whichever heap is currently registered at that address. If a new title heap occupies the same address, an old State releases the replacement's live range. Deterministic consumer repro (test-only; no GPU commands submitted): 1. Construct a real shader-visible title Heap in fixed `Box<MaybeUninit<Heap>>` storage; register it normally. Allocate one host dynamic slot and retain it in an old State. 2. Destroy the old Heap, including normal registry removal; construct/register a replacement Heap in that exact storage address. 3. Allocate its first dynamic slot into a new live State (same slot index 4). Occupy all remaining dynamic slots. 4. Call production `old.reset(null())`. A subsequent `new_host.dynamic(1)` must return None because the rightful range remains live. 5. Drop the rightful State; allocation must then return Some(4). Matched result on physical NVIDIA RTX 4060 Laptop (vendor 0x10de, non-software flag required), Wine 11 / Linux 6.17 / NVIDIA 590.48.1 / 16GiB RAM: - Canonical production + only fixture/helper/test accessor: **0/1**, step 4 returns **Some(4)**, expected None. Fresh compile 8.89s; test 0.70s. No freed-pointer dereference or intentionally stalled GPU. - Same canonical base + the owned monotonic HostHeap-ID port and same fixture: **1/1**, 0.69s after fresh 5.59s compile. Stale reset preserves the live range; rightful State drop returns it. Local port commit `6234114cb98b386de0476c762e01f08d55500797` plus one corrected test import; not an exact upstream-head result. Filter: `draw::tests::stale_state_cannot_release_a_replacement_heaps_dynamic_range`, Windows MSVC, `--features diagnostics -- --exact --nocapture --test-threads=1`. Evidence directories: `verify-heap-identity-parent-control-20261127T202559Z/` and `verify-heap-identity-address-reuse-corrected-20261127T202529Z/`. An earlier local fixture compile-only failure used the wrong DXGI constant module and is not a production failure. Installed vkd3d is diagnostic-relaxed `2576c0b4adfae4a+`, not stock certification; vendor masking off, resource limits unchanged (9GiB/512MiB scope, 2048MiB available-RAM floor, 6000MiB GPU ceiling, 10GiB disk floor). The test creates native descriptor heaps but does not dispatch shaders or prove visible title corruption, black-HDR causality, performance or RAM savings. Suggested owner action: bring the existing generation identity through every dynamic-range allocation/reset/drop path; retain this exact-address replacement consumer regression, not only a direct wrong-ID HostHeap.release test. No code PR or game assets attached.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:30:40 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3606
No description provided.