Checkpoint observed early pipeline keys independently of driver-library saves #1982

Closed
opened 2026-11-29 05:41:18 +00:00 by NotADonky43 · 4 comments
NotADonky43 commented 2026-11-29 05:41:18 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NotADonky43 on 2026-11-29T05:41:18Z.


Early-use metadata can remain unwritten while driver library serialization is throttled under pressure. Following the measured first-use waits on #1268, I am working on lightweight periodic persistence in crates/victory-gpu/src/pipeline/library.rs with retry and concurrent-writer coverage. No shader, driver cache or sampler safety-policy changes.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6675341265 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1982). Originally posted by [NotADonky43](https://github.com/NotADonky43) on 2026-11-29T05:41:18Z. --- Early-use metadata can remain unwritten while driver library serialization is throttled under pressure. Following the measured first-use waits on #1268, I am working on lightweight periodic persistence in crates/victory-gpu/src/pipeline/library.rs with retry and concurrent-writer coverage. No shader, driver cache or sampler safety-policy changes.
NotADonky43 commented 2026-11-29 05:41:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NotADonky43 on 2026-11-29T05:41:20Z.


/claim

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7251401008 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1982#issuecomment-7251401008). Originally posted by [NotADonky43](https://github.com/NotADonky43) on 2026-11-29T05:41:20Z. --- /claim
github-actions[bot] commented 2026-11-29 05:41:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T05:41:28Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7251402236 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1982#issuecomment-7251402236). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T05:41:28Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
kalberts0089-hash commented 2026-11-29 08:01:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kalberts0089-hash on 2026-11-29T08:01:08Z.


I checked this against main at e1f2eb6. The problem is still there. PR #1989 passes its tests on this PC once it is merged with current main.

On main (e1f2eb6)

  • early-pipelines.txt is written in one place only: at the end of save(), after the library rename and the slow-list write (crates/victory-gpu/src/pipeline/library.rs:801-803).
  • save(false) is gated by one timer (library.rs:734-741): 600 s while residency::pressured(), otherwise save_every(size) (20 s up to 256 MB, longer for bigger libraries). The first save of a run is not held back, because LAST starts as None. That save comes the first time the pipeline workers drain (make.rs:856-857, make.rs:888). save_while_busy() skips its first call and then saves at most every 180 s by default (library.rs:655-675). Under pressure, a key first used after the first save can therefore wait up to 600 s, or until exit.
  • I also found a lost-update path by reading the code (I did not reproduce it). USED_CHANGED is cleared at library.rs:762, before anything is written. When pipelines were added, library.added is also reset at library.rs:776, before replace_library at library.rs:785. The writes are one and_then chain at 801-803. If any step fails, the early list is not written: the library rename (only when both renames in replace_library fail, library.rs:997-998), the slow-list write, or the early-list write itself. Every later save then returns at 762 until a new key, slow time or stored pipeline sets the flags again. That includes save(true) from finish() (library.rs:946-948). If nothing new arrives before exit, the keys from that interval are never written.

PR #1989 (fd1732f)

The PR branch is based on 9e61270, which is 24 commits behind main. It merges into e1f2eb6 without conflicts. Results on the merged tree (RTX 4070 Ti, Windows 11):

cargo test --locked -p victory-gpu pipeline::library
test pipeline::library::early_history::tests::checkpoint_retries_without_losing_old_or_concurrently_observed_keys ... ok
...
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 624 filtered out
  • The 9 existing pipeline::library tests still pass, concurrent_write_atomically_never_fails_or_truncates among them.
  • The PR adds no new compiler warnings. All 6 warnings in victory-gpu are in host/send.rs, pool.rs, resource.rs and host.rs.
  • rustfmt --check passes on early_history.rs.
  • The new writer sets dirty again on any error, so it also closes the lost-update path above for the early list.

