GPU: under Wine, a host driver compiler crash costs its pipeline, not the run #2401
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!2401
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2401"
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?
@Mumogg on GitHub · 2026-11-25 12:57 UTC · original
Mumogg:gpu/wine-compiler-crash→main· +220 −3 · 5 files · 1 commits · openFrom a tester working with Claude (AI-assisted). Measured on my own machine; the limits of what was measured are in "Tested".
Problem
Under Wine, when the host driver's compiler crashes inside
vkCreateComputePipelines/vkCreateGraphicsPipelines, the process ends with exit code 3 and no handler of ours runs (#144, and the reason #491 needs a second run to name the pipeline). The cause is in winevulkan, not in vkd3d-proton or the driver: the fault happens inside a Unix call, Wine turns it into that call's status, and winevulkan's PE thunk for the function logsand then calls
ExitProcess(3). A vectored exception handler never sees it. (Read from the import table and thunk ofwinevulkan.dllof Wine 11.22 Staging;ExitProcessis one of two functions it imports from kernel32.)Change
On first use of the pipeline workers, if
winevulkan.dllis loaded, its import ofExitProcessis pointed at a function of ours (pipeline/wine.rs):readyandwaitskip it, so it does not cost the per-frame budget), its draws and dispatches are dropped as for a refused one,missingsays "lost to the driver's compiler", and an error line names its shaders.library::abandon), so a second title pipeline with the same host description does not wait for ever.winevulkan.dll).VICTORY_WINE_EXIT=1leaves Wine's exit alone.This does not replace #491: that one remembers the pipeline for the next run; this one keeps the current run alive. Nothing is remembered here across runs.
shortcut:in the module comment: the parked thread keeps whatever the driver and vkd3d-proton held when the compiler crashed, so a later compile that needs the same lock would wait for it. I did not see that in the runs below, but it is possible.Tested
RTX 5070 Ti (driver 615.78.08), Linux, Wine 11.22 Staging, vkd3d-proton and DXVK
dxgifrom GE-Proton11-14,VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains, Microsoft'sd3dcompiler_47.dll(see #1279), Series X 1.0.2.1, clean cache folders.cargo clippy --workspace --all-targets -- -D warnings(targetx86_64-pc-windows-msvc) is clean; thepipeline::tests pass under Wine (16, one new: the import-table rewrite on a synthetic image);cargo xtask policypasses.In the title, on this branch as it is (
main940d32f+ this commit), one run:mainends at the first compiler crash here (about 80 s after start).+0x23cf683), which ended the run. I do not know whether that fault follows from the lost pipelines.With #259 merged on top (the level query that crashes NVIDIA's compiler), one run: 12 pipelines lost, all within one minute (mostly mesh and vertex+pixel pipelines, two compute), then the same title fault at 146 s.
The same mechanism, as a local patch on two forks that carry #259 and much else (so not this branch): three runs of 13 to 15 minutes in the world, 0, 3 and 8 pipelines lost, none ended by a crash; all three were stopped by my own time limit.
So what I can claim: the process no longer ends at the first compiler crash, and the lost pipeline is named in the same run. What I cannot claim: that a run on
mainis healthy afterwards. Losses come in bursts (many within a second), which I read as the driver's compiler being unwell for a while after a first crash, not as that many bad shaders; that is my inference, not something I measured.Not tested: AMD/RADV or Intel under Wine, Proton's own Wine builds (the thunk may differ; the log line
winevulkan does not import ExitProcesswould show it), Windows beyond the unit test and the absence ofwinevulkan.dll.🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-25 15:30 UTC · original · edited 2026-11-25 22:22 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/pipeline.rs,pipeline/library.rsandpipeline/make.rs). It will be reviewed again once it is rebased.From the earlier needs-work note: it needs the maintainer's decision (it patches
winevulkan.dll's import table to park crashed pipeline workers); if wanted, readVICTORY_WINE_EXITthroughcrate::switch::on.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.