[Tester report] M5 Max 128 GB, Series X: the arm64 recompiled title boots, loads and encodes every draw, but nothing reaches the window #446
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 xarvel-temp on 2026-11-27T19:52:09Z.
Mac
Apple M5 Max, 128 GB, macOS 27.2.1 (26B131). Metal Shader Converter 4.0.0 (the installed default),
console=series-x(chosen automatically), noVICTORY_*variables set.Commit
b998bb6How far did it get?
Something visible on screen
What happened
A DirectStorage status entry never completes, and the title spins on it. This looks like the mechanism behind the "intermittent opening audio over a black picture" reports, and it happens here with 128 GB of RAM, which should rule out memory pressure as the cause.
The warning repeats 126 times, every 5,000 polls, on the same entry:
Lane 6 holds one status with
running 1andfailures 0for the rest of the run: nothing is unsubmitted or held, and nothing failed, so this reads as a lost completion rather than an I/O error or a queue that ran dry.DirectStorage itself keeps working the whole time — 80 files opened, 3,390 to 4,444 requests per ~5.5 s window at 46.7 to 88.5 MB/s,
staging_waits=0,busy_workers0.20 to 0.46. So throughput is healthy and one request is stuck.What that looks like from outside:
frame presented frame=2048 draws=30600 drawn=0 dispatches=1023— 30,600 draws recorded, zero drawn. The window showed only artefacts, never the boot movie or the menus.spatial stream activations: 2), which fits streams that already hold data continuing while no new data arrives.Since
run-native.shpresses Enter for you until 80 s, no input of mine was involved.For comparison on the same machine and the same game files, the Wine route (ScarlettMac Runtime Preview, perf recipe) does reach the world and renders it at a median of 3.4 fps, so the game files themselves load and run.
Shader refusals
313 refusals in the run. Grouped by reason, over half are cross-lane or lane-mask cases:
ds_appendords_consumein a console wave the host splitsOne other warning, once:
typed buffer view offset is not aligned for MTLTextureTypeTextureBuffer; falling back to raw buffer.Log
The scrubbed log from
tools/macos/tester-report.shis attached as a comment below (216 KB gzipped). Happy to run further tests on this machine, including with extra switches, if that would help narrow the stuck lane down.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by lautarocherro on 2026-11-27T20:19:05Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T20:19:16Z.
Claimed by @lautarocherro. Open a draft pull request with
Refs #446in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T20:50:15Z.
Follow-up with a thread sample, which narrows this a long way, plus the same stall on an arm64 host.
It is not architecture-specific
I built the recompiled-title route from #115 (
native/arm64-run, HEAD4aae306):victory-recomp lift-splitover the exe (440,157 functions, 440,156 lifted, 1 stubbed, 279 units) and over all 16 title DLLs, each image built as its own dylib with the documented flags, andvictorybuilt foraarch64-apple-darwin. That part works: the exe maps at its preferred base0x140000000, every title DLL binds withmissing=0throughvictory_hle::title::arm64, the Metal backend comes up, shaders translate ahead on 8 threads, audio plays (WASAPI: render client released frames in the last second frames=47040), and frames advance to 1307 with pipelines binding.And the identical DirectStorage stall appears, on the same status entry pattern:
a status entry is still pending index=0 polls=7285000. So this is not Rosetta, not the x86-64 host path, and not the lifted code.The sample: every worker is idle, so nothing is stuck in
executesampleon the running process, 3 s, 102 threads. All 18dstorageworkers are present and all 18 are in the same place:Not one worker is inside
execute,read_into,inflateorbcpack::decode. Inwork()that stack meanslanes.start()returnedNoneand the worker is parked onscheduler.work.So my first guess — a worker wedged in a decoder or a read — is wrong, and so is a dead worker: all 18 are alive.
The invariant that looks broken
With every worker parked,
start()returningNonemeans no lane has a queued read. But the state printed alongside the stall showsstagedis not zero: across the warnings it reads 407,024 then 89,677, 134,670, 24,010, 80,257, 73,298, 70,143 and settles at 61,495 and 61,183 bytes, against a 32 MiB staging buffer.self.stagedis only raised inLanes::startand only lowered inLanes::finish. If every job that started has finished, it must be zero. A non-zerostagedwith no worker executing therefore says a job was started and never finished — which also leaves itsseqinlane.running, andflush()gates on exactlyself.running.first():so the status behind it can never be written.
I could not find the path that loses a job:
work()callsfinishunconditionally afterexecute, there is no panic anywhere in the log (andwork()has nocatch_unwind), andfinishonly skipsrunning.removewhenself.lanes.get_mut(&job.lane)isNone, i.e. the lane is gone. You know these invariants; what I can offer is that the inconsistency is real and reproducible.Why it is unrecoverable rather than merely a lost read
flush()is driven only byfinish()(and bysubmit_as, which does call it). Once a lane holds arunningentry that will never complete and the title stops submitting to that lane, nothing will ever callflush()again, so the status stays pending for the rest of the process — here 7.28 million polls. Two cheap guards would make this a lost texture instead of a dead run: acatch_unwindaroundexecuteso a failure still reachesfinish, and re-runningflush()from the status poll path (or a per-lane watchdog) so a lane that has become eligible is written even with no further completions.Context on the effect
On the x86-64 host the frame reports read
draws=30600 drawn=0; on the arm64 hostframe=1024 draws=3556 drawn=0 dispatches=513 dispatched=0. In both, draws are recorded and none are drawn, which fits the title waiting on a load that never completes.Happy to run anything on this machine: it is an M5 Max with 128 GB, so memory pressure is not in play, and both host architectures reproduce it within a minute of reaching the world.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T20:58:16Z.
One more datum that I think closes this, and it corrects my previous comment: there is no leaked job. The lane goes completely idle with the status still pending.
I added a temporary watchdog to
scheduler()that walks the lanes every two seconds, and separately sampled thestill pendingwarnings across a run. Printed every 40th warning,stagedand the lane'srunningcount:runningsimply tracks load between 0 and 18, andstagedreturns to 0, so my earlier reading of a non-zerostagedas a lost job was wrong — I was sampling a busy moment.The line that matters is
staged 0 running 0. At that point the lane's state wasreads 0 statuses 1 running 0with no staging held, so inthere was nothing below the status's sequence number: the gate was open. The status was eligible and was not written.
That leaves one explanation: nothing called
flush()at that moment. Its only drivers areLanes::finishandLanes::submit_as, and both are absent exactly in this state — the lane has no running job left to finish, and the title has not submitted to it again. A status entry that becomes eligible while a lane falls quiet is therefore never written, and because the title then polls it forever (7.28 M polls in the earlier run, 3.45 M here), the run is over.This also explains why it survives every environment change: it is a scheduling-order bug, not an I/O, decoder, memory-pressure or architecture problem. It reproduces identically on the x86-64 host and on the arm64 recompiled-title host from #115, on a 128 GB Mac with swap untouched.
A fix would be to give
flush()a third driver — running it from the status poll path, or from a small per-lane watchdog — so that a lane which has become eligible is written even when no completion or submission follows.Caveat on my own instrumentation: the watchdog I added also force-runs
flush()for every lane when it reports, and it produced no output during the run even thoughstatuseswas non-empty throughout, so I cannot claim to have verified that a forced flush releases the entry. The evidence above is from the project's ownlog_pendingwarnings, which I did not change. The patch is a local diagnostic only and I am not proposing it as-is; if you would like it cleaned up behind the existingVICTORY_DSTORAGE_LOGvariable instead, say so and I will send it.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T21:04:40Z.
Please disregard my diagnosis above: I misread the diagnostic, and there is no DirectStorage hang here. Sorry for the noise.
is_completecounts with a single process-wide static:So
polls=7285000is not one entry polled 7.28 M times. It is the total number of pending polls in the process since start, across every entry. With the title polling in aSleep(1)loop, a few hundred thousand a minute is simply what loading looks like. I read it as a per-entry wait, and everything I built on top of that was wrong.What settled it: I added the entry's own location to
log_pending, which prints whether any lane holds the exact(array, index)being polled. Over one run:Same array, same
index=0, different sequence numbers. The entries are being written and the title is queuing new ones; the queue is making progress, not stuck. Lane 16 showsreads 2 running 2at those moments, i.e. ordinary in-flight work below the entry's sequence number, which is exactly whenflushis supposed to wait.Corrections to my two earlier comments:
staged 0 running 0sample I treated as "the gate is open but nobody flushes" was a snapshot of a different lane:log_pendingprints every lane withentries() > 0, not the one that owns the polled entry. With the entry's location printed, it is always on a lane that does have work below it.finish;runningandstagedjust track load.close_laneinstead of clearing them. The second may still be worth having as a defensive measure — a queue closed with entries pending would leave a poller waiting — but it never triggered here, so I have no evidence it happens in practice and I am not proposing it on this issue.The real open item from my report stands, and it is the one in the title's second half:
frame=2048 draws=9522 drawn=0 dispatches=1616 dispatched=0on the arm64 host, withnative draws so far frame=2048 recorded=13470 encoded=13470 no_pipeline=0 no_texture=0. Draws are recorded and encoded with no pipeline or texture misses, and the queue still reports none drawn, and nothing reaches the window. That is where I should have been looking, and I will open a separate issue for it rather than leave it mixed in with a wrong diagnosis here.One small thing that would have saved me several hours, if you think it is worth a line: either make that counter per entry, or reword the comment, since "a request polled this long is stuck" reads as a per-request count.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T21:05:33Z.
Retracting the other half of my original report as well, and I have retitled the issue accordingly.
drawnanddispatchedin theframe presentedline are not counters on this host:So
draws=9522 drawn=0on macOS is a placeholder, not a symptom, and my original title ("30,600 draws, 0 drawn") asserted something that cannot happen otherwise. The native path's own accounting is the line that means something, and it is clean:Everything recorded is encoded, with no pipeline or texture misses.
So, stripped of my two misreadings, what this report actually contains is a positive result plus one open observation:
Positive, and the part I think is worth keeping: the recompiled-title route from #115 works end to end on an M5 Max with 128 GB.
victory-recomp lift-splitover the exe gives 440,157 functions with 440,156 lifted and 1 stubbed in 279 units (1.6 GB of C, about 25 minutes to compile at-O2on 18 cores), all 16 title DLLs lift and build,victorybuilds foraarch64-apple-darwinwithout changes, the exe maps at its preferred base0x140000000, every image binds withmissing=0, Metal comes up, shaders translate ahead on 8 threads, DirectStorage reads at 46–89 MB/s, audio runs steadily (46,000–47,000 frames a second through CoreAudio, never falling back to silence), and frames advance past 2,000 with pipelines binding and every draw encoded. No GPU errors, no watchdog line, no unhandled exception.Open: with all of that, the window does not show the game — on the earlier x86-64 host run it showed artefacts over intermittent audio, and on the arm64 runs nothing recognisable. Given the project already tracks a dark and broken world (#15, #258), this may be nothing new, in which case feel free to close this: a second data point on 128 GB with the arm64 route is all it is.
Happy to run anything specific. The machine reproduces in about a minute, both host architectures are built and ready, and memory pressure is not a factor at 128 GB.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:36:42Z.
Thanks for coming back and correcting this. Since both claims are withdrawn I am closing it. If you get new numbers, please open a fresh report.