#6153 [GUI] App Host dies with V8 "Reached heap limit" (JS heap OOM) after ~9 h uptime — repeatedly on Arch Linux

closed · @archlinux-kde · 3 comentários · No GitHub

AMD / HIPModels & quantsWindowsLinux

Descrição

Hi! First of all, thank you for Strata — it runs beautifully on my AMD Ryzen 9 5900HX + RX 6800M laptop. I keep hitting one crash though, and since it has now reproduced several times over the past weeks, I thought I'd report it with all the details I could gather. Please tell me if anything is missing. 🙂

## Problem

The desktop's **App Host** (the bundled Node server, `host/server/index.mjs`) aborts with a V8 **heap** out-of-memory after several hours of normal uptime. The desktop loses its backend until restart, while the machine itself still has plenty of free RAM — so it is *not* the system OOM killer; the V8 heap limit is what's being hit.

## Environment

- Strata desktop **0.2.13** (AUR `strata-app`, newest on AUR as of 2026-11-17), Control **0.1.59**, inference engine **0.1.59-linux-x86_64-hip-rx6000**, bundled **Node v24.12.0**
- Crashing process: `/usr/lib/Strata/node/node /usr/lib/Strata/host/server/index.mjs`
- **Arch Linux** (rolling), kernel `7.3.4-arch1-1`, KDE Plasma + Fcitx5
- **AMD Ryzen 9 5900HX + Radeon RX 6800M** (Navi 22, vulkan, 8 GB VRAM), 8 cores / 64 GB RAM ("8 cores / 62 GB" per the app's own startup banner)
- Model/quant: Qwen3.8-Flash-Next **IQ3_S** pack (~84 GB GGUF), engine auto RAM-residency (~42 GiB resident), 128k context; no custom `NODE_OPTIONS`

## Reproduce

- No short sequence yet — it happens by itself during ordinary desktop use. Typical session: app open, chat/agent use through the day, model loaded; the host heap grows steadily and the crash lands after roughly **9.5 h of host uptime** (`34,027,334 ms` at the last crash).
- Reproduced by me **4 times in 9 days**: `coredumpctl` shows SIGABRT cores of `/usr/lib/Strata/node/node` on **11-09, 11-10, 11-12 and 11-17** (Nov 2026), and the 11-10 crash shows the same `node::OOMErrorHandler` signature.
- Crashes are this far apart only because the host lives long: the attached diagnostics show **12 successful model loads over ~4 days** before the host died.

## Expected

The App Host keeps serving for days, like the rest of the stack does; heap growth from ordinary sessions should stay bounded (fresh host RSS is only ~190 MB).

## Actual

The process aborts — the desktop shell logs:

```
[shell] The App Host stopped (signal 6 (abort)). The last lines it printed are in ~/.local/share/strata/logs/desktop-20261117-010415.log
```

The host's last lines (journal at crash time, 2026-11-17 18:31 CST):

```
34027334 ms: Mark-Compact 3782.8 (4099.8) -> 3781.0 (4100.1) MB, ... task; scavenge might not succeed
34029554 ms: Mark-Compact 3782.7 (4100.1) -> 3781.4 (4100.6) MB, ... task; scavenge might not succeed
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
```

The heap sits exactly at Node 24's default ~4 GB old-space ceiling, and repeated full GCs reclaimed only 1–2 MB each time — so it smells like a slow leak or an ever-growing structure, not one huge request.

## Evidence

**Attached:** `strata-diagnostics-2026-11-17T13-00-47.txt` (Settings → Engine → Diagnostics → Save logs). The desktop run log inside it reproduces the FATAL block and the native stack trace verbatim. 

**Search context:** the only issue mentioning a V8 "heap limit" is **#5180** (closed) — the Windows preview-sidebar WebView2 renderer, a different process with a different trigger. The open App Host issues (#5280 stale host on reload, #5547 CJK startup crash, #5577 readiness timeout) don't cover this either; I couldn't find an existing report of the App Host itself dying from its V8 heap cap after a long uptime on Linux.

**Reproduction status:** reproduced locally (4 observed crashes on my machine, 2026-11-09 / 11-10 / 11-12 / 11-17).

## Questions
Would it make sense for the packaged App Host to set a larger default heap (e.g. `--max-old-space-size=8192`), or to respect `NODE_OPTIONS`, for long-running desktop use on big-RAM machines?

## Current workaround

Restarting the host server with `NODE_OPTIONS="--max-old-space-size=8192"` — it just raises the ceiling and delays the same crash, so I'd love to find the actual growth source.

Thanks a lot for reading! Happy to run anything that helps.

[strata-diagnostics-2026-11-17T13-00-47.txt](https://github.com/user-attachments/files/34975786/strata-diagnostics-2026-11-17T13-00-47.txt)

No site

Links install, modelos, releases.