gpu(native): cap unbounded GPU work, so a garbage indirect record cannot hang the Mac's GPU #522

Open
opened 2026-11-28 00:15:14 +00:00 by AeroUp · 19 comments
AeroUp commented 2026-11-28 00:15:14 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AeroUp on 2026-11-28T00:15:14Z.


The run of 2026-11-27 18:25 (Series S, M3 Pro) hung the GPU: 13 AGX restarts, WindowServer reset, and the process stuck in kernel exit holding 13.7 GB wired. The failing command buffer's trace shows indirect draw records read as garbage, e.g. [3190467240, 1051372204, 2139095039, 2139095039, 2139095039]: an indirect dispatch's groups are gated to 2^22, but an indirect draw's vertex/index and instance counts are not clamped at all, so Metal runs billions of vertices.

Plan: clamp indirect and direct dispatch/draw counts to hard caps with one log line per kind; refuse (rather than emit) any translated loop that has no iteration counter; drop a new submission when the GPU has not finished one for 10 s instead of queueing behind a hung GPU; and end the process on a deadline (bounded GPU drain) on every exit path, including the title's exit and unhandled-exception path.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6656551734 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522). Originally posted by [AeroUp](https://github.com/AeroUp) on 2026-11-28T00:15:14Z. --- The run of 2026-11-27 18:25 (Series S, M3 Pro) hung the GPU: 13 AGX restarts, WindowServer reset, and the process stuck in kernel exit holding 13.7 GB wired. The failing command buffer's trace shows indirect draw records read as garbage, e.g. `[3190467240, 1051372204, 2139095039, 2139095039, 2139095039]`: an indirect dispatch's groups are gated to 2^22, but an indirect draw's vertex/index and instance counts are not clamped at all, so Metal runs billions of vertices. Plan: clamp indirect and direct dispatch/draw counts to hard caps with one log line per kind; refuse (rather than emit) any translated loop that has no iteration counter; drop a new submission when the GPU has not finished one for 10 s instead of queueing behind a hung GPU; and end the process on a deadline (bounded GPU drain) on every exit path, including the title's exit and unhandled-exception path.
AeroUp commented 2026-11-28 00:15:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AeroUp on 2026-11-28T00:15:16Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230768229 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7230768229). Originally posted by [AeroUp](https://github.com/AeroUp) on 2026-11-28T00:15:16Z. --- /claim
github-actions[bot] commented 2026-11-28 00:15:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T00:15:30Z.


Claimed by @AeroUp. Open a draft pull request with Refs #522 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230771261 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7230771261). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T00:15:30Z. --- Claimed by @AeroUp. Open a draft pull request with `Refs #522` in its description within 24 hours, or the claim expires.
github-actions[bot] commented 2026-11-29 00:42:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T00:42:12Z.


The claim by @AeroUp has expired: no pull request referenced it within 24 hours. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7248293292 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7248293292). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T00:42:12Z. --- The claim by @AeroUp has expired: no pull request referenced it within 24 hours. This issue is free to claim.
AnastasisKon commented 2026-11-29 08:21:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:21:31Z.


/claim

Taking the demonstrated hang mechanism first (one change per PR): clamp an indirect draw's vertex/index and instance counts to hard caps — the indirect dispatch's groups are already gated to 2^22, the draw's counts are not clamped at all, and Metal ran billions of vertices off a garbage record. One log line per kind when a clamp bites, as the issue's plan has it. The loop-refusal and the 10 s stall-drop/drain items stay in this issue as follow-ups.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253052519 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253052519). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:21:31Z. --- /claim Taking the demonstrated hang mechanism first (one change per PR): clamp an indirect draw's vertex/index and instance counts to hard caps — the indirect dispatch's groups are already gated to 2^22, the draw's counts are not clamped at all, and Metal ran billions of vertices off a garbage record. One log line per kind when a clamp bites, as the issue's plan has it. The loop-refusal and the 10 s stall-drop/drain items stay in this issue as follow-ups.
github-actions[bot] commented 2026-11-29 08:21:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:21:41Z.


Claimed by @AnastasisKon. Open a draft pull request with Refs #522 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253054377 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253054377). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:21:41Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #522` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-29 08:22:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:22:25Z.


Correcting my own scope above: the demonstrated indirect-draw hang is already fixed on main — 3f860303 (2026-11-27, metal: an indirect draw of more than 2^20 instances or 2^26 vertices draws nothing) extended the gate the same day as the run in this issue, after it. So the item-1 indirect part is done; I am not redoing it.

