World load dies at the commit limit (18.0 GB private, 48.8 of 49.0 GB system commit) #471
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#471
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?
@SaymonMaster14 on GitHub · 2026-11-24 03:48 UTC · original
## What happens
World load dies with the allocator's own message, not a crash report:
Exit
-1073740791(0xC0000409). Nothing incrashes.log, which is expected:the abort/fastfail path does not go through the VEH in
crash.rs.The size in the message tracks nothing in the code ÔÇö 50 MiB, 174 MiB, 768 KiB
and 67 MiB are all "whatever was asked for at that moment", and the 768 KiB one
is the tell: a small allocation failing is the commit limit, not a huge buffer.
Measured
Windows 11, 16 GB, RTX 5060 8 GB, Xeon E5-2680 v4. Release build. Committed
memory sampled every 3 s (
PrivateMemorySize64,PeakPagefileUsage, systemcommit):
The system commit sits at 48.8 GB of a 49.0 GB limit when it dies. About 29 GB
of that is other processes; the machine only gets there because the page file
was still the old 32 GB (raising it needs a reboot to take effect).
The rise is +6 GB in the last 30 s of the load, while fps goes 23.3 -> 7.7 and
preparing time goes 8.9 -> 15.9 ms of a 129 ms frame.
Where the memory goes
Not from one place, and the four that showed up first are all in the copy
bridge:
shadow.rswriting: the snapshot is grown to span every declared range,and growth allocated a second buffer while the old one stayed alive.
shadow.rsgive_back: the pool kept its eight largest buffers regardlessof size ÔÇö eight 174 MB snapshots, ~1.4 GB, never shrunk.
texture.rs: eachStagingkept aVecof the whole texture, forever.dstorage.rs:intermediate_sizecounted against no limit.Patched locally, measured, not enough
Those four are in #472. They build and pass
cargo test -p victory-gpu -p victory-hle(130 passed, 1 ignored), but the run still died, now at 67 MiBwith 18.0 GB private. They reduce the slope, they do not remove the ceiling.
Not comparable to earlier runs: those measured the page file (14.3-14.8 GB
peak), these measure
PrivateMemorySize64(18.0 GB peak), so "did the peak godown" cannot be read from the two side by side. There are no per-component
counters (pool bytes, scratch capacity, staging bytes) to attribute the growth
to, which is why the four above are a list and not a ranking.
Why this is not #407
#407 is the fix: one address space, the copies deleted. This is what happens
until stage 2 there lands. Worth keeping the report separate ÔÇö the numbers are
the argument for #407 being worth its cost, and the four bridge leaks are what
a machine without commit headroom hits first.
To reproduce
VICTORY_GAME_DIRat the dump,victory run <exe> --execute, samplePrivateMemorySize64every 3 s. It dies between 60 and 180 s, always in theworld load, never in the menus.
What would settle it
A per-component counter (pool bytes, scratch capacity, staging bytes) printed
with
PrivateUsagefrom the existingK32GetProcessMemoryInfocall incopystat.rswould turn the list above into a ranking, and show whether therest is title memory and shared buffers (
shadow.rsshared_buffer, the 4 MiBloose windows) which no copy-path patch reaches.
@lucaseddd on GitHub · 2026-11-24 05:16 UTC · original
Claiming the copy-memory breakdown requested under “What would settle it”: idle shadow snapshot capacity, cached texture upload staging bytes and retained texture read scratch. This is a diagnostics-only contribution, separate from the allocation changes in #472 and process-level counters in #484.
@colehammond65 on GitHub · 2026-11-24 06:58 UTC · original
Not commit exhaustion on this 32 GB system. Four RTX 4080 runs peaked at 20.37–22.69 GiB private commit and retained 7.13–9.44 GiB of system commit headroom. They still ended in
0x887A0005/0x887A0006with no page fault. This is a separate data point from the low-commit cases, not evidence that #471 is wrong. Full report: #334AI-assisted test report.
@lucaseddd on GitHub · 2026-11-24 12:24 UTC · original
The retained-copy-memory diagnostics I claimed are in #602. Those counters can help attribute private memory growth in the low-headroom case. For the device removals with commit headroom, #496 tracks the graphics failure separately.
@BaggyALPHA on GitHub · 2026-11-24 15:32 UTC · original
I ran a local diagnostics stack with the Series S PresentX fix from #211 (
af9a911), process memory logging from #484 (3b7e1d5), and retained-copy counters from #602 (4367d6c). The two diagnostics patches add adjacent entries to the same log function, so I retained both entries without changing their calculations.With WARP and an existing test profile, the run opened story and terrain archives and reached its planned time limit before a confirmed world frame. It produced 18 paired process-memory and retained-copy samples. I cross-checked the private and working-set series against once-per-second Windows process samples. They tracked closely during stable intervals.
Idle snapshot capacity stayed at zero. The combined reported capacity of cached texture uploads and CPU texture scratch was below 1% of the final sampled private commit. These counters measure retained buffer capacity, so they cannot show where the remaining commit was charged. Available system commit declined more than the title process's private commit grew, so process-private readings alone do not capture the full change during this run. There was no out-of-memory error or device removal before the test ended.
AI-assisted test execution and write-up (OpenAI Codex).
@lucaseddd on GitHub · 2026-11-24 20:32 UTC · original
Thanks for cross-checking the counters against Windows process samples. That verifies the instrument works alongside #484 in your loading run. A paired sample at world entry or the commit-limit failure would help establish which components are growing at the point this issue tracks.
@aycow on GitHub · 2026-11-24 21:03 UTC · original
I prepared a local diagnostic stage building on #484 and #602. It samples process private commit, working set, system commit/limit, DXGI usage, and live/peak copy-bridge capacities every three seconds after device creation, including before the first present. It separates active snapshots, idle snapshot capacity, backing extents, list uploads, scratch retained across reset and texture staging.
In the same synthetic allocation sequence on AMD and WARP, the instrumented baseline saw a 6 MiB explicitly owned snapshot peak and 6 MiB idle capacity. The author-preserving #472 composition saw 4 MiB and 4 MiB. These are owner capacities, with any allocator-internal reallocation overlap and title-level commit impact still unmeasured. If you already collect #484/#602 measurements on an authorized run, a matched sample near world entry or termination would help compare the reported phase. Aggregate metrics only.
AI-assisted using Codex.
@lucaseddd on GitHub · 2026-11-24 21:04 UTC · original
Thanks for testing the #484/#602 composition and carrying the #472 authorship through. Separating active snapshots from idle capacity makes the synthetic comparison interpretable. A matched world-entry sample can then show whether the change shifts total process commit on the same workload.
@aycow on GitHub · 2026-11-24 21:24 UTC · original
@KevinPratap The host-memory attribution branch is available. On a Windows diagnostics build, set VICTORY_MEMORY_STATS=1 and collect the victory_gpu::memory samples from a matched load through the same window or failure. Adapter, driver, build, cache state and approximate frame or elapsed time are enough to match runs. The sampler reports process and system commit, GPU local and non-local usage, live and idle snapshots, shadow backing and virtual overlap, staged uploads and retained scratch. Please share only aggregate fields.
AI-assisted using Codex.
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
Automated triage for the maintainers.
Thanks for the memory samples (RTX 5060 8 GB, 16 GB RAM, Windows 11, release build). This issue is where the world-load out-of-commit failure (
memory allocation of N bytes failed, exit0xC0000409) is tracked. The same failure appears in comments on #468: an RTX 4060 Laptop at 26–27 GB committed, and an RTX 2080 SUPER with 16 GB RAM.mainhas changed in this area since the report:crates/victory-gpu/src/shadow.rs,give_back: the snapshot pool no longer keeps "the eight largest". It now keeps the largest buffers up toPOOL_BYTES(2 GiB) in total, so idle snapshot memory can still reach 2 GiB.Shadow::writingnow keeps the snapshot as segments. When a range grows, it still takes a new pooled buffer of the merged size before the old segments go back to the pool.victory-hle/src/modules/dstorage.rsstill allocatesintermediate_sizewith no cap.Open PR #472 (your four changes) addresses these but needs a rebase onto current
main. #602 and #484 add the counters asked for under "What would settle it".Two things are missing from the report:
git rev-parse --short HEAD);A run on current
mainwith those counters, sampled near the failure, would show which component grows.Generated by Claude Code