main (683ad7a) on Linux/NVIDIA: the title freezes at world entry with threads in descriptor mirroring (sync_heaps / record), GPU and CPU idle #1921

Open
opened 2026-11-26 04:48:48 +00:00 by github-bot · 5 comments
Owner

@⁠Impre-visible on GitHub · 2026-11-25 01:00 UTC · original

Summary

On today's main (683ad7a) the title freezes for good when it enters the world on my Linux/NVIDIA machine: the log goes silent, the GPU is idle, no title thread uses CPU, and no driver error is logged. 3 runs out of 3 that reached the world. With the title's watchdog active this would show as the usual stop about 30 s later (#1323's report), so it may be hiding behind that symptom elsewhere.

Setup

  • Arch Linux, kernel 6.18 LTS, GTX 1660 6 GB (32-lane waves), NVIDIA 620.73.04, Wine from GE-Proton11-6 + vkd3d-proton (Proton Experimental), native d3dcompiler_47 in the prefix, Series X mode, diagnostics build.
  • Tree: main 683ad7a + the two-line handle key of the closed #226 (without it the NVIDIA shader compiler crashes at world entry here) + #1583 + #1722 + #1769 + #1523 + #454, run with VICTORY_NO_WATCHDOG=1 so the freeze can be observed. I have not run main without these.

Measured

run caches world reached then
1 empty yes: 4 frame-rate lines at 2,500 to 2,990 draws/frame, 16 to 29 s per frame log silent; stopped by my 150 s limit
2 warm yes: 1 frame-rate line log silent for 400 s, stopped
3 warm yes log silent; sampled for 5 minutes, below

Run 3, sampled every ~45 s for 5 minutes while silent: GPU 0 %, video memory constant at 5,700 MiB, and per-thread CPU time from /proc: the busiest title thread uses 2 to 3 % of one core, everything else 0 to 2 %. No NVRM: Xid in the kernel log. Before the freeze: 715 compute pipelines made, 138 refused (wave64, expected on this card), 15 compute and 3 pixel programs not translated.

A VICTORY_STACKS dump taken at the moment a run went silent (the run before; symbolised VIctory frames only, title frames omitted):

  • one title thread: queue::present → Host::present (host.rs:2141) → Host::execute (host.rs:599) → descriptor::sync_heaps (descriptor.rs:185) → HostHeap::mirror (descriptor/host.rs:659, the self.viewed.set(...) call), innermost frame not in a system module;
  • two title threads: descriptor::create_placed_srv (descriptor.rs:511) → descriptor::record (descriptor.rs:421) → descriptor::mirror (descriptor.rs:129), waiting in Mutex::lock_contended, i.e. for SHADER_HEAPS, which sync_heaps holds for its whole loop;
  • the 8 pipeline workers idle in make::work.

The stack dumper itself printed nothing more after that dump.

What I can and cannot say

  • It is a freeze, not slowness: nothing computes and nothing is submitted for minutes.
  • The three threads above are consistent with a lock cycle around SHADER_HEAPS between sync_heaps (called under Host::execute) and a title thread recording a view at the same time, but I have only one dump and I did not find the second lock of the cycle by reading the code, so that is a lead, not a diagnosis. I do not know what the first thread is waiting for inside viewed.set.
  • I do not know whether it needs the capped view heap (count=1245184, host limit 1,000,000 here) or Wine.
  • On the tree I used before today (main ffe310e plus open PRs, no sync_heaps), the world ran for up to 20 minutes on this machine.

No game data attached. I can run a patched build or more dumps if that helps.

🤖 Generated with Claude Code

**@⁠Impre-visible** on GitHub · 2026-11-25 01:00 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921) ## Summary On today's `main` (683ad7a) the title freezes for good when it enters the world on my Linux/NVIDIA machine: the log goes silent, the GPU is idle, no title thread uses CPU, and no driver error is logged. 3 runs out of 3 that reached the world. With the title's watchdog active this would show as the usual stop about 30 s later (#1323's report), so it may be hiding behind that symptom elsewhere. ## Setup - Arch Linux, kernel 6.18 LTS, GTX 1660 6 GB (32-lane waves), NVIDIA 620.73.04, Wine from GE-Proton11-6 + vkd3d-proton (Proton Experimental), native `d3dcompiler_47` in the prefix, Series X mode, diagnostics build. - Tree: `main` 683ad7a + the two-line handle key of the closed #226 (without it the NVIDIA shader compiler crashes at world entry here) + #1583 + #1722 + #1769 + #1523 + #454, run with `VICTORY_NO_WATCHDOG=1` so the freeze can be observed. I have not run `main` without these. ## Measured | run | caches | world reached | then | |---|---|---|---| | 1 | empty | yes: 4 frame-rate lines at 2,500 to 2,990 draws/frame, 16 to 29 s per frame | log silent; stopped by my 150 s limit | | 2 | warm | yes: 1 frame-rate line | log silent for 400 s, stopped | | 3 | warm | yes | log silent; sampled for 5 minutes, below | Run 3, sampled every ~45 s for 5 minutes while silent: GPU 0 %, video memory constant at 5,700 MiB, and per-thread CPU time from `/proc`: the busiest title thread uses 2 to 3 % of one core, everything else 0 to 2 %. No `NVRM: Xid` in the kernel log. Before the freeze: 715 compute pipelines made, 138 refused (wave64, expected on this card), 15 compute and 3 pixel programs not translated. A `VICTORY_STACKS` dump taken at the moment a run went silent (the run before; symbolised VIctory frames only, title frames omitted): - one title thread: `queue::present` → `Host::present` (host.rs:2141) → `Host::execute` (host.rs:599) → `descriptor::sync_heaps` (descriptor.rs:185) → `HostHeap::mirror` (descriptor/host.rs:659, the `self.viewed.set(...)` call), innermost frame not in a system module; - two title threads: `descriptor::create_placed_srv` (descriptor.rs:511) → `descriptor::record` (descriptor.rs:421) → `descriptor::mirror` (descriptor.rs:129), waiting in `Mutex::lock_contended`, i.e. for `SHADER_HEAPS`, which `sync_heaps` holds for its whole loop; - the 8 pipeline workers idle in `make::work`. The stack dumper itself printed nothing more after that dump. ## What I can and cannot say - It is a freeze, not slowness: nothing computes and nothing is submitted for minutes. - The three threads above are consistent with a lock cycle around `SHADER_HEAPS` between `sync_heaps` (called under `Host::execute`) and a title thread recording a view at the same time, but I have only one dump and I did not find the second lock of the cycle by reading the code, so that is a lead, not a diagnosis. I do not know what the first thread is waiting for inside `viewed.set`. - I do not know whether it needs the capped view heap (`count=1245184`, host limit 1,000,000 here) or Wine. - On the tree I used before today (`main` ffe310e plus open PRs, no `sync_heaps`), the world ran for up to 20 minutes on this machine. No game data attached. I can run a patched build or more dumps if that helps. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:49 +00:00
Author
Owner

