Repository navigation
Conversation
…ry (vkd3d-proton refuses the empty blob, so this tree never wrote it under Wine) Ported from linux-bringup 78ab75ba (Ortomanic). The lab's runs read a list another tree had written (2,879 keys, last written 20:05:57Z by linux-bringup shadowlight3); a fresh install of this tree starts nothing early and makes every world pipeline at its first draw. The list is also saved from the host's sweep (save_soon, on a thread of its own, at most every 20 s) when draws asked for pipelines no worker made since: workers save only after making one, so keys first drawn with after the last of them were lost to a run ended by SIGTERM or a closed window.
ErRusso
left a comment
There was a problem hiding this comment.
Reviewed at dfbc779 against 2119b0e.
save() now writes early-pipelines.txt when no host library exists, which is the Wine/vkd3d-proton case; the library path is unchanged. save_soon() adds the missing periodic save after draws note new keys, with a 20 s throttle and a single background save.
Verified: the_early_list_is_saved_with_or_without_a_library passes under Wine. The new test exercises the no-library path and the author's title run shows the intended effect (0 pending at world entry vs 1,500–2,200 before).
LGTM.
|
I reproduced a retry gap on this exact head ( The no-library path clears |
|
On Bazzite 44 with the RTX 5060 Laptop GPU (8 GiB), I can confirm the missing-library case and a separate write-retry issue on this PR. With this change alone, the focused early-list test passed under Proton. The rejected-blob → empty-library check failed, and a second request for the same synthetic mesh pipeline compiled it again. Applying Marvisak/VIctory#347’s null empty-blob argument made all three tests pass, including the application library’s per-pipeline load counter. I also compared two no-input Series S menu launches per build, with matching cache/prefix seeds and each build retaining its own cache between starts. The control used our local display and physical-page test tree. It could not create the library, wrote no early list and started with zero keys on both launches. Adding this PR and the null-blob call saved four keys and an 824-byte library on the first launch. The second read four keys and reopened the library. All four reached the account picker. A subsequent loading run from that menu cache recorded I reproduced a retry failure on public head NVIDIA 615.78.08, Proton Experimental 11.0-20261112, vkd3d-proton 3.2.0 |
ErRusso
left a comment
There was a problem hiding this comment.
Changing my approval after @avt0m4t48's and @Filip722's retry reports, which I confirmed in the code at dfbc779.
In pipeline::library::save() the no-library branch does:
} else if USED_CHANGED.swap(false, Ordering::Relaxed) {
0
} else {
return;
};
...
let written = library_written
.and_then(|()| write_atomically(&dir.join(EARLY_FILE), used.join("\n").as_bytes()));USED_CHANGED is cleared before write_atomically. If that write fails (a directory at early-pipelines.txt, a full disk, a transient lock), the dirty bit is already gone, so a later save(true) returns without writing the list until another pipeline key arrives. That is the retry gap both reports reproduced; the same applies to the library branch, whose serialise failure path also returns after the swap.
Please clear the flag only after a successful write, or restore it when written is Err (and when serialise fails), and add the regression test with an obstructed early-list path that @Filip722 linked (6ca01748). The rest of the PR is unchanged and the early-list behavior itself is still correct.
Consume the dirty flag with the key snapshot and restore it when writing the snapshot fails. A forced save can then persist the same keys after a temporary filesystem obstruction clears. Exercise the actual cache filename and retry without recording another key. Ported from the VIctory handoff and the retry test on Marvisak/VIctory#1429 with assistance from OpenAI Codex (GPT-6.2-astra). (cherry picked from commit 6ca01748abf0daddf4c6ea804f932d9f85e8159d)
|
Thanks @avt0m4t48, @Filip722 and @ErRusso. The retry gap is fixed on this branch.
Not done here: the null empty-blob argument from Marvisak/VIctory#347 that @Filip722 tested alongside. That makes the library itself work under vkd3d-proton, which is a larger change than this PR's "save the list when there is no library"; I would rather it went in on its own. The head was not rebased. AI-assisted (Claude Code); built and tested locally on CachyOS, Wine 11.22, RTX 5080. |
ErRusso
left a comment
There was a problem hiding this comment.
Tested the current head (9baa3ac) merged onto 0b0074e on the Wine-only path: no host pipeline library, so this PR's new branch is the one exercised.
Unit tests (counter Arch/Wine 11.22, RTX 4060, MSVC build, VICTORY_DXC set):
pipeline::tests: 13 passed, 0 failed, includingthe_early_list_is_saved_with_or_without_a_library; three parallel runs identical.- Full
victory-gpu --lib: 183 passed, 4 failed. The four are the base's environmental failures under Wine:profile::tests::deep_stacks_are_cut_not_lost,the_sampler_finds_threads_and_writes_its_files,time_goes_to_the_function_that_spent_it, anddrvwatch::tests::the_system_takes_the_subscription(no event-log subscription). No new failures from this PR.
Runtime (Proton Experimental experimental-11.0-20261112, vkd3d-proton, fresh cache, VICTORY_CACHE_DIR, no scripted input):
- First launch:
early-pipelines.txtwritten, 35,078 bytes. Save line:bytes=0 early=1063 made=382 loaded=0 started_early=0. Before this PR the no-library path wrote nothing. - Second launch on that cache:
title pipelines to start early pipelines=1063; 835 pipelines were being made 5 s in and 750 at 10 s, with 0 draws dropped waiting for a pipeline. 246 were still being made at 150 s. - Third launch (300 s): saves show
bytes=0 early=1191...1292 made=... loaded=0 started_early=1067— 1,067 pipelines started at creation from the list.loaded=0confirms the host library path is still absent here, as expected.
Retry fix: the directory-obstruction regression passes; the dirty flag is restored on write failure and the retry writes the original key without a new note_used().
Out of scope and confirmed unchanged: Marvisak/VIctory#347's null empty-blob argument; library creation still fails under this vkd3d-proton. Approved for the list-saving fix.
…stalls Host::execute waited for each submission with no end. A host that loses its device need not signal the fences of the work it dropped: vkd3d-proton after a GPU fault does not, and by default does not report the device removed either. The title's submit thread then stays in our wait, its render thread blocks on its full submission ring, and 30 s later the title's own watchdog ends the run at image+0x23cf683 (fxceless#1118), with nothing of ours in crashes.log to say that the GPU faulted. The wait now goes in 250 ms slices: * between slices the device is asked whether it was removed; if so the wait ends and the existing check after the submission reports it; * a submission still running is said so at 10 s and 20 s; * at 25 s it is given up with a report of its own ("has not finished a submission ... and reports no removal"). The limit is below the title's 30 s so the run ends with the cause, not with the title's null write. vkd3d-proton's own source calls a wait of over 5 s a lost device; Windows resets a device after about 2 s. A fence that comes is taken as before; a device that is removed and signals (Windows) is reported by the check after the wait, as before. Tested on Linux only (RTX 5080, driver 620.70, GE-Proton11-6's Wine, vkd3d-proton 30b0eb9), on main + fxceless#177 + fxceless#259, where the world faults the GPU in every run (Xid 13, fixed by fxceless#542): * without this, with or without VKD3D_CONFIG=fault: the title's crash at +0x23cf683 24 to 30 s after the Xid, in 9 of 9 runs, and no report; * with this and VKD3D_CONFIG=fault: "device removed: 0x887A0005" 4 s after the Xid; * with this and vkd3d-proton's defaults: the two warnings, then the stall report 25 s after the submission began. New unit test of the wait (no GPU); cargo test --workspace under Proton: 333 passed, the same ten environmental failures as main; clippy -D warnings with and without --all-features; cargo xtask policy. Not run on Windows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit b58b779fdedc4e8724bcab295276c455e587c8f9)
…stalls Host::execute waited for each submission with no end. A host that loses its device need not signal the fences of the work it dropped: vkd3d-proton after a GPU fault does not, and by default does not report the device removed either. The title's submit thread then stays in our wait, its render thread blocks on its full submission ring, and 30 s later the title's own watchdog ends the run at image+0x23cf683 (fxceless#1118), with nothing of ours in crashes.log to say that the GPU faulted. The wait now goes in 250 ms slices: * between slices the device is asked whether it was removed; if so the wait ends and the existing check after the submission reports it; * a submission still running is said so at 10 s and 20 s; * at 25 s it is given up with a report of its own ("has not finished a submission ... and reports no removal"). The limit is below the title's 30 s so the run ends with the cause, not with the title's null write. vkd3d-proton's own source calls a wait of over 5 s a lost device; Windows resets a device after about 2 s. A fence that comes is taken as before; a device that is removed and signals (Windows) is reported by the check after the wait, as before. Tested on Linux only (RTX 5080, driver 620.70, GE-Proton11-6's Wine, vkd3d-proton 30b0eb9), on main + fxceless#177 + fxceless#259, where the world faults the GPU in every run (Xid 13, fixed by fxceless#542): * without this, with or without VKD3D_CONFIG=fault: the title's crash at +0x23cf683 24 to 30 s after the Xid, in 9 of 9 runs, and no report; * with this and VKD3D_CONFIG=fault: "device removed: 0x887A0005" 4 s after the Xid; * with this and vkd3d-proton's defaults: the two warnings, then the stall report 25 s after the submission began. New unit test of the wait (no GPU); cargo test --workspace under Proton: 333 passed, the same ten environmental failures as main; clippy -D warnings with and without --all-features; cargo xtask policy. Not run on Windows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit b58b779fdedc4e8724bcab295276c455e587c8f9) (cherry picked from commit 5ba89b7)
Changes
pipeline::library::save()returned before writingearly-pipelines.txtwhen there was no host pipeline library. vkd3d-proton refuses the empty blob the library is created from (no host pipeline library: pipelines are not kept), so under Wine/Proton the list of pipelines a run drew with was never written. The next launch then started nothing during loading and found every pipeline at its first draw, in the world.The early list is now saved whether or not a library exists. Nothing changes where a library is made.
This is separate from #147 (cache key, worker placement), #164 (save races) and #172 (skipped pipelines): none of them writes the list when the library is missing.
Validation
the_early_list_is_saved_with_or_without_a_librarypasses and fails with the old early return (run under Wine with the otherpipeline::tests, 12 passed).cargo clippy --workspace --all-targets --locked -- -D warningsfor the Windows target, with and without--all-features, andcargo test -p victory-shader -p xtaskpass on this branch (cross-compiled from Linux with the pinned toolchain).AI-assisted patch with local build and runtime validation.