[GH-ISSUE #5838] [Issue]: Marinara Engine exits randomly during interaction without console errors #3220

Closed
opened 2026-10-21 06:00:44 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Sep 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5838

Originally assigned to: @kolacheee on GitHub.

Summary

Marinara Engine 2.4.4 intermittently stops while being used from a phone browser. The process disappears from the Linux console without an error, while the host computer remains running.

Expected behavior

Marinara Engine should continue running during interaction. If it terminates, the console should record a useful error or termination reason.

Actual behavior

At an inconsistent time, interaction from the phone browser fails with "failed to fetch" and Marinara Engine is no longer running. The console remains open with no error output, as if Ctrl+C had been pressed; restarting Marinara Engine succeeds immediately.

Steps to reproduce

  1. Start Marinara Engine 2.4.4 from a Linux console.
  2. Open Marinara Engine from an Android 10 phone using Chrome.
  3. Interact with Marinara Engine.
  4. On affected runs, observe the browser reporting "failed to fetch" and verify that the Marinara Engine process has stopped without console output.

Environment

  • Marinara Engine version: 2.4.4 (build 2.4.4+1a299369ac70; commit 1a299369ac)
  • Install type: Not provided
  • OS + version: Server: Linux 6.18.38-valve1-1-neptune-618-g9d69246eb796 (x64); client: Android 10
  • Browser or app shell: Chrome 152.0.0.0 on Android 10 (Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36)

Logs, screenshots, or video

No logs, screenshots, or video provided. The user reports no error in the console; the phone browser displayed "failed to fetch".

Additional context

The issue reportedly does not occur when Marinara Engine is left running overnight and appears limited to periods of interaction. It has occurred with and without YouTube running; the computer and console remain otherwise functional. Support diagnostics reported server memory heap 1124.9 / 4288 MiB and RSS 1841.9 MiB, with Aion active through openrouter using aion-labs/aion-3.0-mini.

Discord thread: ME keeps randomly closing or crashing?
Discord thread link: https://discord.com/channels/1417099416812392641/1545373718941794344
Requested by: kolache (k0lache, Discord ID 220320261780668416)

Discord thread transcript (4 messages)
[2026-09-04T10:03:26.251Z] Leytra: So I'm running on Linux console, works fine 
But the whole thing just randomly *stops* sometimes 
Not a consistent amount of time elapsed either.
Ill be using it through my phone browser and just get failed to fetch, go check the computer and me is just off.
No error print in the console, it's just off, same as id ctrl+c was pressed. The computer keeps running fine, the console is still open and everything, and me just boots back up instantly when I tell it to start again.
Is something killing the process somehow without closing the console or what?

This is really annoying to have to go back to a different room randomly.

Support diags here:

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+1a299369ac70
Commit: 1a299369ac70
Server OS: Linux 6.18.38-valve1-1-neptune-618-g9d69246eb796 (x64)
Server memory: heap 1124.9 / 4288 MiB; RSS 1841.9 MiB
Client OS: Android 10
Browser / app shell: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
GPU: ANGLE (ARM, Mali-G715, OpenGL ES 3.2)
Active connection: Aion
Connection provider: openrouter
LLM model: aion-labs/aion-3.0-mini
[Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545373718941794344]

[2026-09-04T10:03:27.184Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545373722855350292]

[2026-09-04T10:07:54.055Z] Leytra: Extra context if it helps: this doesn't seem to happen if left running overnight but only if im interacting with me.

No sign of things going wrong on the pc, have had it happen with nothing or with YouTube running, no notification or anything when the process stops
[Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545374842193318018]

[2026-09-04T12:22:26.209Z] kolache: @Professor Mari gh issue
[Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545408699260993566]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.

Root cause and fix (maintainer call, 2026-09-04)

The triage comment below fingerprinted the death as an external SIGKILL (every internal exit path on 2.4.4 logs before dying; only SIGKILL is silent), and the memory profile makes the killer clear: 2.4.4 predates the lazy chat-unit loading (#5597) and LRU eviction (#5603), so the server kept every chat ever opened resident — RSS ratchets upward during active use on a device whose 16 GiB is shared with the GPU and the running game, until the system kills the biggest non-game process. That also explains the timing signature exactly: overnight nothing new loads and it survives; active use grows the resident set and it dies. Maintainer decision: treat this as confirmed and fix it, rather than continuing per-user diagnosis.

This issue now tracks the fix: an engine-side platform default for the eviction cap. When MARINARA_MAX_RESIDENT_CHATS is unset (or invalid) and /etc/os-release identifies SteamOS, the server defaults the resident-chat cap to 8 — the same value the Termux launcher already exports for phones. An explicit value always wins: raise it, or set 0 to disable eviction entirely.

Engine-side rather than a launcher export, deliberately: the initial .env load never overrides inherited shell variables while hot reloads do, so a start.sh export would make a user's .env opt-out flap between boots and reloads. The engine-side default has no competing writer, covers every launch method (start.sh, systemd units, direct node dist/index.js), and is testable in the regression lane. Detection keys on ID=steamos (OS-wide, not Deck DMI sniffing — the failure profile is the OS's gaming workload, not the board), read once and cached.

For the reporter: once this merges, updating to the latest staging is the entire fix — no .env editing needed. Until then, updating to current staging and adding MARINARA_MAX_RESIDENT_CHATS=8 to the .env next to start.sh achieves the same thing manually.

Originally created by @SpicyMarinara on GitHub (Sep 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5838 Originally assigned to: @kolacheee on GitHub. ## Summary Marinara Engine 2.4.4 intermittently stops while being used from a phone browser. The process disappears from the Linux console without an error, while the host computer remains running. ## Expected behavior Marinara Engine should continue running during interaction. If it terminates, the console should record a useful error or termination reason. ## Actual behavior At an inconsistent time, interaction from the phone browser fails with "failed to fetch" and Marinara Engine is no longer running. The console remains open with no error output, as if Ctrl+C had been pressed; restarting Marinara Engine succeeds immediately. ## Steps to reproduce 1. Start Marinara Engine 2.4.4 from a Linux console. 2. Open Marinara Engine from an Android 10 phone using Chrome. 3. Interact with Marinara Engine. 4. On affected runs, observe the browser reporting "failed to fetch" and verify that the Marinara Engine process has stopped without console output. ## Environment - Marinara Engine version: 2.4.4 (build 2.4.4+1a299369ac70; commit 1a299369ac70) - Install type: Not provided - OS + version: Server: Linux 6.18.38-valve1-1-neptune-618-g9d69246eb796 (x64); client: Android 10 - Browser or app shell: Chrome 152.0.0.0 on Android 10 (Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36) ## Logs, screenshots, or video No logs, screenshots, or video provided. The user reports no error in the console; the phone browser displayed "failed to fetch". ## Additional context The issue reportedly does not occur when Marinara Engine is left running overnight and appears limited to periods of interaction. It has occurred with and without YouTube running; the computer and console remain otherwise functional. Support diagnostics reported server memory heap 1124.9 / 4288 MiB and RSS 1841.9 MiB, with Aion active through openrouter using aion-labs/aion-3.0-mini. Discord thread: ME keeps randomly closing or crashing? Discord thread link: https://discord.com/channels/1417099416812392641/1545373718941794344 Requested by: kolache (k0lache, Discord ID 220320261780668416) <details> <summary>Discord thread transcript (4 messages)</summary> ```text [2026-09-04T10:03:26.251Z] Leytra: So I'm running on Linux console, works fine But the whole thing just randomly *stops* sometimes Not a consistent amount of time elapsed either. Ill be using it through my phone browser and just get failed to fetch, go check the computer and me is just off. No error print in the console, it's just off, same as id ctrl+c was pressed. The computer keeps running fine, the console is still open and everything, and me just boots back up instantly when I tell it to start again. Is something killing the process somehow without closing the console or what? This is really annoying to have to go back to a different room randomly. Support diags here: Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+1a299369ac70 Commit: 1a299369ac70 Server OS: Linux 6.18.38-valve1-1-neptune-618-g9d69246eb796 (x64) Server memory: heap 1124.9 / 4288 MiB; RSS 1841.9 MiB Client OS: Android 10 Browser / app shell: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 GPU: ANGLE (ARM, Mali-G715, OpenGL ES 3.2) Active connection: Aion Connection provider: openrouter LLM model: aion-labs/aion-3.0-mini [Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545373718941794344] [2026-09-04T10:03:27.184Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545373722855350292] [2026-09-04T10:07:54.055Z] Leytra: Extra context if it helps: this doesn't seem to happen if left running overnight but only if im interacting with me. No sign of things going wrong on the pc, have had it happen with nothing or with YouTube running, no notification or anything when the process stops [Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545374842193318018] [2026-09-04T12:22:26.209Z] kolache: @Professor Mari gh issue [Discord message: https://discord.com/channels/1417099416812392641/1545373718941794344/1545408699260993566] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details. --- ## Root cause and fix (maintainer call, 2026-09-04) The triage comment below fingerprinted the death as an external SIGKILL (every internal exit path on 2.4.4 logs before dying; only SIGKILL is silent), and the memory profile makes the killer clear: 2.4.4 predates the lazy chat-unit loading (#5597) and LRU eviction (#5603), so the server kept every chat ever opened resident — RSS ratchets upward during active use on a device whose 16 GiB is shared with the GPU and the running game, until the system kills the biggest non-game process. That also explains the timing signature exactly: overnight nothing new loads and it survives; active use grows the resident set and it dies. Maintainer decision: treat this as confirmed and fix it, rather than continuing per-user diagnosis. **This issue now tracks the fix:** an engine-side platform default for the eviction cap. When `MARINARA_MAX_RESIDENT_CHATS` is unset (or invalid) and `/etc/os-release` identifies SteamOS, the server defaults the resident-chat cap to `8` — the same value the Termux launcher already exports for phones. An explicit value always wins: raise it, or set `0` to disable eviction entirely. Engine-side rather than a launcher export, deliberately: the initial `.env` load never overrides inherited shell variables while hot reloads do, so a `start.sh` export would make a user's `.env` opt-out flap between boots and reloads. The engine-side default has no competing writer, covers every launch method (start.sh, systemd units, direct `node dist/index.js`), and is testable in the regression lane. Detection keys on `ID=steamos` (OS-wide, not Deck DMI sniffing — the failure profile is the OS's gaming workload, not the board), read once and cached. **For the reporter:** once this merges, updating to the latest staging is the entire fix — no `.env` editing needed. Until then, updating to current staging and adding `MARINARA_MAX_RESIDENT_CHATS=8` to the `.env` next to `start.sh` achieves the same thing manually.
bsakaguchi 2026-10-21 06:00:44 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@kolacheee commented on GitHub (Sep 4, 2026):

Triage from the diagnostics and the 2.4.4 source. Three findings narrow this a lot, and there is a two-minute test that should settle it.

1. This is a Steam Deck

6.18.38-valve1-1-neptune is Valve's Neptune kernel — the server is running on a Steam Deck (SteamOS). That matters because the Deck has 16 GB of RAM shared with the GPU, and the engine is already sitting at RSS 1841.9 MiB at the moment the diagnostics were captured (heap 1124.9 MiB, so ~700 MiB of that is off-heap: the embeddings model, buffers). Memory pressure is a first-class suspect on this hardware in a way it would not be on a desktop tower.

2. The silence is itself the fingerprint

On 2.4.4 (1a299369ac70), every way the process can die from the inside prints something first, verified in packages/server/src/index.ts at that commit:

  • an uncaught exception / unhandled rejection logs a fatal error before process.exit(1)
  • SIGTERM and SIGINT log Received SIGTERM; shutting down Marinara Engine and then Shutdown complete
  • even a failed shutdown logs Shutdown failed

The reporter saw nothing — no error, no shutdown line, console intact. The only termination that produces zero output from the app is SIGKILL, which cannot be caught or logged. So something outside the process killed it. On Linux, an interactive-load-correlated SIGKILL is nearly always the kernel OOM killer or systemd-oomd responding to memory pressure — and "only when interacting, never overnight" matches that exactly, since pressure only spikes while the engine is actually generating (prompt assembly, vectorization, streaming).

One nuance: when a foreground process is SIGKILLed, bash normally prints a lone Killed line. It is one dull line under colourful engine logs, checked minutes later from another room — easy to miss, so its reported absence is weak evidence either way. The test below removes the ambiguity entirely.

3. The decisive test (runs on 2.4.4 as-is, no update needed)

The Linux launcher ends in exec node dist/index.js, so the exit status of ./start.sh is the server's exit status. Ask the reporter to:

a) Launch it like this from now on:

./start.sh; echo "Marinara exited with status $? at $(date)"

When it next dies, that line prints no matter how it died:

  • 137 = SIGKILL → confirms the kill theory, proceed to (b) to name the killer
  • 139 = segfault in a native module → run (d)
  • 143 = SIGTERM → something asked politely (and the engine's own shutdown lines should be right above)
  • a small number (0/1) = the engine exited by itself → different investigation, we would want the last log lines

b) Right after a death, ask the kernel who did it:

journalctl -k --since "-30 min" --no-pager | grep -iE -B2 -A8 "out of memory|oom"

A kernel OOM kill logs the victim, its RSS, and the whole memory situation. If this prints permission errors or nothing at all, put sudo in front (on a Steam Deck, sudo needs a password set once via passwd).

c) Check whether systemd-oomd is running, and if so, its log:

