Slot eviction: hang probe and stack dump, compute protection, opt-in guards, memory by holder #2372
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2372
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2372"
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?
@Ahadfahim on GitHub · 2026-11-29 12:28 UTC · original
Ahadfahim:fix/slot-evict-deadlock→main· +680 −22 · 13 files · 1 commits · openWhat this adds
Tools and guards built while chasing the
Unsignaled CrossQueueBarriercrash withVICTORY_SAMPLED_MARKS=1+VICTORY_SAMPLED_EVICT=1(RTX 5080, 16 GB). The crash turned out to be the same slot-lock / texture-table inversion thatcf338eabalready fixes, so this keeps that fix as it is and adds what helped find it.Hang probe (
queue/behind.rs;VICTORY_HANG_PROBE=0turns it off): after 3 s without a presented frame it logs each queue's front (fence/value wait and whether met, submission, signal, present), every fence wait and signal in the line, and the submission counts. It repeats every 5 s (at most 6 times) and logs when frames come back.Hang dump (new
hangdump.rs;VICTORY_HANG_DUMP=0turns it off): on the probe's 1st and 3rd look it writes every thread's named stack to%LOCALAPPDATA%\victory\logs\hang-<unix>-<pid>.txt. Each thread is suspended in turn, unwound with no allocation, then resumed. This is what showed the ABBA (submit thread: table → slot lock; list thread: slot lock → table).Compute protection: compute programs mark the slots they read in the upper half of the marks buffer (
SAMPLED_COMPUTE), and those textures are never evictable.VICTORY_SAMPLED_PROTECT=nonpixelextends this to every non-pixel stage. The setting is keyed in the shader cache.Slot eviction guards, all off by default:
VICTORY_SLOT_EVICT_IDLE_MS: 60000 cut "made again" from about 50% to 2–20% here.VICTORY_SLOT_EVICT_MAXVICTORY_SLOT_EVICT_MIN_FPSF8 and F7 flushes bypass them.
Every 10 s: a "slot eviction since the start" line and a "card memory by holder (MiB)" line. The holder line covers texture blocks with their free and widest-free space, buffer copies split into copies / windows / arenas / mapped, staging blocks, targets and the rest. It's how a texture pool with 2 GB free but only 29 MiB widest free was spotted.
play-foxhound.ps1: optional-Victory <exe>and-SettingsFile <file>to run a saved build with its own settings. Both are carried through F1 restarts.Testing
cargo test -p victory-gpu --lib: 916 passed.cargo test -p victory-shader --lib: 462 passed.568c5e5base: 13 minutes with eviction active and no freeze after the lock fix, and compute protection running through 11+ minutes of eviction.739f8339/cf338eabwas done by hand.🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-30 09:34:54 +00:00
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.