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

Open
daidalos4 wants to merge 1 commit from upstream-pr/662 into main
daidalos4 commented 2026-11-30 13:30:18 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by daidalos4 on 2026-11-30T13:30:18Z.


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 (#514).

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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5566242279 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/662). Originally posted by [daidalos4](https://github.com/daidalos4) on 2026-11-30T13:30:18Z. --- 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` (#514). `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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/662:upstream-pr/662'
git switch 'upstream-pr/662'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/662'
git switch 'upstream-pr/662'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/662'
git switch 'upstream-pr/662'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/662'
git switch 'main'
git merge --squash 'upstream-pr/662'
git switch 'main'
git merge --ff-only 'upstream-pr/662'
git switch 'main'
git merge 'upstream-pr/662'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS!662
No description provided.