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)
crashed.txt now starts with the translator its pipelines crashed under (# translator <source hash>). When the translator has changed, or the list has no such line, the listed pipelines are not refused: each becomes a suspect, made alone, and is listed again (under the new translator) if it ends the run again. Found in Grand Theft Auto VI on Linux: CS_Prop_BatchNoCull and CS_LaserLightShadowRaytracing overflowed the stack while being made under a morning build, and the journal skipped them in every run after, including builds where they are made fine (checked with a cold pipeline library and vkd3d cache). Their dispatches were dropped for hours for nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added What happened: under a build from this morning, The change:
Three new tests cover these cases, and the existing ones now expect the header line. The trade-off: a driver or vkd3d update doesn't change the translator hash, so it doesn't re-arm the list on its own. Deleting the line still does that, as before. |
…slator they crashed under Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
The previous main (old upstream base) is the first parent; the second is upstream main with the current heads of our pull requests merged in: Marvisak#2143, Marvisak#1849 (carried onto main's per-region runtime_pages), Marvisak#259, Marvisak#491, Marvisak#2153, Marvisak#2099, Marvisak#2071 (main covers it), Marvisak#2162, Marvisak#2218, Marvisak#2088, Marvisak#2389, Marvisak#177's element-type key on main's three handle maps, and the README. Marvisak#2112 (opt-in, in place) stays in the renderer branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot take it again A run hung at 0 % CPU with 9 suspects listed: pipeline creation holds the gate until it returns, and a pipeline made inside another's creation (a helper) took it again on the same thread. Held alone by a suspect, that waits on itself; held shared while a suspect waits to hold it alone, the second shared take waits behind the suspect (SRW locks give a waiting writer priority). A thread now takes the gate once; nested creations are still noted, so a crash inside one is still named. Found in Grand Theft Auto VI on Linux: pipeline creation stopped at 1,721 pipelines being made, 0 % CPU, for minutes, with suspects.txt holding 9 pipelines from runs stopped mid-creation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A bug fix found in the title, in Pipeline creation holds the gate until it returns. A pipeline made inside another pipeline's creation (a helper made on the same thread) took the gate a second time. If a suspect held it alone, the thread waited on itself. If the gate was held shared while a suspect waited to hold it alone, the second shared take waited behind the suspect, because SRW locks give a waiting writer priority. In Grand Theft Auto VI on Linux, pipeline creation stopped at 1,721 pipelines being made, at 0 % CPU, for minutes, with 9 suspects listed from runs stopped mid-creation. A thread now takes the gate once. Nested creations are still noted, so a crash inside one is still named. The new test |
… per thread Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A suspect (a pipeline being created when an earlier run ended) is created alone so that a crash in it is pinned on it. But other pipelines then wait as long as it takes: minutes for a large compute shader on a cold driver cache, or for ever if its creation waits on another thread that itself needs the gate. The title waits for the pipelines queued behind it, so the title screen ran at 500 ms per frame. The gate is now a mutex and condition variable instead of an RwLock: a suspect holds it alone (or waits to) for at most 5 s, then the others go ahead. If the run ends after that, the suspect is one of several being created and stays a suspect instead of being refused. Found in Grand Theft Auto VI on Linux: the title screen at 500 ms per frame with 1,714 pipelines being made and none finishing, the journal's only note a suspect (compute-3360) pending since launch at 0 % CPU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…waiting for at most 5 s Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r at most 5 s Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s gate time cap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A second fix from the title, in A suspect is created alone, so a crash in it is pinned on it. But every other pipeline then waited for as long as that took. In Grand Theft Auto VI the title screen ran at 500 ms per frame, with 1,714 pipelines being made and none finishing. The journal's only note was a suspect ( The gate is now a mutex and condition variable instead of an |
…t's window f4f3364 restarted the window at every return while a suspect waited, so a suspect waiting behind a busy queue held every pipeline up again and again: in the title, 7 pipeline threads slept while 2,200 pipelines waited, and the queue drained at about 80 a minute. Only the suspect's own return now starts the next suspect's window. The new test holds six pipelines, lets a suspect wait, and returns them one by one: a new pipeline waited 601 ms before this change, under the 300 ms window plus scheduling after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t restarted Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A follow-up to Now only the suspect's own return starts the next suspect's window. The new test |
…e process (VICTORY_PIPELINE_JOURNAL)
|
Code review and RTX 5090 + WARP verification at head
LGTM. |
GPU diagnostics: a pipeline whose creation faults is refused and the title goes on (opt-in, on Marvisak#491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… new base The renderer README of the old branch (5fff8e0, f44ae53, eb4918e, 9a41398, b673d84, f711b62, 9b32e6f), carried over as one change since main's README moved under each of them: the renderer section with the run command (raw access chains off, VICTORY_PIPELINE_JOURNAL=1, VICTORY_LEVELS_ON_DEMAND=1), and the stack's rows after main's. Adapted: upstream base 67e8ae1; no Marvisak#2366 row (main's 8ff7913 replaces it), no Marvisak#67 row (not in this rebuild); Marvisak#1152 and Marvisak#2389 kept. The journal and soft-crash notes (e543c44) and the breadcrumbs row (1f0d6c3) are not repeated: Marvisak#491's and Marvisak#2292's current heads put them in the variables table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…journal's gate is taken once per thread Without it pipeline creation hangs and the title screen runs at 500 ms a frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous renderer (old upstream base 940d32f) is the first parent and is also kept as the branch renderer-2026-11-25-oldbase; the second parent is the rebuild: fork main (upstream main 63bcca4 + our pull requests) with the renderer stack merged on it: Marvisak#439 (on main: update/439-main's resolution), Marvisak#2309, Marvisak#2167, Marvisak#2118, Marvisak#2311, Marvisak#1722, Marvisak#1751, Marvisak#688, Marvisak#1872, Marvisak#2292, Marvisak#2310, Marvisak#2112 (opt-in), Marvisak#2230 (latch on by default), Marvisak#2389, Marvisak#2088 (small windows opt-in), Marvisak#2099's new head, and tonight's Marvisak#491 journal fixes. Merged upstream since: Marvisak#2143, Marvisak#2162, Marvisak#158, Marvisak#1906, Marvisak#1152; superseded by main: Marvisak#1769, Marvisak#1763, Marvisak#2366. The picture on this base still shows the overlay that plain upstream main shows too; that is being looked into. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e process (VICTORY_PIPELINE_JOURNAL)
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