Re-scoping my claim to the plan's third item: drop a new submission when the GPU has not finished one for 10 s instead of queueing behind a hung GPU (with one log line). The gate bounds what one garbage record can ask for, but any other hang — a Metal fault, a compiler-service crash mid-frame — still leaves every later submission queued behind it, which is what cost 13 AGX restarts and the WindowServer reset in this issue's run. The direct-count clamps and the loop-refusal and bounded-drain items stay open in this issue.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253062672 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253062672). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:22:25Z. --- Correcting my own scope above: the demonstrated indirect-draw hang is already fixed on main — 3f860303 (2026-11-27, metal: an indirect draw of more than 2^20 instances or 2^26 vertices draws nothing) extended the gate the same day as the run in this issue, after it. So the item-1 indirect part is done; I am not redoing it. Re-scoping my claim to the plan's third item: drop a new submission when the GPU has not finished one for 10 s instead of queueing behind a hung GPU (with one log line). The gate bounds what one garbage record can ask for, but any other hang — a Metal fault, a compiler-service crash mid-frame — still leaves every later submission queued behind it, which is what cost 13 AGX restarts and the WindowServer reset in this issue's run. The direct-count clamps and the loop-refusal and bounded-drain items stay open in this issue.
AnastasisKon commented 2026-11-29 08:29:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:29:10Z.


The third plan item landed on the fork's main as commit 90f72141 (metal: a submission is not queued behind a GPU taken as hung).

One deviation from the plan, deliberately: the drop threshold is LOST_ANYWAY (30 s), not the 10 s written here. Legitimate world submissions have run 6-21 s (the piece work in #80 measured that), so at 10 s the drop would cut into healthy work; 30 s is the bar the repo already uses to call a command buffer lost (recover_lost pays one at that age), so queued and paid now use the same rule. If a run ever shows a hang shorter than that doing damage, the number is one constant.

What it does: once the oldest in-flight submission has been unfinished for 30 s, the GPU is taken as hung and the latch keeps it — every later submission is paid on the CPU (fence signals and value writes through the existing Owed recovery, the queue's order event moved past it so nothing waits behind a value that never comes) and not queued. That bounds what a hang costs: no new wired memory behind a dead GPU, and the exit has nothing extra to drain. One error line, once, telling the user to restart. The hung submissions themselves are still paid by recover_lost under its existing rules.

Gate green in isolation, this time including victory-metal's own tests: cargo test -p victory-hle -p victory -p victory-shader -p victory-gpu -p victory-backend -p victory-metal -p xtask (--test-threads=1, with a new unit test on the decision: nothing in flight or a young flight is not hung, one LOST_ANYWAY-old flight is, a young one behind it does not help), the x86_64-apple-darwin suite for host_posix, clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh.

Remaining in this issue: the direct draw/dispatch count clamps (the indirect ones are done — 3f860303 gates indirect draws at 2^20 instances / 2^26 vertices), the refusal of translated loops without an iteration counter, and the bounded GPU drain on every exit path. Not claiming those; freeing the claim so they can be taken one by one.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253134695 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253134695). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:29:10Z. --- The third plan item landed on the fork's main as commit 90f72141 (metal: a submission is not queued behind a GPU taken as hung). One deviation from the plan, deliberately: the drop threshold is LOST_ANYWAY (30 s), not the 10 s written here. Legitimate world submissions have run 6-21 s (the piece work in #80 measured that), so at 10 s the drop would cut into healthy work; 30 s is the bar the repo already uses to call a command buffer lost (recover_lost pays one at that age), so queued and paid now use the same rule. If a run ever shows a hang shorter than that doing damage, the number is one constant. What it does: once the oldest in-flight submission has been unfinished for 30 s, the GPU is taken as hung and the latch keeps it — every later submission is paid on the CPU (fence signals and value writes through the existing Owed recovery, the queue's order event moved past it so nothing waits behind a value that never comes) and not queued. That bounds what a hang costs: no new wired memory behind a dead GPU, and the exit has nothing extra to drain. One error line, once, telling the user to restart. The hung submissions themselves are still paid by recover_lost under its existing rules. Gate green in isolation, this time including victory-metal's own tests: cargo test -p victory-hle -p victory -p victory-shader -p victory-gpu -p victory-backend -p victory-metal -p xtask (--test-threads=1, with a new unit test on the decision: nothing in flight or a young flight is not hung, one LOST_ANYWAY-old flight is, a young one behind it does not help), the x86_64-apple-darwin suite for host_posix, clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh. Remaining in this issue: the direct draw/dispatch count clamps (the indirect ones are done — 3f860303 gates indirect draws at 2^20 instances / 2^26 vertices), the refusal of translated loops without an iteration counter, and the bounded GPU drain on every exit path. Not claiming those; freeing the claim so they can be taken one by one.
AnastasisKon commented 2026-11-29 08:29:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:29:11Z.


