loader: VICTORY_HANG_WATCHDOG=off keeps the title's hang watchdog from ending slow runs #666

Open
github-bot wants to merge 1 commit from github-bot/gh-662 into main AGit
Owner

@⁠daidalos4 on GitHub · 2026-11-30 13:30 UTC · original
daidalos4:hang-watchdog → main · +125 −0 · 4 files · 1 commits · open

The title runs a watchdog thread that wakes every second. It ends the run in two cases:

  • one of its 64 watched threads has not checked in for 300 s;
  • the main loop's heartbeat has not moved for 30 s (a countdown kept in two loops).

Both end at image+0x2215c35, or in the crash handler at image+0x23cf683 that writes "GPU Loc Sig". At about one frame a second on a 16 GB Mac that swaps, a world run hit one of them after 6 to 8 minutes with nothing stuck. This is probably also the "30 s without a frame" end noted next to VICTORY_TRACE_GPU_FAILS (#518).

VICTORY_HANG_WATCHDOG=off does two things:

  • it points the 300 s load at the largest float in the title's read-only data;
  • it turns the jump taken when a countdown reaches zero into two nops.

Every site is checked byte for byte first (build 1.0.2.1). On another build it says so and changes nothing. Off unless set. A real deadlock then hangs instead of ending.

Measured on an M1 16 GB, Series S, with VICTORY_METAL_TEXTURE_BUDGET_MB=1536:

  • without it, three world runs ended at 6 to 8 minutes;
  • with it, runs of 15 and 12 minutes ended only on their timer.

cargo test -p victory-loader --lib watchdog covers the switch parsing and the retargeted displacement.

**@⁠daidalos4** on GitHub · 2026-11-30 13:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/662) `daidalos4:hang-watchdog` → `main` · +125 −0 · 4 files · 1 commits · open The title runs a watchdog thread that wakes every second. It ends the run in two cases: - one of its 64 watched threads has not checked in for 300 s; - the main loop's heartbeat has not moved for 30 s (a countdown kept in two loops). Both end at image+0x2215c35, or in the crash handler at image+0x23cf683 that writes "GPU Loc Sig". At about one frame a second on a 16 GB Mac that swaps, a world run hit one of them after 6 to 8 minutes with nothing stuck. This is probably also the "30 s without a frame" end noted next to `VICTORY_TRACE_GPU_FAILS` (#518). `VICTORY_HANG_WATCHDOG=off` does two things: - it points the 300 s load at the largest float in the title's read-only data; - it turns the jump taken when a countdown reaches zero into two nops. Every site is checked byte for byte first (build 1.0.2.1). On another build it says so and changes nothing. Off unless set. A real deadlock then hangs instead of ending. Measured on an M1 16 GB, Series S, with `VICTORY_METAL_TEXTURE_BUDGET_MB=1536`: - without it, three world runs ended at 6 to 8 minutes; - with it, runs of 15 and 12 minutes ended only on their timer. `cargo test -p victory-loader --lib watchdog` covers the switch parsing and the retargeted displacement.
The title runs a watchdog thread that wakes every second. It ends the run when one of 64 watched threads has not checked in for 300 s, and when the main loop's heartbeat has not moved for 30 s (a countdown kept in two loops). Both paths end at image+0x2215c35, or in the crash handler at image+0x23cf683 that writes "GPU Loc Sig". At about one frame a second on a 16 GB Mac that swaps, a world run reached one or the other after 6 to 8 minutes with nothing stuck.

With the switch set to off, the 300 s load is pointed at the largest float in the title's read-only data, and the jump taken when a countdown reaches zero becomes two nops. Every site is checked byte for byte first; on another build the switch says so and changes nothing. Off unless set.

Measured on an M1 16 GB, Series S, texture budget 1536 MiB: without it, three world runs ended at 6 to 8 minutes; with it, runs of 15 and 12 minutes ended only on their timer.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 13:33:19 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/666/head:github-bot/gh-662'
git switch 'github-bot/gh-662'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-662'
git switch 'github-bot/gh-662'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-662'
git switch 'github-bot/gh-662'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-662'
git switch 'main'
git merge --squash 'github-bot/gh-662'
git switch 'main'
git merge --ff-only 'github-bot/gh-662'
git switch 'main'
git merge 'github-bot/gh-662'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.