mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5062] [Issue]: Orphaned dev server blocks the next launch with a storage writer lease #2802
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#2802
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 @SpicyMarinara on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5062
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Stopping
pnpm devthrough a terminal, IDE, or supervisor can leave the nestedtsxserver alive. That orphan keeps the storage writer lease, so the next launch fails during bootstrap instead of opening Marinara Engine.Expected behavior
Stopping a development session should terminate its complete server/client process trees. Starting
pnpm devwhile a healthy Marinara server is already running should reuse it and start the client without attempting a conflicting second storage writer.Actual behavior
The dev supervisor signals only its immediate
pnpmchildren. Nested watcher/server processes can survive and retainpackages/server/data/storage/.writer-lease. A subsequent launch then exits withStorageWriterLeaseError: Another Marinara Engine process ... may be using .../storage.Steps to reproduce
pnpm dev.SIGTERMonly to thenode ./scripts/dev.mjssupervisor, as an IDE or parent process may do.tsx watch, server, Vite, and esbuild descendants remain alive and the health endpoint still responds.pnpm devagain.Environment
Logs, screenshots, or video
A focused local reproduction confirmed that terminating only the current dev supervisor left the entire descendant process group and
/api/healthserver alive; terminating that process group stopped it.Additional context
The storage lease itself is working as intended and must continue preventing concurrent writers. The fix belongs in the dev launcher lifecycle: own/terminate complete child process groups and safely reuse a verified healthy Marinara server on the configured port.
Follow-up to the storage writer safety introduced in #5014.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Aug 15, 2026):
Claimed by @SpicyMarinara / Codex. I reproduced the orphaned-process path on macOS: sending SIGTERM only to the dev supervisor left its nested server/client process group alive and the health endpoint responding. I am preparing a focused launcher fix against staging that preserves the storage writer safety lock.
@SpicyMarinara commented on GitHub (Aug 15, 2026):
Implemented in draft PR #5064. Proof: before the patch, supervisor-only SIGTERM left the nested server/client process group and health endpoint alive. After the patch, the same signal stopped both child groups and released .writer-lease. A second isolated dev launch reused the verified healthy server, started only a client, and kept exactly one server/storage writer. pnpm regression:launcher-update and pnpm check both pass locally.
@SpicyMarinara commented on GitHub (Aug 15, 2026):
Recurrence confirmed and reclaimed by @SpicyMarinara / Codex. The original SIGINT/SIGTERM cleanup works, but a terminal hangup can kill
scripts/dev.mjswhile its detachedpnpm -> tsx watchgroup survives. On macOS the orphaned group was reparented to PID 1, the server owner PID remained recorded in.writer-lease, and no healthy process listened on port 7860. I stopped only that verified orphan group and removed only its lease directory after confirming every member exited.I am extending the focused launcher lifecycle coverage to SIGHUP/terminal-close cleanup; storage writer exclusion remains unchanged.