mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1012] 0.1.39 serve: after an engine restart, waiting requests hang forever or fail with "list.remove(x): x not in list" #442
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#442
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 @Jackwwg83 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1012
Summary: after the server restarts a failed engine, requests that were already waiting for the control lines never finish. Others fail with
list.remove(x): x not in list. In our run, 5 requests stayed at "reading the prompt" for over 90 minutes./healthsaidloaded: true, and the GPU was idle.Version: Strata v0.1.39 (
6f32ec0), Linux, RTX PRO 5000 Blackwell 48 GB, IQ3_S,"parallel": 8.What triggers it: any engine exit while requests wait. In our case the trigger was the batch-window OOM from #997 (
verify: batch instantiate: out of memory) with 10 concurrent users.Server log
The last five lines repeat every 10 s until the clients disconnect.
Cause (from reading
serve/server.pyat v0.1.39)StrataEngine.restart()(line 577) restarts the engine by callingself.__init__(*self.spawn)(line 590) on the live object.__init__creates the admission state again (lines 507-512):slot_cv,waiting,wait_lens,ctl_epochand thectllock._take_control()(line 815) still waits on the oldctllock and the oldslot_cv. Nothing notifies or releases them again, so these requests hang (the 10 s heartbeats above)._take_control()runsself.wait_lens.remove(entry)(line 840) on the new, empty list. This raisesValueError: list.remove(x): x not in list, and the request fails.self.waitingalso ends up below zero.Possible fix: keep the admission state (locks, condition, wait list and counters) outside the part of
__init__thatrestart()runs again. Or, inrestart(), end every waiting request with an error before the engine starts again, so that clients can retry.@Niko1221 commented on GitHub (Oct 6, 2026):
Fixed in 0.1.40.1, thank you for the report and the cause. restart() no longer builds a new lock, condition variable and wait list: they are kept, so the waiting requests still own what they wait on, and the restart wakes them. A waiting request now goes on with the new engine, or ends at once with a 503 saying it was not sent, so the client can retry. There is no list.remove error and no hang. While testing we found a second wait: a long prompt being read when the engine died ended only after 300 s; it ends at once now. To update once: in your Strata folder run
git fetch originthengit reset --hard origin/main(the repository history was cleaned up today, so UPDATE.bat's normal pull refuses it this one time; after that UPDATE.bat works as before). The engine is the same as 0.1.40.