mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5078] [Engine] strata tune auto reports "503 worker refused the request" when the engine aborts (CUDA OOM in prefill), and each experiment's crash fails the whole tune #2365
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#2365
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 @yudhanjaya on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5078
Environment
0.1.56-linux-x86_64-cuda-cuda13)--kv int8, vision on CPUWhat happened
strata tune auto <iq3_xxs launch config> --mode quickfails during the baseline measurement with:Cause, from
--work-dirlogsThe engine log ends with:
Just before it,
strata servereported "687 MiB of VRAM free with everything loaded", then "the layer split planned to keep 796 MiB free here after loading; 150 MiB are free, so 646 MiB went to something the plan did not count". The next prefill allocation then failed.Problems
tune autodoesn't add one. With a desktop on the main GPU, the baseline aborts. The same config works with--vram-reserve-mib 2304set in the launch preset'sextra.--trim-stage-weightscandidate's engine died during load, and the user saw the same 503 message. The cause is unclear: the log stops at "GPU 0: NVIDIA GeForce RTX 3080" with no error. The 3080 showed only 3.71 GiB free at that point, against 5.28 GiB earlier, so the previous engine's VRAM may not have been released yet (unconfirmed).--work-diris not the default, so by default the crash evidence is lost.Suggested fixes
--vram-reserve-mib, not RAM.tune autoraise the reserve on GPUs that also run a desktop, or warn when free VRAM after load is below the plan.spec3("left the PC with too little free memory"), and wait for VRAM to be released between engine restarts.Repro
@github-actions[bot] commented on GitHub (Nov 3, 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
[GH-ISSUE #5078] strata tune auto reports "503 worker refused the request" when the engine aborts (CUDA OOM in prefill), and each experiment's crash fails the whole tuneto [GH-ISSUE #5078] [Engine] strata tune auto reports "503 worker refused the request" when the engine aborts (CUDA OOM in prefill), and each experiment's crash fails the whole tune@github-actions[bot] commented on GitHub (Nov 4, 2026):
Thanks, this follows the format now.
@yudhanjaya commented on GitHub (Nov 4, 2026):
Reproduced three more times on the same rig with a different model:
Repro, Strata 0.1.56 (control + engine
0.1.56-linux-x86_64-cuda-cuda13): RTX 3080 10 GB (helper) + RTX 4080 SUPER 16 GB (main), 62 GiB RAM,Qwen3.8-Flash-Next IQ3_S, 131072 context,
--kv int8, DFlash2.strata tune autoon that launch setup (quick) ended on the baselinethree times: "the worker refused the request (503): the engine stopped unexpectedly (exit code -6)". For the first the logs were already gone; for the other two
the engine log is the same as in the report above:
CUDA1: 168 MiB of VRAM free with everything loaded - LOW ... add --vram-reserve-later-mib 1300, thenggml-cuda (strata mmq): out of memory: cudaMalloc(&p, size)inggml_cuda_host.cu:127, on the nextrequest after the decode measurements (the prompt-speed request, as far as I can tell). Decode itself ran at 80-87 tok/s up to that point.
Findings:
serve.server) stays up when its engine dies and restarts it on the next request. So the tuner cannot use the worker's exitstate to tell a crash; the engine log is the only place that says why. (The worker's own hint, "usual cause is running out of RAM", was wrong here.)
strata tune auto --goal room:2304is meant to add--vram-reserve-mib 2304, but it only does so when the engine's--helplists the flag.--helpon 0.1.56 does not list--vram-reserve-mib(the string is in the binary, and a launch config that passes it starts fine), so the reserve wasdropped without a message and the next run crashed the same way. This is the same cause as #4652. Its probe set is
dimension_flags() | arm_flags(), and--vram-reserve-mibis a dimension intuning.py, so I expect that PR to fix--goal room:Nas well(not tested: I have not run it). My branch does not try to fix the flag list; it only says so when a requested reserve was not applied.
With the reserve put into the setup's arguments by hand (
--vram-reserve-mib 2304), the same tune completed in about 11 minutes.I have fixes for the points above on a local branch, not pushed yet (engine log decides the cause and quotes the engine's own advice; failed tunes keep their logs by default; a reserve that was asked for and not applied is reported). I will open a PR for this and link it here; the larger tuner changes I am working on I will raise in a separate [TUI] issue first.
Not fixed yet from the original list: a crashing candidate still stops the search when it is an out-of-memory (autotune.py: "the search stopped (nothing was retried)").
@yudhanjaya commented on GitHub (Nov 4, 2026):
The fixes for the points above are now on a branch of my fork, for review:
tuner-clarity(compare with main: 5 commits, based on the currentmain, no conflicts).The commits for this issue:
c3d70693: an out-of-memory baseline is classified as OOM and says what to lower; a stopped or failed tune (SIGTERM, SIGHUP, an exception) leaves a result instead of a status stuck on "running".0c26e53f: a crashed engine is explained by its own log (the CUDA out-of-memory line and the engine's own advice); a failed tune keeps the engine and worker logs by default and drops the run configs that hold the API key.80f8cda8: the log decides even though the worker stays up; a reserve that was asked for and not applied is reported.This is not a PR yet. I will send it as one if the maintainers are happy with it, or split or rework it as you prefer.
Validation: 320 tests in
tests/tuningpass on the bundled Python 3.12; four real tunes on one Linux CUDA rig (the first three hit this issue, the fourth completed once the reserve was in the setup). Not run: other backends, Windows, macOS, the desktop app's JavaScript tests. The path insideauto()that handles an unexpected exception has no automated test (it needs a real profile and engine); the signal handling and the log-keeping helpers do.@Niko1221 commented on GitHub (Nov 5, 2026):
Hello yudhanjaya,
Thank you for the report. In Strata 0.2.11, when the engine aborts during a tuning experiment, the error from the worker carries the last error lines of the engine log, an allocation failure is reported as out of memory, and one aborting candidate fails that candidate alone instead of the whole tune. If the base run itself aborts, the native line is named. Three of your points are not changed in this release: a bigger default VRAM reserve, keeping the engine log by default, and waiting for VRAM release between restarts. If tuning still stops at the first crash on 0.2.11, please send the tune result and the engine log.
The Strata project