/release

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253134879 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253134879). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:29:11Z. --- /release
github-actions[bot] commented 2026-11-29 08:29:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:29:29Z.


Released. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253138000 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253138000). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:29:29Z. --- Released. This issue is free to claim.
AnastasisKon commented 2026-11-29 08:36:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:36:30Z.


/claim

Taking the direct half of the first item: clamp a direct dispatch's group counts and a direct draw's vertex and instance counts to the same hard caps the gate already holds indirect ones to (2^22 groups; 2^20 instances, 2^26 vertices), with one log line per kind when a clamp bites. The loop-refusal and bounded-drain items stay open.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253213992 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253213992). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:36:30Z. --- /claim Taking the direct half of the first item: clamp a direct dispatch's group counts and a direct draw's vertex and instance counts to the same hard caps the gate already holds indirect ones to (2^22 groups; 2^20 instances, 2^26 vertices), with one log line per kind when a clamp bites. The loop-refusal and bounded-drain items stay open.
github-actions[bot] commented 2026-11-29 08:36:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:36:40Z.


Claimed by @AnastasisKon. Open a draft pull request with Refs #522 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253215884 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253215884). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:36:40Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #522` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-29 08:44:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:44:41Z.


The direct half of the first item landed on the fork's main as commit ad0e5c2d (gpu(native): a direct dispatch or draw past the gate's caps runs nothing).

A direct call's counts were not bounded at all: the gate holds indirect records to 2^22 groups, 2^20 instances and 2^26 vertices or indices in all, but a direct Dispatch/Draw/DispatchMesh could ask the GPU for the same unbounded work a garbage record no longer can. Direct calls past the same caps now run nothing, as an indirect record past them does — a console title's own counts never come near the caps (D3D12's per-dimension limits are far below), so the guard only ever answers garbage. The refusal is argument validation before the pipeline state, so an under-cap call still fails exactly as before for a missing pipeline; one warning line per kind, the first four.

Unit test: dispatches past the cap in the product and in one dimension, draws past the instance cap and the vertex/index products, a mesh dispatch past the group cap — all record no command; under the caps the calls still reach the pipeline check. Full gate green in isolation (native suite incl. victory-metal and victory-backend, the x86_64-apple-darwin host_posix suite, clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh).

That closes the first item of the plan entirely (indirect half: 3f860303; direct half: ad0e5c2d; plus the hung-GPU drop: 90f72141). Remaining: the refusal of translated loops without an iteration counter, and the bounded GPU drain on every exit path. Freeing the claim for those.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253303739 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253303739). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:44:41Z. --- The direct half of the first item landed on the fork's main as commit ad0e5c2d (gpu(native): a direct dispatch or draw past the gate's caps runs nothing). A direct call's counts were not bounded at all: the gate holds indirect records to 2^22 groups, 2^20 instances and 2^26 vertices or indices in all, but a direct Dispatch/Draw/DispatchMesh could ask the GPU for the same unbounded work a garbage record no longer can. Direct calls past the same caps now run nothing, as an indirect record past them does — a console title's own counts never come near the caps (D3D12's per-dimension limits are far below), so the guard only ever answers garbage. The refusal is argument validation before the pipeline state, so an under-cap call still fails exactly as before for a missing pipeline; one warning line per kind, the first four. Unit test: dispatches past the cap in the product and in one dimension, draws past the instance cap and the vertex/index products, a mesh dispatch past the group cap — all record no command; under the caps the calls still reach the pipeline check. Full gate green in isolation (native suite incl. victory-metal and victory-backend, the x86_64-apple-darwin host_posix suite, clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh). That closes the first item of the plan entirely (indirect half: 3f860303; direct half: ad0e5c2d; plus the hung-GPU drop: 90f72141). Remaining: the refusal of translated loops without an iteration counter, and the bounded GPU drain on every exit path. Freeing the claim for those.
AnastasisKon commented 2026-11-29 08:44:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:44:42Z.


/release

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253303903 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253303903). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:44:42Z. --- /release
github-actions[bot] commented 2026-11-29 08:45:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:45:00Z.


