mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5401] [Engine] Metal: a conversation park/save copy aborts on a device allocation that stream_arena gave back (batch windows, 0.1.57-metal) #3222
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3222
Loading…
Add table
Add a link
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?
Originally created by @Spinoza0 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5401
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
Reproduction status
Reproduced locally
Strata version
Strata 0.2.11 · engine 0.1.57-metal
Graphics card, memory and system
Apple M4 Pro (integrated Metal, shared memory) · 48 GB RAM · macOS 27.0.1
Model, size and settings
Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS (experts' gate/up in IQ1_M) · 262144 context · batch window via tools/batch_interleave_test.py
What happened
The Metal engine aborts during a batch-window conversation park/save when the copy's target allocation was already given back by
Window::stream_arena:Expected: the park/save copy either re-materialises the given-back allocation or the purge skips regions a later copy can touch.
What decides it (measured on the same day, same build and commands)
tools/batch_interleave_test.py(the engine runs--batch 3itself; the config carries--vram-reserve-mib 1536, the engine's own #2065 advice at this context):0.1.57-metalat9f7d977d(+ a 3-file.metalpatch, see below):runtime.cppfetch/copy/purge path is unchangedffa80d73..9f7d977d(git diff empty); the same test passed 10/10 on 2026-11-03 underffa80d73, when the machine's memory was healthy.Full same-day numbers and every command: PR #4886's Validation, "Failed (2026-11-05, this revision, environment)".
About this tree's 3-file patch
These runs need the IQ1_M (type 29) expert kernels a stock build does not link yet for the GSQ-RCO IQ2_XS pack, so the tested tree is
main+ 27 lines of.metalinstantiations (PR #4886). That patch touches no host code and cannot reachruntime.cppor the park/save copy; the machine-state dependence above stays the variable. A stockmainshould reproduce this with any pack whose expert typesmainalready covers (e.g. an IQ3_XXS- or Q5_0-experts pack) under equivalent memory pressure — I have no such pack local, so I did not run that.Reproduce
main(9f7d977d) + PR #4886's three files,cmake -S metal -B build-metal -G Ninja -DCMAKE_BUILD_TYPE=Release -DMETAL_CPP_DIR=<metal-cpp>.--mmap-experts, experts on the SSD;--max-context 262144).STRATA_METAL_BATCH-freetools/batch_interleave_test.py --exe build-metal/strata --config <config> --extra "--vram-reserve-mib 1536".BGEN 1window right after the give-away with the line above. Not reproduced with 30+ GB free — same-day evidence, not a claim it cannot happen.Not tested
runtime.cpp.@github-actions[bot] commented on GitHub (Nov 6, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 7, 2026):
Thanks, this follows the format now.