DirectStorage: report queue read failures #624
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!624
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/624/head"
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?
@broccolize on GitHub · 2026-11-24 05:48 UTC · original
broccolize:hle/dstorage-queue-error-reporting→main· +435 −47 · 2 files · 3 commits · closed without mergingImplement
GetErrorEventandRetrieveErrorRecordfor DirectStorage queues. Each queue signals its own error event and gives callers a handle they can close independently. Retrieval returns the first failed read in enqueue order and the failure count since the previous retrieval, then clears the record and resets the event.Synthetic Windows tests cover two failed reads, a successful read, out-of-order worker completion, and a status entry submitted after error retrieval. All 15 DirectStorage tests passed with and without diagnostics.
The Windows GNU workspace run passed 265 tests with four ignored. It excluded
loads_binds_and_calls_probebecause of a toolchain failure reproducible onmain. Asset-policy checks passed.Related to #577, which touches file lifetime in the same worker path. AI-assisted with Codex.
@geiyiliyabumo on GitHub · 2026-11-24 12:19 UTC · original
Independent verification & code review on Windows 11 x64 MSVC (merged onto
mainffe310e):Checks Run
cargo xtask policy: PASS (155 files ok)cargo clippy -p victory-hle --all-targets --locked -- -D warnings(default +--features diagnostics): PASS (0 warnings)cargo test -p victory-hle --locked -- dstorage: PASS (15/15tests, includingqueue_reports_and_retrieves_read_errorsanderror_event_reports_failures_in_enqueue_order_without_status_entries)Review Findings
The ABI layout assertions for
ErrorRecord(0x290) andReadFailure, enqueue-orderedpublish_beforedeferral, caller-owned duplicated event handles, andout.is_null()guards look very clean.One safety edge case to tighten before merge:
ReadFailure::newdereferencesrequest.sourceasInstance<File>on unsupported-option failures (crates/victory-hle/src/modules/dstorage/errors.rs:92-102):execute()rejects unsupported option bits withE_NOTIMPLbefore touchingrequest.source(dstorage.rs:843) — including bit 23 (physical-pages source, documented atdstorage.rs:691), whererequest.sourcepoints to a page-number array rather than anInstance<File>COM object.work()immediately callsReadFailure::new(&job.request, hr)on thatErr(E_NOTIMPL), andReadFailure::newchecks onlyrequest.options & MEMORY_SOURCE != 0, a bit-23 request enters theelsebranch and castsrequest.sourceto&Instance<File>to copyfile.state.filename(Box<[u16]>), which is UB / an access violation on a non-Filepointer.request.sourceasInstance<File>when no unsupported option bits are set (or at minimum when bit 23 is clear) in addition torequest.options & MEMORY_SOURCE == 0.QueueErrors::newcreates an auto-reset event (bManualReset = 0), whiletake()also callsResetEvent. If a title pollsWaitForSingleObject(event, 0)more than once before callingRetrieveErrorRecord(or duplicates the handle across watchers), auto-reset consumes the signal on the first wait; a manual-reset event (bManualReset = 1) stays signaled untilRetrieveErrorRecordresets it (if matching the Win32 DirectStorage contract is preferred).AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 00:26 UTC · original
Automated triage for the maintainers. Closing because it breaks a repository rule (see
docs/asset-policy.mdand the project rules): nothing taken from the console SDK or the game, no weakening of the asset policy, and the title stays offline.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
@broccolize on GitHub · 2026-11-25 03:43 UTC · original
Thanks for reviewing. The diff is limited to two Rust source files for DirectStorage error reporting and synthetic tests. I checked the ABI locally against Microsoft's public documentation and public Xbox compatibility sample. The verification probe was kept local.
Could you point me to the file or line that triggered the policy closure so I can address it?
Pull request closed