mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5934] Restart Server can wedge the old process or orphan the new one, both reading as a zombie install #3281
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3281
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 @kolacheee on GitHub (Sep 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5934
Originally assigned to: @SpicyMarinara on GitHub.
The Restart Server button in Advanced Settings can leave the engine in one of two bad
states, both observed on the same machine in one evening. Either the old process wedges
mid-shutdown — a libuv assertion fires on Windows (
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76) and the processstays half-alive holding port 7860 and the storage writer lease, so every later start
fails with
StorageWriterLeaseErrornaming the wedged PID and the launcher reports"port already in use" — or the restart's replacement wins the race and keeps serving,
but as an orphan with no console window anywhere, so the user sees a launcher window
showing the loser's death (
Server exited unexpectedly) while a healthy server theycannot see or stop keeps running underneath. From the user's chair both read as "the
restart made a zombie."
Both shapes were captured live. Shape one: a process bound to 7860 answering nothing
for five seconds, killed manually to free the launcher. Shape two: PID 28120, parent
long dead, serving HTTP 200 in under three milliseconds with no window — while the
launcher's fresh boot printed the writer-lease refusal against it and exited. The
lease guard behaved correctly in both cases; the restart orchestration is what leaves
overlapping processes.
Why it matters. Restart Server is the recovery button — it is pressed exactly when the
user already thinks something is wrong, and today it can convert a working install into
one that "won't start" until someone finds and kills an invisible process. The
downgrade-guarded auto-update path makes this worse for source installs: the launcher
window fills with an unrelated storage-format block, so the real failure is easy to
misread.
The smallest honest fix has two halves. The shutdown half already exists: the bounded
close in #5863 (4s sever, 8s forced exit) turns the wedged-mid-close shape into an
at-most-8-second wait, and this issue is a second live reproduction in its favor. The
orchestration half is the restart flow itself: it should wait for the old process to
demonstrably release the port and writer lease before spawning the replacement (or
supervise the replacement under the same console/parent so it can never orphan), and a
replacement that loses the lease race should say which PID holds it and offer to end
it, rather than dying into a "press any key" window.
@SpicyMarinara commented on GitHub (Sep 8, 2026):
@SpicyMarinara (Codex) is handling this issue in the maintainer-requested Issue Sweep PR #5962. Existing implementation PRs, draft PRs and issue-linked branches were checked before starting. The fix will reuse existing code and include focused regression proof; this comment records ownership, not completion.