Skip to content

fix(server): a hung tmux call or a big memory dedupe no longer freezes the tenant (v0.448.5) - #837

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/instawp-hang
Sep 22, 2026
Merged

vikasprogrammer merged 1 commit into
mainfrom
feat/instawp-hang

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

[0.448.5] - 2026-09-22

Fixed

  • Two synchronous paths could freeze a whole tenant's server. Both hit globex on 2026-09-22: /health
    dead, listen backlog full, no DB write for two hours. (1) Every tmux call in LocalSessionBackend is a
    spawnSync, and one send-keys -l (a task-reconcile poke-back) waited 1h55m on a tmux server reply that
    never came, holding every request, gate check and scheduler tick behind it. All tmux calls now time out
    after 5s (SIGKILL). A timed-out call reads as "unknown / not delivered", which every caller already
    handles. (2) Memory maintenance's planConsolidation normalised content inside its inner loop (n²/2
    regex passes). After the unblock, one agent's 5.2k vector-less memories pinned the process at 100% CPU for
    ~5 minutes. Content is now normalised once and exact duplicates come from a map, so a group with no
    vectors is linear: 13.8s → 65ms at that size, with identical merge plans. maintain also yields between
    groups. Pinned by scripts/event-loop-freeze-test.cjs.

Test: scripts/event-loop-freeze-test.cjs (in test:governance) — fake hanging tmux bounded; plan equivalence vs the original algorithm on 120 random groups; 5.2k-row wall-clock bound.

🤖 Generated with Claude Code

…s the tenant (v0.448.5)

Every tmux spawnSync in LocalSessionBackend is now bounded (5s, SIGKILL): one send-keys held a live
server for 1h55m. planConsolidation normalises once and finds exact dups via a map, so vector-less
groups are linear (13.8s -> 65ms at 5.2k rows, identical plans); maintain yields between groups.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vikasprogrammer
vikasprogrammer merged commit e7a93d9 into main Sep 22, 2026
1 check passed
@vikasprogrammer
vikasprogrammer deleted the feat/instawp-hang branch September 22, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant