Repository navigation
Conversation
Some host drivers crash while compiling a translated shader. Under Wine the fault inside vkCreate*Pipelines ends the process with exit code 3 before any handler runs, so nothing names the shader and the same crash comes back on every run. With VICTORY_PIPELINE_JOURNAL=1, each host pipeline is noted in pipeline-journal/pending/ while it is created, and the note is removed when creation returns. A note left at the next start names the pipeline that was being created when the process ended: it goes into pipeline-journal/crashed.txt and is refused from then on, its draws and dispatches dropped like those of any refused pipeline. Pipelines are created one at a time while the journal is on, so a crash names only the pipeline that caused it. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 CI's commands, on the merge: both clippy runs ( Two ways a pipeline gets refused without having crashed anything. A throwaway test (not pushed) runs the test binary again as a child process against a temporary journal folder:
Possible ways to narrow it, none of them tested here:
Since the journal is opt-in and Smaller note: the key string ( Not tested: a real driver crash during creation (none reproduces on this GPU), Wine/vkd3d-proton; no game data used. AI-assisted (Claude Code) ran the checks and drafted this comment. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 24c419b on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 45 passed, including the journal tests. Clippy's 1 warning is the existing one in host.rs. I couldn't reproduce a driver crash here, so the "next run refuses it" path is covered by the unit tests only.
- Off by default: with
VICTORY_PIPELINE_JOURNALunset,journal()isNone,enteris a no-op and creation stays parallel. With it on, theonemutex serialises creation so a leftover note names only one pipeline. That's the right trade for a diagnostic. - Notes and
crashed.txtlive next to the pipeline cache, which already passesensure_outside_repo, and they hold only shader hashes. No title bytes are written. - Small things:
- A pending note is only turned into a
crashed.txtline at the next start. If the user deletes the cache folder between runs, the knowledge is lost, which is acceptable but worth one README sentence. - The
?onjournal::entermakes a refused pipeline fail like any other refusal, so the existing drop logging covers it.
- A pending note is only turned into a
AI-assisted (Claude Code).
…n crashed the process (VICTORY_PIPELINE_JOURNAL) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A crash with one pipeline in creation names it (crashed.txt) as before. A crash with several in creation makes them suspects (suspects.txt): they are not refused, but each is created alone until its creation returns, so a repeat crash leaves one note and names it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-tested
AI-assisted (Claude Code); synthetic tests only, no game data. |
|
Confirmed on Linux/RADV, and on this title it is the difference between a hard wall and reaching the intro. Build Three runs of the retail title, cold shader cache:
So the mechanics work exactly as described: the note names the pipeline that ended the process, it is refused on the next start, and each run buys one more shader. After two refusals the run no longer dies in Two small suggestions, if you want them:
I can rerun with any build you want, or hand over the two hashes with their stage and container size if you'd like to look at the shaders themselves. |
…e process (VICTORY_PIPELINE_JOURNAL)
…e process (VICTORY_PIPELINE_JOURNAL)
|
Automated triage for the maintainers. Merge candidate. This adds an opt-in diagnostic (
Two minor points, neither blocking: a reused process id can keep a stale note until that unrelated process exits, and the README paragraph could be shorter. On your reply: skipping notes of a running process covers the second-instance case, as CI: passing ( Generated by Claude Code |
# Conflicts: # README.md # crates/victory-gpu/src/pipeline/host.rs
…refused pipelines drop draws Suggested by YaBulochka in Marvisak#491: - A note in pending/ is named <key>@<stages and sizes>@<pid>-<n>, for example 4e296b1885c37b29@compute-2232@32-23, so pending/ can be read without the log. The same goes as a comment above the pipeline's line in crashed.txt. - At start-up, the refused pipelines are listed with a warning that every draw and dispatch using one is dropped. How many is only known once the title asks for them; each is still logged once when first skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@YaBulochka thanks for the RADV runs. Both suggestions are in
The branch is also merged with current @fromthemoonx thanks for the child-process tests. |
fromthemoonx found in Marvisak#491 that a second instance opening the journal refused the pipeline the first one was creating. Notes name their process id; one whose process is still running is now skipped and kept. The README says how to undo the refusal a quit during creation causes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e process (VICTORY_PIPELINE_JOURNAL)
…standin-111a HLE: title-window stand-in that always pumps messages (Marvisak#491)
Problem
Some host drivers crash while compiling a translated shader. Under Wine (vkd3d-proton) the fault inside
vkCreate*Pipelinesends the process with exit code 3 before any handler runs (err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call), socrashes.logstays empty, nothing names the shader, and the same crash comes back at the same point on every run (#144, #49).Change
With
VICTORY_PIPELINE_JOURNAL=1, each host pipeline is noted inpipeline-journal/pending/(next to the pipeline cache) while it is created, and the note is removed when creation returns. A note left at the next start names the pipeline that was being created when the process ended: it is added topipeline-journal/crashed.txtand refused from then on, its draws and dispatches dropped like those of any refused pipeline, and the log names it. Pipelines are still created in parallel. A crash that leaves one note names that pipeline. A crash that leaves several makes them suspects (pipeline-journal/suspects.txt): they are not refused, but each is created alone (the other workers wait) until its creation returns, so a repeat crash leaves one note and names it. Deleting a line fromcrashed.txtlets that pipeline be tried again. Off by default; nothing changes without it.New
pipeline/journal.rs; a hook at the start of host pipeline creation inpipeline/host.rs; the folder set next to the pipeline cache inpipeline.rs; a paragraph in the README.Tested
RTX 5080, Linux (proton-cachyos, vkd3d-proton 3.2.0), Series X 1.0.2.1, this branch alone (
maind2a4bae+ this commit, without #259), its own cache folder:vkCreateComputePipelines Exception 0xc0000005while loading; one note left,pending/ef05293f6107fc99@32-67.the last run ended while creating these host pipelines; they are refused from now on pipelines=["ef05293f6107fc99"], andcrashed.txtlists it. The title got past it to the next crash, again with one note:9938c251a313fe28.Both are compute programs whose pipeline creation crashes the NVIDIA driver, fixed in #259. Before pipelines were created one at a time, a crash left several notes and the others had to be removed by hand.
Update: the first version created all pipelines one at a time while the journal was on. With the wave64 programs of #233/#439, which take seconds each to compile, the pipeline backlog at the loading screen shrank by about 0.1 per second instead of about 5, with seven of the eight pipeline workers idle.
afedb15creates them in parallel again and only isolates suspects.Four tests in
journal.rs(no GPU): a note left by a crash refuses that pipeline on the next start and lists it; a pipeline whose line was removed is tried again; notes left by pipelines created together become suspects, a suspect is created alone and leaves the list when it succeeds, and a suspect that crashes alone is refused; ordinary pipelines are created together. They pass under Wine;cargo clippyandrustfmtreport nothing new.Related
VICTORY_SHADER_DUMPwrites the container and DXIL of a shader by the same hash, for looking at what the journal names.crashed.txtwould belong in one for a driver crash under Wine.AI-assisted (Claude Code).
🤖 Generated with Claude Code