GPU diagnostics: a pipeline whose creation faults is refused and the title goes on (opt-in, on #491) #2292
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2292
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2292"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@desplmfao on GitHub · 2026-11-25 10:03 UTC · original
desplmfao:diag/pipeline-soft-crash→main· +1348 −18 · 7 files · 20 commits · openStacked on #491 (the pipeline journal). Its commits come first here; the change is the last commit,
a690518.Problem
Under Wine/vkd3d-proton, creating a host pipeline runs dxil-spirv and then the driver's compiler inside the title's process. On some translated shaders, one of them faults. Examples here: dxil-spirv recursing about 100k frames on #439's loop shapes, and NVIDIA's compiler crashing on others. A single bad pipeline ends the run. #491 then refuses it from the next run on, but that is one restart per bad pipeline.
Change
Opt-in, with
VICTORY_PIPELINE_SOFT_CRASH=1:pipeline/soft_crash.rs). That covers bothLoad*PipelineandCreate*PipelineState.0xC0000374) and stack-buffer overrun (0xC0000409) are left alone.crashed.txtimmediately, in the existing format plus(fault 0x…), so later runs refuse it too.SetThreadStackGuarantee(64 KiB)so the handler has stack left after an overflow. Pipeline workers get a 256 MiB stack, which is reserved, not committed.Risks
This is why it is opt-in:
virtual_setup_exception stack overflow). The guard can't catch that one; the bigger stack makes it less likely.Related
make.rs(256 and 64 MiB). Expect a one-line conflict; I can drop the stack part here if #1885 lands.VICTORY_SKIP_PIPELINES) have the same goal by different means.Tested
RTX 5080, Linux, Proton with vkd3d-proton 3.2.0:
cargo test -p victory-gpu --lib soft_crash: 6 passed. They cover an access violation (0xC0000005), an illegal instruction (0xC000001D), a deep-recursion stack overflow on a 1 MiB thread (0xC00000FD), values and panics passing through, threads that aren't armed staying unguarded, and the fault-kind filter.cargo test -p victory-gpu --lib journal: 8 passed, includinga_pipeline_whose_creation_faulted_is_refused_now_and_in_later_runs.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--features diagnostics: clean.In the title. The build was our stack with #439 but without #2309. There, vkd3d-proton's dxil-spirv recurses until the stack runs out on two of #439's programs, and before this change that ended the process. Run under Proton, with vkd3d-proton 3.2.0,
VICTORY_PIPELINE_SOFT_CRASH=1andVICTORY_PIPELINE_JOURNAL=1:Both are stack overflows (
0xc00000fd) inside vkd3d-proton under Wine, caught 10 s into the run. 383 more pipelines were created after the second one, so no host lock was lost. The title kept running until I stopped it 90 s later.crashed.txtlists both, each with a# compute-… (fault 0xc00000fd)comment.AI-assisted (Claude Code).
🤖 Generated with Claude Code
3d6521b): crashed pipelines carry the translator they crashed under ba6356c4e70115126): README row 87316882839bcd755): the journal's gate is taken once per thread 26a7f4d094f4f3364): a suspect keeps other pipelines waiting for at most 5 s 8e760f8fc416200ab): a waiting suspect's window is not restarted cc0cb0fd1e@desplmfao on GitHub · 2026-11-25 11:21 UTC · original
Out of draft: it has now caught real faults in the title. Our stack with #439 but without #2309 has two programs on which vkd3d-proton's dxil-spirv recurses until the stack runs out (
32ed072b9f845048,fdd56d97a806bcca); before, the process ended there. WithVICTORY_PIPELINE_SOFT_CRASH=1, both were caught as0xc00000fd10 s into the run, refused, and listed incrashed.txt. 383 more pipelines were created after them, so no lock was lost, and the title kept running until I stopped it. Log lines are in the description.@Marvisak on GitHub · 2026-11-25 13:32 UTC · original · edited 2026-11-26 01:25 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision (re-checked on
f33dd8b). The merge ofmainresolves the earlier conflicts, so this merges cleanly again. The PR's own part is unchanged:pipeline/soft_crash.rs: an opt-in (VICTORY_PIPELINE_SOFT_CRASH=1) vectored exception handler plus aglobal_asm!frame with SEH unwind data, which resumes a pipeline worker after a fault in the host compiler;make.rs: thespawn_workerreplacement thread with a 256 MiB reserved stack;The faulted pipeline is refused and the worker is replaced. Handler and frame are scoped to armed workers inside the guarded call, fault-kind codes only, at most 8 faults per run. Whether VIctory should carry this unsafe surface (locks held at the fault stay held, abandoned frames leak) is the maintainer's call, as noted before.
The PR is still stacked on #491 (open), so
journal.rsand its README row belong to that review. Once #491 lands, this PR should shrink tosoft_crash.rs, themake.rsworker changes and one README row.CI: passing (
check).Generated by Claude Code
@desplmfao on GitHub · 2026-11-25 13:39 UTC · original
Merged #491's new head (
3d6521b) inba6356c.crashed.txtnow names the translator its pipelines crashed under, so a pipeline listed here after a fault is tried again, alone, once the translator changes. The only conflict wasjournal.rs: I kept both module notes, and the soft-crash test now passes the translator toJournal::openand expects the header line.I checked the merged code in Grand Theft Auto VI on Linux (RTX 5080) with two runs:
CS_Prop_BatchNoCullandCS_LaserLightShadowRaytracinglisted under an old translator: both were tried again alone and made, and the list was reset to the current translator.pipeline::journalpasses under Wine.pipeline::library::tests::a_rejected_blob_gives_an_empty_libraryfails under vkd3d-proton on this head and one543c44alike, so that one isn't from this merge.@desplmfao on GitHub · 2026-11-25 14:42 UTC · original
Thanks for the triage.
17a48d9. The two paragraphs are now one row in the variables table.main, its diff shows #491'sjournal.rstoo. Once #491 is in, this PR comes down tosoft_crash.rs, the worker spawn inmake.rs, and the README row.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.