mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5389] [Issue]: Stale storage lock prevents recreated Docker container from starting #2985
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#2985
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 @NeoKazuya on GitHub (Aug 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5389
Originally assigned to: @SpicyMarinara on GitHub.
Summary
While Marinara is running, it creates
/app/data/storage/.writer-leaseto stop two processes from writing to the same data folder at once. If a Docker container stops before Marinara removes that lock, a replacement container can have a different hostname while reusing the same internal process number (PID). The current lock check then cannot confirm that the old container is gone, so the replacement refuses to start.Expected behavior
When the old container is gone and Marinara can safely verify that, a replacement container should start without requiring manual lock removal. It should still refuse to start if another process or container may actually be using the same data folder.
Actual behavior
The old lock recorded PID 14 and the hostname of the previous container. The recreated container received a new hostname but also ran as PID 14. Because PID 14 was already running again inside the replacement, the current lock check could not confirm that the previous container was gone. Every startup attempt failed with
StorageWriterLeaseErroruntil the stale lock was removed manually.Steps to reproduce
/app/data.StorageWriterLeaseErrorfailures even though the old container no longer exists.Environment
stagingat source revision57e29c8b63c4fb19bbffe027ef299966e8b6752c; originally observed at9a810f64edb131c21735616f8fdce5265440af39/app/dataLogs, screenshots, or video
The old and replacement containers had different hostnames but both used PID 14. The replacement repeatedly exited during server bootstrap.
The same failure was reproduced on current
stagingwith a disposable Docker volume. The old and replacement containers had different hostnames but both used PID 13. The replacement exited with code 1 and left the old lock unchanged.After recovery, the replacement container remained running with restart count 0, listened on
0.0.0.0:7860, and created a new lock containing PID 14 and its current hostnamee0c30d54b5ba.Additional context
The storage lock added in #5014 requires manual recovery when Marinara cannot verify that the previous process has stopped. Recreating the container triggered that fallback, so
.writer-leasehad to be removed manually.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 22, 2026):
Thank you for the PR. <3