@⁠BastienRodz on GitHub · 2026-11-25 01:05 UTC · original

A static read of current main (42363ab) for the lock cycle behind your dump.

B and C are explained: record drops VIEWS before it waits for SHADER_HEAPS (descriptor.rs:129), and they hold nothing in A's chain. A holds submitted, then SHADER_HEAPS, then the heap's made, when it calls Viewed::set. I found no path that takes Viewed.inner and then waits for SHADER_HEAPS:

  • uploads runs after sync_heaps, under the same submitted mutex;
  • forget and ranges don't take that path either.

So the descriptor registry doesn't close a cycle by itself.

The strongest candidate is the write-watch self-deadlock in #1849:

  • runtime_memory still accepts MEM_FREE (watch.rs:216), so a null loose shadow can guard a window holding Wine's heap pages;
  • a thread holding GUARDS (Tracked::take, writing) then faults on an allocator write;
  • the vectored handler takes GUARDS again (watch.rs:539);
  • A would then be stuck behind it inside set, through the allocator or a buffer lookup in seen, and B and C behind A.

Your dump lacks A's innermost frame, so this is a lead and not proof. Two things would settle it:

  1. run #1849 alone on your build;
  2. on a baseline freeze, take an externally stopped all-thread dump with the matching PDB, to see A's leaf and which thread owns GUARDS.

