mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5744] Writer lease with null hostId permanently blocks boot until manually deleted #3175
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#3175
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 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5744
Originally assigned to: @Romuromylus on GitHub.
A file-backed-store writer lease whose record carries
hostId: nullcan never be reclaimed, and it blocks server boot permanently until someone deletes the lease file by hand.Observed on a v2.4.4 build (the
eng-5405checkout'spackages/server/dist, source read atpackages/server/src/db/file-backed-store.ts:1198-1209in that tree — line numbers may have drifted on staging).writerLeaseBelongsToCurrentHostevaluatesBoolean(CURRENT_HOST_ID && record.hostId === CURRENT_HOST_ID), so a lease record with a nullhostIdfails the comparison for every host, forever. Current builds write a properhostIdand self-reclaim fine — the poisonous records come from older builds or crash paths that persisted the lease without one.How it was hit: a playtest data directory carried a stale lease from a force-killed process (PID long dead, lease dated two weeks back,
hostId: null). Every subsequent boot refused with the lease-held error; the process it named no longer existed and no restart could ever clear it. Deleting the lease file per the error text resolved it, and the replacement lease self-reclaims normally.Suggested shape of a fix: treat a null-
hostIdlease as reclaimable when it is provably stale (the same PID/age staleness test the reclaim path already trusts for same-host leases), or migrate null-hostIdrecords on read. Either closes the trap; today the only exit is manual file surgery, which the error message does describe but which shouldn't be the only path out of a crashed older build.@Romuromylus commented on GitHub (Sep 3, 2026):
Fixed by #5799, squash-merged to staging as
7195a3f5ab. A writer lease withhostId: nullis now reclaimed on its own when the data directory sits on a filesystem only this machine can mount: an earlier boot or the container liveness check always counts, and the exited or reused PID checks count once the lease records the same PID namespace. Leases on network or shareable storage keep the manual removal path described in the error. Translated troubleshooting docs are tracked in #5800.