fix(gpu): missing WakeByAddressAll in fence::written and 10s MADE stall on non-sharing I/O errors in pipeline::samplers::open_alone #318
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from Androtim/MiniVI. Originally posted by RUIZ-Enrique-25002136 on 2026-12-02T09:14:13Z.
Summary
Two synchronization/stall bugs exist in
crates/victory-gpu:fence::writtenupdates a fence's value and signals registered Win32 events, but omitsWakeByAddressAll(unlikefence::set), strandingWaitOnAddresswaiters on bottom-of-pipe fence writes.pipeline::samplers::open_aloneretries for 10 full seconds while holding the globalMADEmutex on anystd::fs::OpenOptions::openerror, rather than only retrying onERROR_SHARING_VIOLATION(32).Evidence (
file:line& Code Proof)1. Missing
WakeByAddressAllinfence::writtencrates/victory-gpu/src/fence.rs:198-203(fence::set):crates/victory-gpu/src/fence.rs:209-229(fence::written):fence::block_until(fence.rs:158-163) waits on&fence.valueviaWaitOnAddress(..., 10), and guest code can also wait directly viaWaitOnAddress(..., INFINITE).2. Unfiltered 10s Retry Under
MADEMutex inpipeline::samplers::open_alonecrates/victory-gpu/src/pipeline/samplers.rs:151-170(open_alone): Compare withcrates/victory-gpu/src/pipeline/library.rs:103, which gates retries specifically one.raw_os_error() == Some(32)(ERROR_SHARING_VIOLATION). Heresync()callsopen_alonewhile holding the globalMADEmutex (samplers.rs:176).Impact
fence::written: unnecessary 10 ms slices infence::block_untiland potential indefinite hangs for guestWaitOnAddress(..., INFINITE)waits on bottom-of-pipe fence writes.open_alone: permanent I/O errors (ERROR_ACCESS_DENIED,ERROR_PATH_NOT_FOUND, read-only directory) stallprime()and every unseen static-samplerknow()call for 10 seconds while blocking all shader/pipeline worker threads onMADE.AI-Ready Fix Specification
crates/victory-gpu/src/fence.rs(fence::written), capturelet addr = (&raw const fence.value).cast();, dropwaitersandlive, and callwindows_sys::Win32::System::Threading::WakeByAddressAll(addr);under#[cfg(windows)](matchingfence::set).crates/victory-gpu/src/pipeline/samplers.rs(open_alone), gate the retry arm one.raw_os_error() == Some(32) && began.elapsed() < Duration::from_secs(10)so permanent errors fail fast.cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test -p victory-gpu --locked -- --test-threads=1on Windows CI.Imported from Androtim/MiniVI. Originally posted by github-actions[bot] on 2026-12-02T09:14:23Z.
Please attach both logs from the run that went wrong so we can investigate without guessing. Paste
%LOCALAPPDATA%into the File Explorer address bar to find them:%LOCALAPPDATA%\victory\logs\: the newest.logfrom that run (the console prints its path at startup on theLog: ...line).%LOCALAPPDATA%\victory\data\<TitleId>\crashes.log, and if present, the newest.crash.login%LOCALAPPDATA%\victory\data\<TitleId>\temp\.Please also include:
play-minivi.ps1preset, DLSS/FG/RT, customVICTORY_*vars) and commit SHA(Clean-room policy: please only attach text logs/screenshots — do not upload copyrighted game files or executables.)