D3D12.X: allocator pool retains internal fences after command queue release #1909
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#1909
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@DEViANCEVxXXxM on GitHub · 2026-11-24 23:00 UTC · original
D3D12.X: allocator pool retains internal fences after command queue release
Follow-up to #1668 and #1691, tested on revision
81f6397.The updated queue lifetime fix passes all 12 synthetic validation runs. However, additional live-object diagnostics show persistent fence retention after all test workers have joined.
Observations
Refcount: 2,IntRef: 0.Refcount: 1.Source inspection shows that
alloc_pool::State.fencesretains per-queue fence references without an explicit queue-release cleanup path.The global
real::FENCESregistry may also contribute to retention.Limitations
The diagnostic changes only extend live-object logging and assign object names. Individual reference owners have not been directly verified. Unbounded growth has not yet been established.
Synthetic tests only. No retail title testing.
AI assistance: ChatGPT (GPT-6.2) assisted with diagnostics, source review and report preparation.
@DEViANCEVxXXxM on GitHub · 2026-11-24 23:05 UTC · original
<html>Follow-up: accumulation confirmed across sequential workloads in a single process.
I ran three consecutive synthetic workloads of 1,024 copy operations each, with all workers joined and a five-second idle period before each live-object report.
Metric | Baseline | Cycle 1 | Cycle 2 | Cycle 3 -- | -- | -- | -- | -- Allocator-pool fences | 0 | 47 | 67 | 84 Fixture fences | 0 | 8 | 16 | 24 Total live fences | 2 | 60 | 89 | 115 Device Refcount | 46 | 107 | 136 | 162 Live command queues | 1 | 1 | 1 | 1All previously observed fence address/name pairs remained visible in subsequent snapshots. All 84 allocator-pool fences reported
Refcount: 2, IntRef: 0at the final snapshot.3,072 successful copy operations.
3,145,728 verified 32-bit words.
Zero D3D12 errors, OOM or timeouts.
No additional live command queues.
The results demonstrate cumulative fence retention within the measured workload, rather than merely a transient increase during GPU activity.
Base revision:
81f6397(#1691), with diagnostic-only object naming and expanded live-object logging.Three cycles do not establish unbounded growth. Individual COM reference owners still require verification.
AI assistance: ChatGPT (GPT-6.2). Synthetic tests only.
</html>@DEViANCEVxXXxM on GitHub · 2026-11-24 23:12 UTC · original
Related PR overlap review
I checked current main (
689f2db) and the related PRs #1691, #867 and #1422.PR #867 already introduces
create_raw_fencefor internal synchronization objects, which may address the global fence registry's contribution to the observed retention.However, neither #867 nor #1422 currently appears to remove per-queue entries from
alloc_pool::State.fenceswhen queues are released.To avoid duplicating existing work, I suggest coordinating the remaining allocator-cache lifetime issue with these PRs rather than introducing another internal fence creation mechanism.
This is based on static source review; combined runtime validation has not yet been performed.
@DEViANCEVxXXxM on GitHub · 2026-11-24 23:25 UTC · original
<html>Combined validation of #1691 and #867
I tested both PRs together using the same synthetic fixture and three sequential workloads.
Metric | #1691 | #1691 + #867 -- | -- | -- Allocator-pool fences | 84 | 84 Allocator fence Refcount | 2 | 1 Total live fences | 115 | 111 Device Refcount | 162 | 158 Successful copy operations | 3072 | 3072 Errors | 0 | 0PR #867 appears to address the additional reference associated with internal fence creation. However, allocator-pool fence accumulation remains observable.
The remaining issue appears to be the lifetime of per-queue entries in
alloc_pool::State.fences.To avoid duplicating #867, I suggest focusing further work on allocator-cache ownership and coordination with #1691.
Tested revisions:
81f6397anda4c5a82, combined locally with diagnostic naming and expanded logging.One run per configuration; individual reference owners and unbounded growth are not conclusively established.
</html>@JJAutoCompare on GitHub · 2026-11-25 00:30 UTC · original
I compared the two current allocator-pool fixes. Both add cleanup on final command-queue Release, so they overlap on #1909. I’d advance #1945 (
907cf34) over #1967 (61db31a). On adopted devices #1967 still creates the internal fence through the hook that retains a reference inreal::FENCES, and leaves a pending mark keyed by the old queue address. #1945 bypasses that registry and preserves pending marks when a queue address is reused.Before merging #1945, the synthetic fence’s completion value should be synchronized. The test writes a
Cell<u64>outside the pool lock while another queue cleanup can scan retired fences under that lock. The GPU test covers the adopted-device release path. I confirmed both candidates merge cleanly intomain@8c4a46awithgit merge-tree --write-tree. I did not rerun either PR’s GPU suite. Code triage assisted by Codex (gpt-6.2-sol).github-bot referenced this issue2026-11-26 06:18:30 +00:00