Points a reviewer may want to look at:

  1. slow-pipelines.txt still follows the old pattern. SLOW_CHANGED is cleared at 762 before the write, so a failed rename or write still drops slow-list updates until the next change.
  2. The early = used.len() field is removed from the host pipeline library saved log line. That count is useful when reading user logs. The title pipelines to start early line at load time (library.rs:1074) is unchanged.
  3. early-pipelines.lock stays in the cache folder for good. The code comment says this is intended.
  4. During a burst of new keys, the writer reads, merges and rewrites the whole list about once a second, up to EARLY_MAX = 100,000 keys (library.rs:492). That is much smaller than a library save, but I have not measured its cost.

None of this needed a game. It is all unit tests and code reading.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252832379 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1982#issuecomment-7252832379). Originally posted by [kalberts0089-hash](https://github.com/kalberts0089-hash) on 2026-11-29T08:01:08Z. --- I checked this against main at e1f2eb6. The problem is still there. PR #1989 passes its tests on this PC once it is merged with current main. **On main (e1f2eb6)** - `early-pipelines.txt` is written in one place only: at the end of `save()`, after the library rename and the slow-list write (`crates/victory-gpu/src/pipeline/library.rs:801-803`). - `save(false)` is gated by one timer (`library.rs:734-741`): 600 s while `residency::pressured()`, otherwise `save_every(size)` (20 s up to 256 MB, longer for bigger libraries). The first save of a run is not held back, because `LAST` starts as `None`. That save comes the first time the pipeline workers drain (`make.rs:856-857`, `make.rs:888`). `save_while_busy()` skips its first call and then saves at most every 180 s by default (`library.rs:655-675`). Under pressure, a key first used after the first save can therefore wait up to 600 s, or until exit. - I also found a lost-update path by reading the code (I did not reproduce it). `USED_CHANGED` is cleared at `library.rs:762`, before anything is written. When pipelines were added, `library.added` is also reset at `library.rs:776`, before `replace_library` at `library.rs:785`. The writes are one `and_then` chain at 801-803. If any step fails, the early list is not written: the library rename (only when both renames in `replace_library` fail, `library.rs:997-998`), the slow-list write, or the early-list write itself. Every later save then returns at 762 until a new key, slow time or stored pipeline sets the flags again. That includes `save(true)` from `finish()` (`library.rs:946-948`). If nothing new arrives before exit, the keys from that interval are never written. **PR #1989 (fd1732f)** The PR branch is based on 9e61270, which is 24 commits behind main. It merges into e1f2eb6 without conflicts. Results on the merged tree (RTX 4070 Ti, Windows 11): ``` cargo test --locked -p victory-gpu pipeline::library test pipeline::library::early_history::tests::checkpoint_retries_without_losing_old_or_concurrently_observed_keys ... ok ... test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 624 filtered out ``` - The 9 existing `pipeline::library` tests still pass, `concurrent_write_atomically_never_fails_or_truncates` among them. - The PR adds no new compiler warnings. All 6 warnings in `victory-gpu` are in `host/send.rs`, `pool.rs`, `resource.rs` and `host.rs`. - `rustfmt --check` passes on `early_history.rs`. - The new writer sets `dirty` again on any error, so it also closes the lost-update path above for the early list. Points a reviewer may want to look at: 1. `slow-pipelines.txt` still follows the old pattern. `SLOW_CHANGED` is cleared at 762 before the write, so a failed rename or write still drops slow-list updates until the next change. 2. The `early = used.len()` field is removed from the `host pipeline library saved` log line. That count is useful when reading user logs. The `title pipelines to start early` line at load time (`library.rs:1074`) is unchanged. 3. `early-pipelines.lock` stays in the cache folder for good. The code comment says this is intended. 4. During a burst of new keys, the writer reads, merges and rewrites the whole list about once a second, up to `EARLY_MAX` = 100,000 keys (`library.rs:492`). That is much smaller than a library save, but I have not measured its cost. None of this needed a game. It is all unit tests and code reading.
trustno1-coder commented 2026-11-30 15:38:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:38:11Z.


Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7283321376 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1982#issuecomment-7283321376). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T15:38:11Z. --- Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Sign in to join this conversation.
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA#1982
No description provided.