mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2496] [Engine] serve drops the connection when the engine program cannot be started #1013
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#1013
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 @devYRPauli on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2496
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
When the server cannot start the engine program, the request that starts the engine gets no HTTP answer. The client sees a closed connection with no status line. This happens on a lazy first load and on a restart after the engine stopped.
Any
OSErrorfromsubprocess.Popentakes this path. Three examples:FileNotFoundError).PermissionError).OSErrorat thesubprocess.Popenboundary.Expected: a 503 with the reason. An engine that exits before READY already gets one (#1527). The comment above
raise EngineDiedinStrataEngine.__init__asks for the same result.I re-tested each of the three cases on 0.2.0-beta (
3d1fb480) with 6 requests: chat, messages and responses, streamed and not.RemoteDisconnected.FileNotFoundError,PermissionErrororOSErrortraceback for each request./healthstill reportsstatus: ok.Cause:
StrataEngine.__init__callspopen()with no handler. TheOSErrorpasses throughrestart(), which catches onlyRuntimeError, and throughService.ensure_loaded(). The request handler'sexcept OSErrorbranch recordsdisconnectedand re-raises, sosocketservercloses the socket. On this path__init__also never sets theloadingevent and never closesself.log.PR #2497 fixes this and contains 0.2.0-beta. I ran the same 18 requests on its head (
e7680b9d7). All 18 get a 503 with the reason, for examplethe engine could not be started: [Errno 2] No such file or directory: '/no/such/strata'. No narrator thread stays alive, and the log handle is closed.Smallest steps or command that reproduce it
Save this as
repro.pyin the repo root and runpython repro.py. It needs no GPU and no engine build.On 0.2.0-beta (
3d1fb480) the script prints this line:Reproduction status
Reproduced locally
Strata version
Strata 0.2.0-beta, tag v0.2.0-beta, commit
3d1fb480. serve/ only, no engine build.Graphics card, memory and system
No GPU used (the engine never starts). Apple M1 Pro, 16 GB RAM, macOS 27.0.1, Python 3.12.14
Model, size and settings
None. The failure happens before a model loads.
Logs
The server output for one request on 0.2.0-beta:
@qiuzan2001 commented on GitHub (Oct 15, 2026):
Reproduced on Linux with main
296b59d2(Python 3.14, no GPU needed). The test that #2497 adds (serve/test_ready_timeout.py,SpawnFailure, an engine path that does not exist) fails on main'sserve/server.pywithRemoteDisconnected: Remote end closed connection without responseon all 4 requests, and passes on #2497's branch (python -m unittest serve.test_ready_timeout: 3 tests OK).@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@devYRPauli commented on GitHub (Oct 19, 2026):
/reopen
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Reopened, thank you. A maintainer will pick it up from here.