Server dies with V8 heap OOM (SIGABRT) while session warming is active
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 227k
- Fork
- 30.7k
- Merge trung bình
- 3 giờ 57 phút
- Pull request đã merge (30 ngày)
- 484
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
[Site] Active section detection should respect scroll-margin-topCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea/web reproduced type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#65384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/cli type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#65379 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hoursĐang mởarea/core platform/linux type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anomalyco/opencode#65254 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
inference/go type/feature
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#65148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/providers type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#64845 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởcatalog provider provider-compatibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
lidge-jun/opencodex#9037 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: xmcp DocsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3735 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Maintainer thường phản hồi trong vòng 2 ngày