mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4792] [CLOSED] [Engine] serve: a failed engine start no longer crashes when another thread closed the process #5182
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#5182
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4792
Author: @sdroege
Created: 10/31/2026
Status: ❌ Closed
Base:
main← Head:fix-serve-restart📝 Commits (1)
74debb2serve: a failed engine start no longer crashes when another thread closed the process📊 Changes
1 file changed (+11 additions, -9 deletions)
View changed files
📝
serve/server.py(+11 -9)📄 Description
Problem and result
After an engine abort,
StrataEngine.restart()calls__init__()again. If another thread had already calledclose()and setself.proctoNone, the failed-start cleanup dereferenced it:A recoverable engine abort (exit -6 after a GPU hang) became a 400 and a stopped server. After the fix the same abort restarts the engine normally.
Related discussion
none
Approach
Keep the spawned process in a local (
proc = self.proc) and use it in the failed-start cleanup, withNoneguards. If another thread has already closed the process, the cleanup is skipped. No behaviour change otherwise.Validation
Passed:
python -m py_compile serve/server.pypasses.Failed:
Not run:
Limits
This only prevents the
AttributeError; it does not change the engine's behaviour or the GPU hang itself.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.