Also, plain 683ad7a has no sync_heaps (it came with 86a5ed6), so your composite build's own PDB is what will symbolize A's frame.

**@⁠BastienRodz** on GitHub · 2026-11-25 01:05 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921#issuecomment-7149203617) A static read of current `main` (`42363ab`) for the lock cycle behind your dump. B and C are explained: `record` drops `VIEWS` before it waits for `SHADER_HEAPS` (`descriptor.rs:129`), and they hold nothing in A's chain. A holds `submitted`, then `SHADER_HEAPS`, then the heap's `made`, when it calls `Viewed::set`. I found no path that takes `Viewed.inner` and then waits for `SHADER_HEAPS`: - `uploads` runs after `sync_heaps`, under the same `submitted` mutex; - `forget` and `ranges` don't take that path either. So the descriptor registry doesn't close a cycle by itself. The strongest candidate is the write-watch self-deadlock in #1849: - `runtime_memory` still accepts `MEM_FREE` (`watch.rs:216`), so a null loose shadow can guard a window holding Wine's heap pages; - a thread holding `GUARDS` (`Tracked::take`, `writing`) then faults on an allocator write; - the vectored handler takes `GUARDS` again (`watch.rs:539`); - A would then be stuck behind it inside `set`, through the allocator or a buffer lookup in `seen`, and B and C behind A. Your dump lacks A's innermost frame, so this is a lead and not proof. Two things would settle it: 1. run #1849 alone on your build; 2. on a baseline freeze, take an externally stopped all-thread dump with the matching PDB, to see A's leaf and which thread owns `GUARDS`. Also, plain `683ad7a` has no `sync_heaps` (it came with `86a5ed6`), so your composite build's own PDB is what will symbolize A's frame.
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 02:27 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 02:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921#issuecomment-7150754870) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠Impre-visible on GitHub · 2026-11-25 06:50 UTC · original

@⁠BastienRodz your lead was right: with #1849 merged the freeze is gone here.

Same machine and setup as above (Linux, Wine + vkd3d-proton, GTX 1660), same tree plus #1849, VICTORY_NO_WATCHDOG=1:

runs that reached the world froze at world entry
without #1849 3 3
with #1849 2 0

Both runs with #1849 ran their full 15 minutes in the world with no silence, no Xid in the kernel log and 4,000 to 4,500 draws per frame at about 1.3 s per frame once the caches were warm. The final image now shows the lit scene of the first playable moment on this card (overexposed sky, lower half dark), which this tree never reached before.

Correction to my report: the tree was main as fetched when I built it (after 86a5ed6), not 683ad7a; you were right that plain 683ad7a has no sync_heaps.