Released. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253306963 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253306963). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:45:00Z. --- Released. This issue is free to claim.
AnastasisKon commented 2026-11-29 08:47:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:47:56Z.


/claim

Taking the last item: a bounded GPU drain on every exit path — the run in this issue ended stuck in kernel exit holding 13.7 GB wired, so the drain a hung GPU never finishes needs a deadline after which the process ends anyway. The loop-refusal item stays open after it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253339366 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253339366). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:47:56Z. --- /claim Taking the last item: a bounded GPU drain on every exit path — the run in this issue ended stuck in kernel exit holding 13.7 GB wired, so the drain a hung GPU never finishes needs a deadline after which the process ends anyway. The loop-refusal item stays open after it.
github-actions[bot] commented 2026-11-29 08:48:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:48:08Z.


Claimed by @AnastasisKon. Open a draft pull request with Refs #522 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253341320 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253341320). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:48:08Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #522` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-29 08:55:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:55:27Z.


The bounded drain landed on the fork's main as commit fff0009e (loader, app: a bounded GPU stop on every exit path).

The run in this issue ended stuck in kernel exit holding 13.7 GB wired, because the unhandled-exception path aborted straight into the kernel's teardown with the GPU wedged and the residency sets still held. Now every path that ends the process stops the GPU first, bounded:

  • the crash paths (unhandled exception, failed unwind, the title's own handler ending the process) run a stop the embedder installs with victory_loader::native::seh::set_before_abort — the app installs a 1 s / 3 s stop, shorter than the signals drain, because its point is that the exit finishes, not that the GPU does;
  • the title's normal exit drains as the signals already did (3 s / 20 s) — which also fixes the graceful-exit case of #357 (19.7 GB left 'in use' after a hung run exited, because only the signals path emptied the residency sets);
  • the closed window drains as the crash paths do.

stop_gpu itself was already right (wake the tracked events, wait bounded, pay what is left, empty the residency sets); this wires it to the exits that skipped it. Unit test (x86_64, where the seh dispatcher compiles): the installed stop runs before the abort, and without one an aborting path goes on as it did.

Full gate green in isolation: the native suite incl. victory-metal and victory-backend, the x86_64-apple-darwin suite (hle, loader — the new test — and victory), clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh.

Three of this issue's four items are now done on the fork's main (indirect gate 3f860303, direct caps ad0e5c2d, hung-GPU drop 90f72141, bounded exits fff0009e). What remains is the refusal of translated loops without an iteration counter. Freeing the claim for it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253419758 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253419758). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:55:27Z. --- The bounded drain landed on the fork's main as commit fff0009e (loader, app: a bounded GPU stop on every exit path). The run in this issue ended stuck in kernel exit holding 13.7 GB wired, because the unhandled-exception path aborted straight into the kernel's teardown with the GPU wedged and the residency sets still held. Now every path that ends the process stops the GPU first, bounded: - the crash paths (unhandled exception, failed unwind, the title's own handler ending the process) run a stop the embedder installs with victory_loader::native::seh::set_before_abort — the app installs a 1 s / 3 s stop, shorter than the signals drain, because its point is that the exit finishes, not that the GPU does; - the title's normal exit drains as the signals already did (3 s / 20 s) — which also fixes the graceful-exit case of #357 (19.7 GB left 'in use' after a hung run exited, because only the signals path emptied the residency sets); - the closed window drains as the crash paths do. stop_gpu itself was already right (wake the tracked events, wait bounded, pay what is left, empty the residency sets); this wires it to the exits that skipped it. Unit test (x86_64, where the seh dispatcher compiles): the installed stop runs before the abort, and without one an aborting path goes on as it did. Full gate green in isolation: the native suite incl. victory-metal and victory-backend, the x86_64-apple-darwin suite (hle, loader — the new test — and victory), clippy on windows-gnullvm, cargo xtask policy, all tools/macos/tests/*.sh. Three of this issue's four items are now done on the fork's main (indirect gate 3f860303, direct caps ad0e5c2d, hung-GPU drop 90f72141, bounded exits fff0009e). What remains is the refusal of translated loops without an iteration counter. Freeing the claim for it.
AnastasisKon commented 2026-11-29 08:55:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T08:55:28Z.


/release

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253419975 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253419975). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-29T08:55:28Z. --- /release
github-actions[bot] commented 2026-11-29 08:55:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-29T08:55:46Z.


Released. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7253423138 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/522#issuecomment-7253423138). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T08:55:46Z. --- Released. This issue is free to claim.
Sign in to join this conversation.
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#522
No description provided.