dstorage: a request that panics fails, and its worker goes on #458

Manually merged
github merged 2 commits from github-bot/gh-454 into gh-pr/454/base 2026-11-28 01:36:54 +00:00 AGit
Owner

@⁠lautarocherro on GitHub · 2026-11-27 20:30 UTC · original
lautarocherro:fix/dstorage-stuck-status → main · +212 −22 · 2 files · 2 commits · merged 2026-11-28 01:32 UTC

What this changes

Refs #450. A panic in execute killed its worker and left the read marked running for good, so the status entries behind it never completed. That matches the report (running 1, no failure, every other read healthy). Static review found no panicking input in the decoders, so this does not prove the cause. It closes this failure mode either way, and the warning now tells the two candidates apart.

  • The worker catches a panic: the request fails with E_FAIL (no other failure uses it), its status completes, and the worker goes on.
  • a status entry is still pending now lists the reads running longest: age, worker (dstorage N), file, offset, options. A read running for seconds on a live worker is a stalled read (for example a pread that never returns), not a panic.

How it was tested

  • cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: 395 passed. Native cargo test -p victory-hle: 150 passed. null_out_pointers_fail_without_leaking_lanes_or_handles fails about 1 run in 10, on main too (12 of 100): it compares the scheduler's global next_id while other tests create queues.
  • New: a_panicking_request_fails_its_status_and_the_queue_goes_on, a_worker_survives_a_panic (both fail on main: "never completed"), running_reads_name_what_they_read, an_unsupported_source_is_not_read_for_its_name (the names in the warning and the failure line never read the source of a request execute refuses). A #[cfg(test)] tag makes a request panic; release builds are unchanged apart from the catch.
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: passes, also with --all-features.
  • Ran the game, or not needed: not needed.

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md (none)
  • New diagnostics are behind a VICTORY_* variable and documented (none new; the existing warning gains a field)
**@⁠lautarocherro** on GitHub · 2026-11-27 20:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/454) `lautarocherro:fix/dstorage-stuck-status` → `main` · +212 −22 · 2 files · 2 commits · merged 2026-11-28 01:32 UTC ## What this changes Refs #450. A panic in `execute` killed its worker and left the read marked running for good, so the status entries behind it never completed. That matches the report (`running 1`, no failure, every other read healthy). Static review found no panicking input in the decoders, so this does not prove the cause. It closes this failure mode either way, and the warning now tells the two candidates apart. - The worker catches a panic: the request fails with `E_FAIL` (no other failure uses it), its status completes, and the worker goes on. - `a status entry is still pending` now lists the reads running longest: age, worker (`dstorage N`), file, offset, options. A read running for seconds on a live worker is a stalled read (for example a `pread` that never returns), not a panic. ## How it was tested - [x] `cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory`: 395 passed. Native `cargo test -p victory-hle`: 150 passed. `null_out_pointers_fail_without_leaking_lanes_or_handles` fails about 1 run in 10, on main too (12 of 100): it compares the scheduler's global `next_id` while other tests create queues. - New: `a_panicking_request_fails_its_status_and_the_queue_goes_on`, `a_worker_survives_a_panic` (both fail on main: "never completed"), `running_reads_name_what_they_read`, `an_unsupported_source_is_not_read_for_its_name` (the names in the warning and the failure line never read the source of a request `execute` refuses). A `#[cfg(test)]` tag makes a request panic; release builds are unchanged apart from the catch. - [x] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings`: passes, also with `--all-features`. - [x] Ran the game, or not needed: not needed. ## Checklist - [x] No game files, game code, disassembly listings or SDK files are included - [x] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md (none) - [x] New diagnostics are behind a `VICTORY_*` variable and documented (none new; the existing warning gains a field)
A panic in execute killed its worker and left the read marked running
for good, so every status entry behind it stayed pending and the title
polled it forever. The worker now catches the panic: the request fails
with E_FAIL, its status completes and the worker goes on. The pending
warning also names the reads running longest (age, worker, file,
offset, options), which tells a stalled read from a panic.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:35:29 +00:00
source_name took any non-null source as one of our files. For an
option execute refuses (bit 23: a source in physical pages) it is not,
and failed() and the pending warning now call it for such requests.
github-bot changed target branch from main to gh-pr/454/base 2026-11-28 01:36:53 +00:00
github manually merged commit 8d0d64d380 into gh-pr/454/base 2026-11-28 01:36:54 +00:00
Author
Owner

@⁠Olima34 on GitHub · 2026-11-28 01:32 UTC · original · approved these changes

Check report (helping the maintainer clear the queue):

  • CI: check and macos-scripts green on 8d0d64d3.
  • Read: the whole diff. catch_unwind around execute turns a panicking request into E_FAIL, so its status entry completes, the worker survives and its staging is given back (the release profile unwinds, so this holds in a real build too). The pending warning now names the reads running longest. source_name no longer reads a source an unsupported option makes foreign. Tests for each: a_panicking_request_fails_its_status_and_the_queue_goes_on, a_worker_survives_a_panic, running_reads_name_what_they_read, an_unsupported_source_is_not_read_for_its_name. Docs updated.
  • Local check on current main (226645f9) merged with this PR, #503 and #511: victory-hle tests pass on x86_64-apple-darwin (336 + 17), Windows clippy (-D warnings) clean, cargo xtask policy ok.
  • Nit, not blocking: the old doc line of execute ("Reads, inflates and/or unpacks, and writes one request.") now sits above failed instead.
  • Not checked: no game run (the maintainer asked us to work on GitHub only).

Thanks @⁠lautarocherro!

**@⁠Olima34** on GitHub · 2026-11-28 01:32 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/454#pullrequestreview-6094912515) · **approved these changes** Check report (helping the maintainer clear the queue): - **CI:** `check` and `macos-scripts` green on 8d0d64d3. - **Read:** the whole diff. `catch_unwind` around `execute` turns a panicking request into `E_FAIL`, so its status entry completes, the worker survives and its staging is given back (the release profile unwinds, so this holds in a real build too). The pending warning now names the reads running longest. `source_name` no longer reads a source an unsupported option makes foreign. Tests for each: `a_panicking_request_fails_its_status_and_the_queue_goes_on`, `a_worker_survives_a_panic`, `running_reads_name_what_they_read`, `an_unsupported_source_is_not_read_for_its_name`. Docs updated. - **Local check on current main (226645f9) merged with this PR, #503 and #511:** `victory-hle` tests pass on x86_64-apple-darwin (336 + 17), Windows clippy (`-D warnings`) clean, `cargo xtask policy` ok. - **Nit, not blocking:** the old doc line of `execute` ("Reads, inflates and/or unpacks, and writes one request.") now sits above `failed` instead. - **Not checked:** no game run (the maintainer asked us to work on GitHub only). Thanks @⁠lautarocherro!
This discussion has been locked. Commenting is limited to contributors.
No description provided.