Repository navigation
Conversation
…ld 1.0.2.1) The title ends the process on purpose when its main thread has not advanced for about 30 one-second ticks (a write to address 0 at +0x23cf683, with a second one at +0x2215c35 right after the handler call). On a host much slower than the console a long load can exceed that window. With VICTORY_NO_WATCHDOG=1 the loader jumps over the abort site and makes the handler's fault a NOP. Each patch is applied only if the original BLAKE3 starts with the 1.0.2.1 identity and the exact original bytes are at the offset; otherwise it logs a warning and does nothing. Off by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Tested this together with #177 on d2a4bae: RTX 5070 Ti, driver 620.73.04, GE-Proton11-14's
Your RTX 3060 run got past this point. Which open PRs did you have applied on top of d2a4bae? I can try the same set on this card. I can also share the full AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested d2c93fa on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed). Not tested in game, since I have no game package. With the variable unset the new code is never reached, which is what the test run covers.
I read the patching code by hand first, since it rewrites title code:
- It only touches the just-mapped title image, before title code runs, gated on the env var, the build hash prefix and an exact byte match at each RVA. The protection is restored and the instruction cache flushed. Nothing else in the process or system is touched.
- The jump target adds up:
0x2215c27 + 2 + 0x18 = 0x2215c41. The patch and the expected bytes are the same length, and both are a whole number of instructions. - The hash is checked before any read at
base + rva, so other builds never read out of bounds.
Small points:
std::env::var_os(..).is_some()enables the hook for any value, includingVICTORY_NO_WATCHDOG=0. The description says=1. Checking for"1"would avoid surprises.- The second
VirtualProtect(restore) result is ignored. That is fine in practice, but a failure would leave the pages RWX without a log line. - Disabling the watchdog turns a fast crash into a possible silent hang for genuinely stuck loads. Since it is opt-in, I think that is an acceptable trade, and the info log line makes it visible.
AI-assisted (Claude Code).
…ok for the title's watchdog (build 1.0.2.1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ild 1.0.2.1) ruvenesh's Marvisak#454: with VICTORY_NO_WATCHDOG set, the loader patches the two places where the title's watchdog ends the process, in build 1.0.2.1 only (hash prefix and exact bytes checked). Without the variable the new code is not reached: its one call site, in victory-loader's `load`, is behind `var_os(..).is_some()`. No conflict. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Seven more upstream PRs are in (Marvisak#493, Marvisak#483, Marvisak#206, Marvisak#469, Marvisak#459, Marvisak#454, Marvisak#579) and the wave64 stack is at Marvisak#439's head 965ce30. Records how each was combined with what the tree had, that a capped view heap keeps 2^18 dynamic slots and why, Marvisak#189 and Marvisak#578 as left out, and a new section with testers' reports from the title: the set without the world-entry hang on three NVIDIA cards and how this tree differs from it, VICTORY_SKIP_WAVE64 as the switch to try, and Marvisak#136 bisected as making every frame black. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Correction to my comment above: the stall I reported here was not a title-side deadlock. The kernel log for those runs shows With AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
|
Windows data point for the first fault site: on an RTX 4070 (Windows 11, native D3D12, driver 32.0.16.2101, title 1.0.2.1), 7 of 7 runs with Those runs were on main I'll run this PR on Windows (GBV on, then off) and report whether the process gets past that point and how far it gets. AI-assisted. |
…PR #454) Ports PR #454 (d2c93fa) unchanged. The title ends the process when its main thread has not advanced for about 30 one-second ticks; slow world frames on this host can trip it. With VICTORY_NO_WATCHDOG=1 the loader jumps over the abort and makes the handler's fault a NOP, only on the Series X 1.0.2.1 build and only where the exact original bytes are found. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itle's watchdog (build 1.0.2.1)
…on slow frames (port of Marvisak/VIctory Marvisak#454) Byte-checked patches for one build only; off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs work: needs the maintainer's decision. This adds an opt-in CI: no check runs on the head commit. Generated by Claude Code |
|
For the maintainer's decision: Why that byte, from image
Run-time evidence: not yet shown (corrected). I first wrote that a run with the poke had no watchdog kill. That run (Windows 11, RTX 3050 laptop, The caveat in this PR's Limits holds for the poke too: it hides a stall and doesn't fix it. A one-line README entry naming the address may be all that's needed instead of a loader patch. AI use: Claude Code (Claude Opus 5.5) disassembled the image locally and wrote this; the two runs are as described. |
|
Correction to my comment above (edited): the run I cited for AI use: Claude Code (Claude Opus 5.5). |
…itle's watchdog (build 1.0.2.1)
Adds an opt-in way past the title's own watchdog, for hosts that load much more slowly than the console. Off by default.
What it does
The title ends the process on purpose when its main thread has not advanced for about 30 one-second ticks. It writes to address 0 in two places (analysed in #71 for the first one):
+0x23cf683:mov dword ptr [0], imm32in the handler the watchdog calls.+0x2215c35:mov dword ptr [0], 0; int3right after thecall raxto that handler. The handler is not expected to return, so NOPing only the first site just reaches this one.With
VICTORY_NO_WATCHDOG=1,victory-loaderpatches the mapped image once, before any title code runs:+0x2215c27, a shortjmp(EB 18) over the call and the fallback fault, to the loop's normal continuation at+0x2215c41;+0x23cf683, an eleven-byte NOP in place of the handler's fault.Each patch is applied only if the original BLAKE3 starts with the 1.0.2.1 identity and the exact expected bytes are at the offset. Otherwise it logs a warning and does nothing. Other builds are untouched.
Asset policy
Only per-build offsets and short byte signatures (11 and 7 bytes), which
docs/asset-policy.mdallows.cargo xtask policy --stagedpasses on the three files.Evidence
Linux, Wine 11.0 (GE-Proton11-14, vkd3d-proton 3.2.0), RTX 3060 12 GB,
d2a4baeplus a few open shader PRs, scripted menu input. Of 14 world-load runs without the hook, 7 ended with the+0x23cf683fault, between about 2 and 8 minutes after launch. The other 7 ended in other ways (device removal 3, an NVIDIA driver crash invkAllocateMemory2, one silent exit, and one that reached the second fault site above when only the first was patched). Those runs also differed inVKD3D_CONFIGand shader-skip settings, so the 7 is a count and not a controlled rate. With the hook, the process kept running past that point: the run is still going at 14 minutes. It reached the first mission's title card and then the dark first scene, which matches the README's current status.A stack dump series (8 to 90 s) shows the title's helper thread is alive but sits in one long wait for about 50 s while title-main polls for its reply, so the watchdog is firing on a slow load and not on a missing thread. I have not identified what that wait is for.
Limits
cfg(windows)and I would expect it to behave the same on Windows, but I have not run it there.🤖 Generated with Claude Code