Repository navigation
GPU: a stuck pipeline is not waited for, and pipeline workers get a 64 MB stack - #37
LloydNicholson wants to merge 1 commit into
Conversation
A pipeline in the making for longer than VICTORY_PIPELINE_STUCK_S (15 s) is not waited for and its worker is replaced. Three compute programs overflowed their workers' stacks under Proton and every frame then waited its whole 12 s on them. Ported from victory-fork 36a8541; the stack from a240d4b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Peppacodes <360593343+Peppacodes@users.noreply.github.com>
… & stuck-PSO quarantine - Align defer_free_slab() and non-host-import page-bitmap retirement with defer_destroy() at submitted_retire_ticket() + 1 and reclaim slabs in before_execute to eliminate image-memory UAF. - Protect GpuPageBitmap reserved arena prefix [0, kArenaReserved) (pages 0x00..0x18), add verify_control_magic() clobber detection/restoration in before_execute and device-fault reporting, and print non-shader-VA guidance when fault addresses fall outside the arena and tracked buffers. - Port DexNom/VIctory#37 (GPL-3.0): 64 MiB compile worker stack reserve, StuckPipelineTracker + LEONIDA_PIPELINE_STUCK_S (default 15 s, 0 disables) quarantine with bounded replacement worker spawning and seamless late-completion adoption across graphics/compute PSO paths, and cold-frame graphics compile wait headroom.
|
I reproduced a remaining synchronous timeout gap on Windows at
This is a controlled concurrency test, not a real driver hang or gameplay result. Verification was AI-assisted with GPT-6.2 Astra. |
A pipeline whose compile never comes back is no longer waited for.
Under Proton, three of the title's compute programs overflowed their worker's stack inside vkd3d-proton's DXIL to SPIR-V conversion. The worker was gone, the pipeline stayed "being made", and every frame then spent its whole 12 s budget on it.
VICTORY_PIPELINE_STUCK_S(15 s by default) is logged once, not waited for, and one worker is started in place of its own. A compile that is only slow is still used once it is made.Related: #28 lowers the wait to 500 ms per frame under Wine for the same symptom. This does it per pipeline, on every system, and leaves the budget for other pipelines alone. The companion PR on loop back edges removes the cause for the three programs seen here.
Worth a look in review: this changes Windows too. A compile slower than 15 s is not waited for there any more either, and each such compile starts one extra worker.
Tested on Linux: Radeon RX 9060 XT (RADV), CachyOS Proton.
a_stuck_pipeline_is_not_waited_for_and_its_worker_is_replaced.victory-gpuunit tests under Proton:main187 passed, 1 failed; with this change 188 passed and the same 1 failed (a_rejected_blob_gives_an_empty_library, an older Proton problem with a PR of its own).Not tested: Windows (no run and no build there; it was cross-built for x86_64-pc-windows-msvc from Linux), NVIDIA.
cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo xtask policyare clean. No game data. AI-assisted.🤖 Generated with Claude Code