DirectStorage: flush the optional trace on request failure #254
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!254
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-254"
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?
@loyodea on GitHub · 2026-11-26 13:14 UTC · original
loyodea:victory-rx9070xt-late-crash→a-publier· +113 −11 · 1 files · 2 commits · openRelated to #239. When DirectStorage tracing is enabled, flush each failed request row after writing it. Also flush the status row that carries the first failure before publishing the status. This keeps the failure context available as soon as completion becomes visible. Successful status rows and polls continue using periodic buffering.
The Windows HLE library suite passed 164 tests with two ignored. The synthetic tests cover the failed request row, the status row, and the ordering of the flush before publication. A file-backed run retained the failed status row after the process exited.
The title-side null read in the report still needs diagnosis. Codex contributed the implementation and verification.
@adrianmjim on GitHub · 2026-11-26 22:43 UTC · original
Checked by reading the code on rx9070xt
cd8dfc0(head22f1b72); I did not build or run it.0a43566, so the PR also carries81ebb7band the files tab shows its 4 victory-gpu files. GitHub reports the PR as not mergeable. A plain merge withcd8dfc0conflicts inambient.rs,host.rsandpipeline/make.rs. The real change is 81ebb7b..22f1b72, one file, andgit merge-treeof that range ontocd8dfc0is clean.stream_log::requestis the same oncd8dfc0(dstorage.rs:750-771). Sogit rebase --onto rx9070xt 81ebb7bshould leave only the dstorage.rs change.4eb6cfd. dstorage.rs and kernel.rs are unchanged there, and the same range also merges cleanly onto4eb6cfd. #343 reworked the stack walk in crash.rs but adds nostream_logflush, so the last point below holds on4eb6cfdtoo.work()callsstream_log::request(dstorage.rs:789) beforelanes.finish(dstorage.rs:794).finishis the only place that records a failure (dstorage.rs:877). Outside tests, onlywork()calls it. So the failedRrow is on disk beforeis_completecan return true.Rrow is flushed. TheSrow for the status entry that carries the failure is written later, inLane::flush(dstorage.rs:956). TheProw is written inis_complete(dstorage.rs:499). Both stay in the 1 MiB buffer until the 1 s thread flushes (dstorage.rs:716-724). If those rows matter,Lane::flushcould also flush whenfirstisSome.is_completeand never reads the result. From reading, a failed read would more likely show up later as a crash on bad data. The flush still covers that case, because the row is written before completion is visible.stream_log. On that crash, up to about 1 s of rows is still lost, unless an earlier failed request flushed them. kernel.rs:272 is in victory-hle, so atry_lock+ flush of the log could go there.Not checked: the new test, and whether the rows reach disk on a real failure.
22f1b727f8tob4599b46e4View 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.