mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4824] [TUI] strata launch: a runtime host left in "failed" blocks the start after tuning, and --save-preset is lost #2215
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#2215
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 @gdevenyi on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4824
Area
[TUI] (the Terminal:
strata launch)Desktop app, Terminal or source?
Terminal (
strata launch).What happened
A
strata launchwith thorough tuning finished tuning, then failed to start the server. The launch preset named by--save-presetwas not saved. I ran nothing else during this launch.Three things go wrong together:
stop_own_server_for_tuningandRunner.startstop a server only in statereadyorstarting(strata_cli/launch/runner.py:1635,:1796)._stop_allalso handlesfailedandstale(strata_cli/launch/cmd.py:499). A runtime host still alive infailedis therefore skipped twice, andruntime.startthen refuses it atstrata_control/runtime.py:308-309. Here that came after a tune that can take up to 2 hours.--retunein the command, measure everything again.store.saveruns only afterrunner.run()succeeds (strata_cli/launch/cmd.py:855-859), so a failed start drops--save-preseteven though the tuning result exists.The host that stays alive after its server exits is #4574. This report is about what
strata launchdoes when it meets one.Smallest steps or command that reproduce it
The real run:
A reproduction of the mechanism, with no GPU. It uses the fake engine and tokenizer from
setUpintests/terminal/test_runtime.py, in a throwaway folder:runtime.start(name, wait=60).child_pidinruntime.status).Runner.stop_own_server_for_tuning, then the realRunner.start, on a stand-in object with the other launch steps stubbed. Tuning itself is not run.Output:
Step 6 shows that the failed start's own cleanup (
end_failed_start) removes the host. So the blocker is gone after the error, a second start works, and looking for it afterwards finds nothing.Reproduction status
c62d5e3a: the same error text, through the steps above, using a killed server to create thefailedstate.failedhost caused the real failure. I did not capture its state before the error. The output fits: it has no "Stopping the model to measure" line and no "already running; restarting" line, so neither check saw areadyorstartingserver. From reading the code, the tuner does not start a runtime host itself, so such a host would have to come from an earlier launch of this preset. I have not confirmed that either, or why its server exited.strata launch --statusalso hides this host, because it lists onlyreadyandstarting(strata_cli/launch/cmd.py:613).Suggested fix
_stop_alldoes, so the problem cannot appear after a long tune. A stop from another process may return before the host has released its lock (unconfirmed static analysis), so the start should wait for the lock.--save-presetonce the choices and tuning result exist, or save it on a failed start too, so the next run does not lose them.--retunewithout saying it will measure again.Fixing #4574 would stop most of these hosts appearing, but items 2 and 3 are needed either way.
Strata version
Engine 0.1.55, from the output. The Terminal version on that machine was not recorded. The reproduction ran from a source checkout at
c62d5e3a(0.2.9).Graphics card, memory and system
2x RTX 6000 Ada Generation 48 GB, 512 GB RAM. OS not recorded. The reproduction ran on a different Linux machine and used no GPU.
Model, size and settings
Qwen3.8-Flash-Next IQ3_S, 256K context, pictures on,
--parallel 8, as in the command above.Logs
The output above is what I have. I did not keep the runtime host or server logs from the real run.
Written with AI assistance (Claude Code). I checked the code references against the commit named and ran the reproduction shown.