mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5655] Server needs a freeze detector: an OS-frozen Termux host leaves zero log evidence #3133
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#3133
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 (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5655
Originally assigned to: @kolacheee on GitHub.
What happens
When Android freezes a backgrounded Termux process (the cached-app freezer / vendor app-sleep), the server leaves zero log evidence: an idle server at the default
warnlevel logs nothing, every timer simply stops firing, and after the thaw everything resumes as if nothing happened. Support threads then can't distinguish "server was frozen" from "server crashed" from "network problem" — we just diagnosed exactly this in a live report (endless "Opening chat…" until Termux was foregrounded; see also #4956, same signature).The fix
An always-on,
unref()'d ~60-second tick that compares wall-clock time against the expected interval andlogger.warns with the measured gap whenever a tick arrives more than ~2× late. The sandbox protocol already implements this exact pattern for its own purposes (shouldGrantSandboxResumeGraceinpackages/server/src/services/extensions/sandbox-protocol.ts~line 45) — generalize it into a small server-wide freeze detector.That turns every future freeze into timestamped positive proof in the session log (
start-termux.sh's tee captures it), and cleanly separates freezes (gap + resume burst) from kills (log just ends) in user reports.Why it matters now
The battery-efficiency waves (correctly) removed the ambient 2-second polling that used to keep vendor freezers from classifying Termux as dormant (PR #4643's background-tab poll, PR #4723's
.envstat-poll), so freezes on aggressive devices are now reachable in normal use — and today they're invisible in every artifact users can send us.Related: wake-lock status surfacing and client-side unreachable UX are filed separately (see cross-references).
@kolacheee commented on GitHub (Aug 29, 2026):
Termux background-freeze follow-up family (from the 2026-08-30 triage; verdict: the battery-efficiency waves removed the ambient polling that had kept vendor freezers from classifying backgrounded Termux as dormant — see #4956 for the first field report): #5655 server freeze detector, #5656 wake-lock surfacing, #5657 client unreachable-state UX, #5658 checkVersion fetch leak, #5659 TROUBLESHOOTING corrections.
@kolacheee commented on GitHub (Aug 29, 2026):
Taking this together with #5656 (kolacheee + Claude agent) on branch feat/5655-5656-freeze-observability as the freeze-observability PR; draft PR to follow.