Server dies with V8 heap OOM (SIGABRT) while session warming is active
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- node.js, typescript
- Domaine
- performance
Piste de recherche
Start by reading the gist timeline to confirm the heap ratchet lines up with each warming cycle, then open packages/core/src/plugin/warming.ts and trace what a warming pass retains after it returns — the reporter points at the full session context being rebuilt and not persisted. Reproduce with "warming": true on a build matching 2.3.2 and take heap snapshots across two or three cycles (e.g. via the server's inspect port) to see whether the growth is in warming itself or in the reply path it triggers. Done looks like a demonstrated retention point plus either a fix or a size/throttle change to the warming interval, with the gist's RSS pattern no longer reproducing.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Description
OpenCode server v2.3.2 with "warming": true in opencode.json died with a JavaScript heap OOM four times today (2026-11-21, at 17:13 / 17:38 / 18:01 / 18:33), each time while a reply was generating (busySessionCount 1 / 1 / 2 / 2). With no user activity the server heap floors at ~2 GB and peaks at 4.3–4.7 GB; smaps at the peak is ~97% anonymous private dirty (Rss 4,060,184 kB, Pss_Anon 3,949,200 kB, Pss_File 18,009 kB), so it is V8 heap, not file cache.
Log correlation: warming session and scheduled session warming (interval="240000 millis") entries run every ~4 minutes across 10+ sessions, all day, every day. The session that was mid-reply at the 18:01 crash had warming generations at 17:49:15 / 17:53:15 / 17:57:15 / 18:01:15 and died 36 seconds after the last one. The same warming load ran from 11-11 to 11-20 with zero crashes; the crashes started the day after I upgraded the CLI to 2.3.2 and the desktop app that bundles the server. I cannot prove that upgrade is the trigger (no old builds left to A/B), but the growth tracks the warming cadence exactly: after each restart the heap starts at 0.15–0.84 GB and ratchets up with every warming cycle until it dies 24–32 minutes later.
My guess is packages/core/src/plugin/warming.ts: each cycle re-sends the full session context, the reply is not persisted, and the heap only grows. The crashing session had 26 messages, so it is not a "session got too big" spiral.
After I removed "warming" from the config (~18:36), the same server stopped ratcheting: RSS sawtooths 0.4–2 GB on real requests but returns to a ~0.85 GB floor. Only ~10 minutes of post-change data so far; monitoring continues.
Ruled out: kernel OOM killer, manual restart, config reload, and a second opencode serve --service on the same machine (that one stayed healthy for over a day; I did not check whether warming was active in it).
Evidence (unlisted gist): journal excerpts of the four restart diagnostics, the 1 Hz RSS curve with per-epoch floors/peaks, smaps_rollup at the peak, and the warming log timeline — https://gist.github.com/MorningStar0709/c8e53eb59286765144e202f2f6c6d9b8
Plugins: session warming (core, enabled via config). The same server process also loads billion-context, @openchamber/opencode-search-providers and two local plugins; I list them for completeness — the growth pattern (ratchet between warming cycles, sawtooth otherwise) points at warming.
OpenCode version: 2.3.2 — the server binary is the one bundled by the OpenChamber 2.7.3 desktop app; not reproduced with a standalone CLI-launched server.
Steps to reproduce
"warming": truein opencode.json- Let a few sessions be warmed (or just leave them idle)
- Within about an hour the server dies:
FATAL ERROR: ... Allocation failed - JavaScript heap out of memory
OS: Linux
Terminal: none (server process, no TTY)
Questions: is this a known issue? Could warming skip or throttle sessions with large contexts, or free the per-cycle context afterwards? A size-aware interval would also help (core has a global warming.interval; openchamber/openchamber#5955 asks for a per-session one).
- Langage dominant
- TypeScript
- Étoiles
- 227k
- Forks
- 30.7k
- Merge moyen
- 3 h 57 min
- PR mergées (30 j)
- 484
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de anomalyco/opencode
-
[Site] Active section detection should respect scroll-margin-topPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertearea/web reproduced type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
anomalyco/opencode#65384 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area/cli type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
anomalyco/opencode#65379 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hoursOuvertearea/core platform/linux type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
anomalyco/opencode#65254 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
inference/go type/feature
Difficulté 1/5 1-3 heures Accessibilité débutants 72/100
anomalyco/opencode#65148 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area/providers type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
anomalyco/opencode#64845 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode
Issues similaires
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertecatalog provider provider-compatibility
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
lidge-jun/opencodex#9037 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Project submission: xmcp DocsOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
Les mainteneurs répondent en général sous 1 jour
-
effort:S P3 refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
nightscout/nocturne#3735 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Les mainteneurs répondent en général sous 2 jours