mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6010] [Issue]: Stale writer lease sometimes prevents server restart #3329
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#3329
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 (Sep 9, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6010
Originally assigned to: @SpicyMarinara on GitHub.
Summary
On the latest staging build, Marinara Engine occasionally retains a storage writer lease after the server is stopped, preventing the next server startup. The issue is rare and appears after stopping via Ctrl-C in Termux or the in-engine Restart Server button.
Expected behavior
When Marinara Engine shuts down or restarts, it should release the storage writer lease, or automatically reclaim it when the previous process is no longer running, so the server can start without requiring a device reboot.
Actual behavior
The server sometimes fails to start with a StorageWriterLeaseError stating that another Marinara Engine process is using the storage directory. The lease remains uncleared until the phone is fully restarted; after reboot, Marinara Engine successfully detects and reclaims the stale lease.
Steps to reproduce
Environment
Logs, screenshots, or video
Server exited with status 1 during bootstrap: StorageWriterLeaseError: Another Marinara Engine process (PID 10036, host localhost) may be using /data/data/com.termux/files/home/Marinara-Engine/packages/server/data/storage. The error referenced storage/.writer-lease and occurred in FileTableStore.acquireWriterLease during server initialization. After a phone reboot, the server logged: {"previousPid":10036,"path":"/data/data/com.termux/files/home/Marinara-Engine/packages/server/data/storage/.writer-lease","staleReason":"boot","hostProof":"termux-home","msg":"[file-storage] Reclaimed the writer lease after detecting that the previous owner belonged to an earlier boot."}
Additional context
Observed rarely on the latest staging build and not deterministically reproducible. Support diagnostics reported the previous session as "unknown - another server instance is using this data directory" and recorded six sessions that ended without shutdown. The diagnostic also recorded a prior client chunk/render error, but its relationship to the lease issue is not established.
Discord thread: ME writer lease lock error still occurs rarely
Discord thread link: https://discord.com/channels/1417099416812392641/1547334668846891008
Requested by: Kuc0 (kuc0, Discord ID 108988150629531648)
Discord thread transcript (4 messages)
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 (Sep 9, 2026):
@SpicyMarinara is handling this report in draft PR #6011. Implementation and regression checks are in progress.