systemctl is-active systemd-oomd
journalctl -u systemd-oomd --since "-30 min" --no-pager

systemd-oomd kills earlier and more quietly than the kernel and does not show up in journalctl -k.

d) Catch native crashes, just in case:

coredumpctl list --since "-1 day" --no-pager

e) Context worth having: Desktop Mode or Gaming Mode, and whether a game was running when it died (a game claims a large slab of the shared 16 GB and makes the engine the biggest remaining target).

On updating to staging (#5797)

Not required for the above — Linux gives us better witnesses (journalctl, exit status, coredumpctl) than the postmortem does; that tooling exists precisely because Termux offers none of them. But updating is still worthwhile as a persistent witness: staging's diagnostics now report Previous session / Sessions ended without shutdown, and the 30-second heartbeat records RSS, so after a death the next boot shows the last-known memory from within 30 s of the kill — direct evidence for or against a memory spike even if journal logs rotate or the reporter forgets to check in time.

If it is confirmed OOM

Then the engine-side question becomes why RSS is at 1.8 GiB and what interaction spikes it (the file-backed store's known memory appetite under large data is the standing suspect — see #4730's family), and the user-side mitigations are the usual Deck ones (don't run it beside a heavy game, or add swap). But naming the killer comes first.

<!-- gh-comment-id:5540471548 --> @kolacheee commented on GitHub (Sep 4, 2026): Triage from the diagnostics and the 2.4.4 source. Three findings narrow this a lot, and there is a two-minute test that should settle it. ## 1. This is a Steam Deck `6.18.38-valve1-1-neptune` is Valve's Neptune kernel — the server is running on a Steam Deck (SteamOS). That matters because the Deck has 16 GB of RAM **shared with the GPU**, and the engine is already sitting at **RSS 1841.9 MiB** at the moment the diagnostics were captured (heap 1124.9 MiB, so ~700 MiB of that is off-heap: the embeddings model, buffers). Memory pressure is a first-class suspect on this hardware in a way it would not be on a desktop tower. ## 2. The silence is itself the fingerprint On 2.4.4 (`1a299369ac70`), every way the process can die from the inside prints something first, verified in `packages/server/src/index.ts` at that commit: - an uncaught exception / unhandled rejection logs a fatal error before `process.exit(1)` - SIGTERM and SIGINT log `Received SIGTERM; shutting down Marinara Engine` and then `Shutdown complete` - even a failed shutdown logs `Shutdown failed` The reporter saw **nothing** — no error, no shutdown line, console intact. The only termination that produces zero output from the app is **SIGKILL**, which cannot be caught or logged. So something outside the process killed it. On Linux, an interactive-load-correlated SIGKILL is nearly always the kernel OOM killer or `systemd-oomd` responding to memory pressure — and "only when interacting, never overnight" matches that exactly, since pressure only spikes while the engine is actually generating (prompt assembly, vectorization, streaming). One nuance: when a foreground process is SIGKILLed, bash normally prints a lone `Killed` line. It is one dull line under colourful engine logs, checked minutes later from another room — easy to miss, so its reported absence is weak evidence either way. The test below removes the ambiguity entirely. ## 3. The decisive test (runs on 2.4.4 as-is, no update needed) The Linux launcher ends in `exec node dist/index.js`, so the exit status of `./start.sh` **is** the server's exit status. Ask the reporter to: **a) Launch it like this from now on:** ```bash ./start.sh; echo "Marinara exited with status $? at $(date)" ``` When it next dies, that line prints no matter how it died: - **137** = SIGKILL → confirms the kill theory, proceed to (b) to name the killer - **139** = segfault in a native module → run (d) - **143** = SIGTERM → something asked politely (and the engine's own shutdown lines should be right above) - a small number (0/1) = the engine exited by itself → different investigation, we would want the last log lines **b) Right after a death, ask the kernel who did it:** ```bash journalctl -k --since "-30 min" --no-pager | grep -iE -B2 -A8 "out of memory|oom" ``` A kernel OOM kill logs the victim, its RSS, and the whole memory situation. If this prints permission errors or nothing at all, put `sudo` in front (on a Steam Deck, `sudo` needs a password set once via `passwd`). **c) Check whether systemd-oomd is running, and if so, its log:** ```bash systemctl is-active systemd-oomd journalctl -u systemd-oomd --since "-30 min" --no-pager ``` `systemd-oomd` kills earlier and more quietly than the kernel and does not show up in `journalctl -k`. **d) Catch native crashes, just in case:** ```bash coredumpctl list --since "-1 day" --no-pager ``` **e) Context worth having:** Desktop Mode or Gaming Mode, and whether a game was running when it died (a game claims a large slab of the shared 16 GB and makes the engine the biggest remaining target). ## On updating to staging (#5797) Not required for the above — Linux gives us better witnesses (journalctl, exit status, coredumpctl) than the postmortem does; that tooling exists precisely because Termux offers none of them. But updating is still worthwhile as a *persistent* witness: staging's diagnostics now report `Previous session` / `Sessions ended without shutdown`, and the 30-second heartbeat records RSS, so after a death the next boot shows the last-known memory from within 30 s of the kill — direct evidence for or against a memory spike even if journal logs rotate or the reporter forgets to check in time. ## If it is confirmed OOM Then the engine-side question becomes why RSS is at 1.8 GiB and what interaction spikes it (the file-backed store's known memory appetite under large data is the standing suspect — see #4730's family), and the user-side mitigations are the usual Deck ones (don't run it beside a heavy game, or add swap). But naming the killer comes first.
Author
Owner

@kolacheee commented on GitHub (Sep 5, 2026):

Field results after the merge, and the killer now has a name. Closing the loop on this issue's record even though it is closed:

The killer is Valve's holo-earlyoom

The reporter's sudo journalctl finally caught it in the act:

earlyoom[989]: mem avail:   270 of  5052 MiB ( 5.36%), swap free:  175 of 4716 MiB ( 3.73%)
earlyoom[989]: low memory! at or below SIGTERM limits: mem  5.42%, swap  8.48%
earlyoom[989]: sending SIGTERM to process 628334 "node-MainThread": oom_score 1004, VmRSS 2922 MiB, cmdline "node dist/index.js"
earlyoom[989]: process 628334 did not exit

That resolves every earlier anomaly: earlyoom is a userspace daemon (so journalctl -k was rightly empty — the kernel OOM killer never fired), and it kills a single process by oom_score (so the launching shell survived while node died). The SteamAppId noise in the log is cosmetic: Valve's kill-logger fails to attribute the kill to a Steam title because our process has no SteamAppId env var. It does not affect the kill decision at all — nothing about not being a Steam app caused this.

The hardware reframes the memory math

The reporter clarified they are not on a Steam Deck — this is SteamOS on an AMD BC-250 (PS5-family APU board), where most of the 16 GB GDDR6 is carved out as VRAM and the OS keeps roughly 5 GB. earlyoom's own measurement puts node at 2922 MiB RSS — 58% of system RAM — with 270 MiB left when it acted. (The reporter's system-monitor impression that "it can't be memory, there was no spike" is answered by the same log line: earlyoom triggers on the available-memory floor, not on a spike, and the steady growth was node.)

Worth noting: the ID=steamos detection from #5839 covers this box too — OS-wide detection rather than Deck DMI-sniffing was the right call.

The resident-chat cap was active and did not bound them

This session ran the merged build (ed324d7d6183) and still grew ~1.9 GB in 24 minutes. So for this user's data shape the memory bulk is not resident-chat count — the cap is necessary for the Deck-class case but not sufficient here. Interim mitigation relayed (same move the Termux profile makes with its 1024 MiB heap):

NODE_OPTIONS=--max-old-space-size=1536

in the .env next to start.sh. If it still OOMs with that set, it fails loudly with a JS heap trace instead of vanishing — either outcome is informative. The deeper "where do the gigabytes live" investigation is deliberately not being opened for this platform.

One genuine engine bug fell out of the log

earlyoom sent SIGTERM at 16:24:35; the reporter's shell wrapper recorded exit 0 at 16:25:14 — our graceful shutdown took 39 seconds, because shutdown() awaits app.close() without any bound and close waits on open connections (a phone browser holding an SSE stream). earlyoom's grace window is ~10 s; systemd and Docker have their own stop timeouts. On any of those, a slow close turns an orderly stop into a SIGKILL that drops debounced writes. Fix incoming as a small separate PR: a shutdown deadline that force-exits if close overruns, on every close path (signal shutdown + both update/admin restart routes).

<!-- gh-comment-id:5550979170 --> @kolacheee commented on GitHub (Sep 5, 2026): Field results after the merge, and the killer now has a name. Closing the loop on this issue's record even though it is closed: ## The killer is Valve's `holo-earlyoom` The reporter's `sudo journalctl` finally caught it in the act: ``` earlyoom[989]: mem avail: 270 of 5052 MiB ( 5.36%), swap free: 175 of 4716 MiB ( 3.73%) earlyoom[989]: low memory! at or below SIGTERM limits: mem 5.42%, swap 8.48% earlyoom[989]: sending SIGTERM to process 628334 "node-MainThread": oom_score 1004, VmRSS 2922 MiB, cmdline "node dist/index.js" earlyoom[989]: process 628334 did not exit ``` That resolves every earlier anomaly: earlyoom is a **userspace** daemon (so `journalctl -k` was rightly empty — the kernel OOM killer never fired), and it kills a **single** process by oom_score (so the launching shell survived while node died). The `SteamAppId` noise in the log is cosmetic: Valve's kill-*logger* fails to attribute the kill to a Steam title because our process has no `SteamAppId` env var. It does not affect the kill decision at all — nothing about not being a Steam app caused this. ## The hardware reframes the memory math The reporter clarified they are **not on a Steam Deck** — this is SteamOS on an AMD **BC-250** (PS5-family APU board), where most of the 16 GB GDDR6 is carved out as VRAM and the OS keeps roughly **5 GB**. earlyoom's own measurement puts node at **2922 MiB RSS — 58% of system RAM** — with 270 MiB left when it acted. (The reporter's system-monitor impression that "it can't be memory, there was no spike" is answered by the same log line: earlyoom triggers on the available-memory floor, not on a spike, and the steady growth *was* node.) Worth noting: the `ID=steamos` detection from #5839 covers this box too — OS-wide detection rather than Deck DMI-sniffing was the right call. ## The resident-chat cap was active and did not bound them This session ran the merged build (`ed324d7d6183`) and still grew ~1.9 GB in 24 minutes. So for this user's data shape the memory bulk is not resident-chat *count* — the cap is necessary for the Deck-class case but not sufficient here. Interim mitigation relayed (same move the Termux profile makes with its 1024 MiB heap): ``` NODE_OPTIONS=--max-old-space-size=1536 ``` in the `.env` next to `start.sh`. If it still OOMs with that set, it fails *loudly* with a JS heap trace instead of vanishing — either outcome is informative. The deeper "where do the gigabytes live" investigation is deliberately not being opened for this platform. ## One genuine engine bug fell out of the log earlyoom sent SIGTERM at 16:24:35; the reporter's shell wrapper recorded exit **0 at 16:25:14** — our graceful shutdown took **39 seconds**, because `shutdown()` awaits `app.close()` without any bound and close waits on open connections (a phone browser holding an SSE stream). earlyoom's grace window is ~10 s; systemd and Docker have their own stop timeouts. On any of those, a slow close turns an orderly stop into a SIGKILL that drops debounced writes. Fix incoming as a small separate PR: a shutdown deadline that force-exits if close overruns, on every close path (signal shutdown + both update/admin restart routes).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3220
No description provided.