mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6360] [Issue]: file-backed-shutdown regression passes every check, then sometimes hangs at exit until the 30 s timeout #3555
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#3555
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 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6360
Summary
scripts/regressions/file-backed-shutdown.regression.tssometimes passes every one of its checks and then does not exit. The runner kills it at its fixed 30 second budget and the whole node regression lane goes red. It has done this on the first CI run of three unrelated pull requests (#6323, #6336, #6345) and once locally, and it passes when run again.Expected behavior
The regression exits as soon as its last check has passed. Alone it takes about half a second.
Actual behavior
The last lines before the timeout are always the final two success messages, so nothing in the test failed. The process simply stays alive:
Run on its own right afterwards, on the same tree:
Something keeps the event loop open after the last store is closed, and only some of the time. That points at a handle one of the eight
createFileNativeDB()stores in the file leaves behind (a timer, a lease heartbeat, a pending flush) rather than at anything the test asserts.Steps to reproduce
pnpm regression:nodeonstaging, ideally on a busy machine (the local occurrence happened while two other check runs were using the CPU).file-backed-shutdown.regression.tsprints its last success line and then sits until the 30 second timeout.Environment
staging(seen between 2026-09-18 and 2026-09-19, latest ond71106851plus local changes that do not touch the file store)Logs, screenshots, or video
See the excerpt above. The CI occurrences were the first node-lane runs of #6323, #6336 and #6345; each passed when re-run or when the next push restarted CI.
Additional context
Leads, not conclusions:
close()is made to reject on purpose (await assert.rejects(db._fileStore.close(), expectedFailure)). If a store that fails to close keeps a timer or its writer lease heartbeat alive, the process would hang exactly like this, and only when that timer happens to be armed at the moment the script ends.process.getActiveResourcesInfo()printed at the end of the script (or--trace-exitstyle logging of open handles) on a hung run would name the handle directly.unref()on, or clearing of, whatever the failed close leaves behind.Related: #6353 is the other recurring CI flake from the same two days (a browser heap budget), filed separately because it has nothing in common with this one.
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 19, 2026):
I am taking this in #6359. Owner: @SpicyMarinara, assisted by Codex. I will trace the remaining handles and add a regression for the shutdown lifecycle rather than mask the hang with process.exit.
@SpicyMarinara commented on GitHub (Sep 19, 2026):
Merged to staging in #6359. The shutdown fixture now uses production logging to avoid the unrelated asynchronous pretty-logger worker and asserts that every store releases its beforeExit hook, including failed closes. No force-exit was added. The original intermittent hang did not reproduce in 125 local stress runs, so this is a fixture mitigation with an explicit reproduction gap.