Still on this card with that tree: 153 of 855 compute pipelines refused (wave64, no emulation in it), about 150 no dynamic slots for its tables drops per run (#1548 is not in it).

I will keep counting to five runs and close this if it holds.

**@⁠Impre-visible** on GitHub · 2026-11-25 06:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921#issuecomment-7155208769) @⁠BastienRodz your lead was right: with #1849 merged the freeze is gone here. Same machine and setup as above (Linux, Wine + vkd3d-proton, GTX 1660), same tree plus #1849, `VICTORY_NO_WATCHDOG=1`: | | runs that reached the world | froze at world entry | |---|---|---| | without #1849 | 3 | 3 | | with #1849 | 2 | 0 | Both runs with #1849 ran their full 15 minutes in the world with no silence, no `Xid` in the kernel log and 4,000 to 4,500 draws per frame at about 1.3 s per frame once the caches were warm. The final image now shows the lit scene of the first playable moment on this card (overexposed sky, lower half dark), which this tree never reached before. Correction to my report: the tree was `main` as fetched when I built it (after `86a5ed6`), not `683ad7a`; you were right that plain `683ad7a` has no `sync_heaps`. Still on this card with that tree: 153 of 855 compute pipelines refused (wave64, no emulation in it), about 150 `no dynamic slots for its tables` drops per run (#1548 is not in it). I will keep counting to five runs and close this if it holds.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:53 UTC · original · edited 2026-11-25 15:47 UTC

Automated triage for the maintainers.

Run report: Linux, GTX 1660 6 GB, NVIDIA 620.73.04, GE-Proton11-6 + vkd3d-proton, a main checkout after 86a5ed6 plus several open PRs. Without #1849, 3 of 3 runs froze at world entry. With #1849, 5 of 5 ran 15 minutes in the world.

main now fixes the same cause in a different way, in 280b150 ("GPU: change tracking guards only the runtime's memory, region by region"). watch::track used to decide from a range's first page whether the whole range was the runtime's memory. A 4 MiB loose-shadow window that started in free memory was then guarded whole, including the process heap's committed pages after it, and a thread holding the heap lock faulted into the guard handler. Now runtime_pages in crates/victory-gpu/src/watch.rs decides region by region: plain committed private memory (the heap) is left out and never guarded, and a page touching it is copied whole instead. The commit message describes the same lock cycle (heap lock against the guard lock), found through hung tests. #1849's MEM_FREE check is no longer needed for this.

Proposed close as fixed in main (280b150). A run of current main (da82e44) without #1849 on this machine would confirm it, and a freeze there would keep this open. This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921#issuecomment-7162991576) · edited 2026-11-25 15:47 UTC <!-- victory-issue-triage v1 verdict=proposed-close seen=2026-11-25T14:43:37Z at=2026-11-25T15:49:00Z --> Automated triage for the maintainers. Run report: Linux, GTX 1660 6 GB, NVIDIA 620.73.04, GE-Proton11-6 + vkd3d-proton, a `main` checkout after `86a5ed6` plus several open PRs. Without #1849, 3 of 3 runs froze at world entry. With #1849, 5 of 5 ran 15 minutes in the world. `main` now fixes the same cause in a different way, in 280b150 ("GPU: change tracking guards only the runtime's memory, region by region"). `watch::track` used to decide from a range's first page whether the whole range was the runtime's memory. A 4 MiB loose-shadow window that started in free memory was then guarded whole, including the process heap's committed pages after it, and a thread holding the heap lock faulted into the guard handler. Now `runtime_pages` in `crates/victory-gpu/src/watch.rs` decides region by region: plain committed private memory (the heap) is left out and never guarded, and a page touching it is copied whole instead. The commit message describes the same lock cycle (heap lock against the guard lock), found through hung tests. #1849's `MEM_FREE` check is no longer needed for this. Proposed close as fixed in `main` (280b150). A run of current `main` (da82e44) without #1849 on this machine would confirm it, and a freeze there would keep this open. This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Impre-visible on GitHub · 2026-11-25 14:43 UTC · original

Five-run count done and posted on #1849: with that PR, 5 of 5 runs passed world entry and ran their 15 minutes (3 of 3 froze without it), no Xid. I will close this issue once #1849 is merged, or now if you prefer to track it there.

🤖 Generated with Claude Code

**@⁠Impre-visible** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/Marvisak/VIctory/issues/1921#issuecomment-7165719441) Five-run count done and posted on #1849: with that PR, 5 of 5 runs passed world entry and ran their 15 minutes (3 of 3 froze without it), no `Xid`. I will close this issue once #1849 is merged, or now if you prefer to track it there. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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#1921
No description provided.