[Tester] M4 Max 36 GB: world torn/overexposed, GPU OutOfMemory, then WindowServer hung and the Mac reset #521
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:09:03Z.
Mac
Apple M4 Max, 36 GB, macOS 27.2.1
Commit
86cefd22How far did it get?
Further than that: boot movie, start screen and setup screens at 30 fps, story load, and the prologue world reaches the window (torn and overexposed)
What happened
Built with
tools/macos/native-setup.shon an M4 Max (Mac16,9), 36 GB, macOS 27.2.1 (26B131), console=series-x. Apple's Metal Shader Converter installed at/usr/local/lib/libmetalirconverter.dylib. The game files are on a local SSD.What I saw
a descriptor neither loaded nor built is not supported, 58a lane-mask join of an untracked mask: data, at a join of several edges, 32a lane mask holding lanes elsewhere read as data: a program input, 29a descriptor's address or format read as data: an image's dwords.This is the part I think matters most: it took the whole Mac down.
t=+246.0s: Metal Timeout x3 and Other x2 on frame ~2368.t=+257.9sframe ~2369: AnotherOther, and a MetalOutOfMemory.t=+283.0sframe ~2369:VIctory: unhandled exception 0xc0000005 at image+0x55e56f8— the process dies./Library/Logs/DiagnosticReports/WindowServer-2026-11-28-010633.ips, bug_type 409, namespace WATCHDOG,monitoring timed out for service, "40 seconds since last successful checkin", plusWindowServer_2026-11-28-010641_Mac-Studio.userspace_watchdog_timeout.spin.01:07:17:/Library/Logs/DiagnosticReports/ResetCounter-2026-11-28-010717.diag, bug_type 115,Boot failure count: 1,Boot faults: rst btn_rst,btn_seq_reset target_off_restart. WindowServer and loginwindow both start at 01:07:17 — the Mac reset, not just the app.Just before that, victory's own microstackshot (
victory_2026-11-28-010451_Mac-Studio.diag) recorded 2147.58 MB of file-backed memory dirtied over 181 s (11.86 MB/s) — shader cache writes. RSS at the end was ~10.7 GB with ~400 % CPU.I cannot tell from these logs whether the trigger was GPU memory exhaustion, the file-backed write volume, or something else. I am reporting it because 36 GB is above the 32 GB line the README calls comfortable for series-x, and losing the whole session (not just the game) is a hard failure mode.
Nothing exotic was set: no
VICTORY_*variables, plaintools/macos/run-native.sh <folder>. Before installing the shader converter the same build ran withmetal: no shader converterand presented a flat grey window while audio played, so the converter changed it from grey to a (broken) picture.Console: series-x
Shader converter: /usr/local/lib/libmetalirconverter.dylib 60073520 Some(SystemTime { tv_sec: 1792438727, tv_nsec: 0 }) (from the installed default)
VICTORY_* variables in this shell: none
run-summary.sh
Log
victory-20261128-010841-1455.log.gz (sha256 e5374573d6d3e7f9b6e23de3d49b6043e36f11ad905833fadbad3df1be8736ad), scrubbed by tools/macos/tester-report.sh
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by derz92 on 2026-11-28T00:11:08Z.
The same thing happened here once: M5 Max, 36 GB, macOS 26.5, main
b998bb65withVICTORY_METAL_RESIDENCY_SETS=heap. Command buffers timed out in the world, the stop couldn't finish 4 of them, the driver kept about 6 GB, and about 3 minutes later WindowServer's watchdog reset the Mac (#357).A practical data point, not a proven cause: since then I've run all world runs with
VICTORY_METAL_RESIDENCY_SETS=1, roughly 30 runs of 3 to 8 minutes each on #437's tree withVICTORY_TEXTURE_DROP_TOP_MIP=1andVICTORY_OUTPUT=1280x720. There were no GPU time-outs, no out-of-memory errors, and GPU "In use system memory" peaked at about 14 GB and came back at every exit. Heap mode also ran clean twice here before, so I can't pin the hang on it. But if you want to keep testing without risking another reset, those three switches are the safest setup I've found. Also, a watcher that stops the run at the firstcommand buffer failedhas kept the driver's memory from being stranded every time since.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:16:39Z.
Thanks — the residency switch is the difference between losing my Mac and only losing the game. Numbers from an M4 Max, 36 GB, macOS 27.2.1,
86cefd22, series-x, with exactly your set:What changed
footprint_mb19.0 → 20.8 GB,metal_mb19.9 → 20.5 GB, RSS 15.4 GB. Steady climb, no runaway.OutOfMemory, and the Mac stayed up. My previous run (default residency, noOUTPUT) did the opposite:Timeoutx3, thenOutOfMemory, thenunhandled exception 0xc0000005, then WindowServer's watchdog and a full reset (this issue's first post).How it ended this time
# exit code 139— a plain SIGSEGV, no diagnostic line before it, roughly 30 s aftermetal: pipeline archive written: 217 ms. There is no.ipsforvictoryin~/Library/Logs/DiagnosticReports; the nearest thing isMTLCompilerService_2026-11-28-011343_Mac-Studio.diag(175 KB).Your watcher idea works but never had anything to catch: I watched the run log for
command buffer failed/ timeout, it never matched, and the process died of the segfault instead.Cumulative counters at the end, if useful:
no_pipeline=100026draws dropped (ofrecorded=426193),mesh=3681, 296 refusal lines. Still noVICTORY_*variables beyond your three. Happy to attach the full log if someone wants it.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:29:01Z.
Two things from an M4 Max that may be worth knowing, then I'll stop spamming this issue.
1. The same VIctory translation is fast and coherent on a PC GPU.
LooperSalty/AnyXboxXvendors VIctory inthird_party/victoryand reports ~24 fps median in the world at 1080p (RTX 4070 SUPER + i7-13700KF), 30 fps in scenes up to ~4,000 draws, playable with mouse and keyboard. NVIDIA warps are 32 lanes too, so the wave64 split is not what costs us the picture. If the world can be coherent there and not here, I would look at the Metal backend and the Mac-side memory/aliasing path before the refusal count.2. The SIGSEGV here came ~30 s after the pipeline archive was written. In my run with derz92's safe switches the log ends:
metal: pipeline archive written: 217 ms(t+~3m51s), two more first binds at frame 1814, then# exit code 139with no diagnostic line. #519 addsVICTORY_NO_PIPELINE_ARCHIVE=1and describes Metal dying insideMTLBinaryArchiveopen/populate. I am building that branch on the M4 Max and running the same scenario with and without the archive; I'll post what happens either way — including if it makes no difference.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:33:55Z.
A/B done on the M4 Max, same scenario,
VICTORY_NO_PIPELINE_ARCHIVE=1from #519 cherry-picked onto86cefd22(9-line change, built clean).The archive is not the trigger. With archives off there is no
metal: pipeline archive writtenline at all, so the switch does what it says — and the run still died, in the same place in the title:image+0x55e56f8is the same address my very first run hit (that one endedexit code 134too, while the run in between ended with a bareexit code 139). So the fault is in the title's own emulated code at a fixed address, not in Metal's archive.What preceded it this time: 25 ×
metal: command buffer failed: … kIOGPUCommandBufferCallbackErrorTimeout(GPU timeout, code 2), then the title's access violation, then the abort. My earlier safe-switch run on main had zero timeouts and still died by SIGSEGV, so the timeouts change the exit path rather than cause the fault.Net: #519 is worth having on its own merits (it is a real crash in
MTLBinaryArchiveon your M5 Pro), but it does not fix theexit 139/134here. The thread I would pull next is what the title does at+0x55e56f8— with Developer Mode on I can get a host backtrace for that, and I'll post it if it points anywhere.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:38:32Z.
Second occurrence tonight, and this one says more than the first: after the game died, the compositor never came back. Three WindowServer watchdog timeouts in two minutes, then a hard reset by hand:
Timeline: the run (with your three safe switches, archives off) aborted at 01:33:00 with the title's
0xc0000005 at image+0x55e56f8after 25kIOGPUCommandBufferCallbackErrorTimeouts. The first WindowServer timeout is at 01:35:17 — about two minutes later, exactly the delay you described in #357. Each restart timed out again ~50 s later, the display stayed black through it, and the only way out was holding the power button. No kernel panic was logged.Two things I would call evidence rather than opinion:
--headless --seconds 240on default settings, it ended by the timer, and the Mac was fine. Windowed runs are the ones that took the compositor down, both times. If other testers are losing their sessions,--headlessis the difference, and that is worth putting in the docs next to the memory notes.For anyone scripting this: watch the run log for
command buffer failedand kill the process on the first one — that is derz92's advice and it is what I am doing from now on. I am not running the windowed path again on this machine until the crash at+0x55e56f8is understood.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Stooovie on 2026-11-28T00:45:25Z.
The crash reproduces headless (so nobody has to risk their session for it) and the log now shows what precedes it:
The title's own Breakpad then collected
memory.load_percent=25,system.memory.free=10616832,vm.vma.size=137438953344and wrote its WER crash log, so the fault is in the game's code, not in Victory's.The fault comes ~5 s after 12 command buffers were recovered that the GPU never reported on, and this run had 25
kIOGPUCommandBufferCallbackErrorTimeoutbefore it. My earlier windowed run without your switches had zero timeouts and still died, so I am not claiming the timeouts are proven causal — but the pattern (timeouts, then a recovered batch, then a guest fault at a fixed address) is consistent across runs, and it points the same way as #442: a GPU pass that never finishes, the producers of what it reads, and the title left with a half-written frame.A core was written this time (62 GB, Mach-O arm64 — lldb refuses it as "unknown core file format", probably because it was still being written when I opened it). Say the word and I'll keep one and dig; otherwise the log above is the useful part. Files are on a local SSD,
ulimit -c unlimited,--headless --seconds 420, your three switches, main at86cefd22.