Skip to content

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

Not planned

Description

@NotADonky43

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.

Activity

  1. NotADonky43 commented on Nov 29, 2026

    @NotADonky43
    ContributorAuthor

    /claim

  2. added
    needs-logs
    on Nov 29, 2026
  3. github-actions commented on Nov 29, 2026

    @github-actions

    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)

  4. added
    startup
    on Nov 29, 2026
  5. changed the title [-][startup] Checkpoint observed early pipeline keys independently of driver-library saves[/-] [+]Checkpoint observed early pipeline keys independently of driver-library saves[/+] on Nov 29, 2026
  6. kalberts0089-hash commented on Nov 29, 2026

    @kalberts0089-hash

    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.

  7. trustno1-coder commented on Nov 30, 2026

    @trustno1-coder
    Owner

    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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-logsstartup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions