[GH-ISSUE #5585] [Issue]: JavaScript heap out-of-memory crash on Termux #3094

Closed
opened 2026-10-21 05:59:32 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @Romuromylus on GitHub.

Summary

Marinara Engine 2.4.4 crashed multiple times after updating while running in Termux. The Termux log reports a JavaScript heap out-of-memory error and process exit code 134.

Expected behavior

Marinara Engine should continue running without exhausting the JavaScript heap or crashing.

Actual behavior

The Marinara Engine server exhausts the JavaScript heap, aborts, and exits with status code 134.

Steps to reproduce

  1. Update Marinara Engine to version 2.4.4 and run it in Termux.
  2. Use Marinara Engine until the server crashes; the issue reportedly occurred multiple times after the update.

Environment

  • Marinara Engine version: 2.4.4
  • Install type: termux
  • OS + version: Server: Android / Termux 4.19.157-perf+ (arm64); Client: Android 11
  • Browser or app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android

Logs, screenshots, or video

Termux log: "FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory" followed by "./start-termux.sh: line 679: 6585 Aborted node dist/index.js" and "Marinara Engine server exited with status 134." Before the crash, diagnostics showed heap 1097.6 / 1632 MiB and RSS 1263.1 MiB. Active connection: Openrouter; model: xiaomi/mimo-v2.5.

Additional context

The user reported two crashes after updating, then reported another crash shortly afterward. A post-crash diagnostic showed server OS, server memory, build, and commit as unavailable. The first diagnostic identified build 2.4.4+1a299369ac70 and commit 1a299369ac.

Discord thread: Memory leak? Program crashing!
Discord thread link: https://discord.com/channels/1417099416812392641/1542661281993982002
Requested by: gunterlie (gunterlie, Discord ID 282074442962829312)

Discord thread transcript (7 messages)
[2026-08-27T22:25:10.888Z] Leytra: Since updating I've have marinara crash twice

it gives me code 134, talking about running out of memory in the termux log.
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542661281993982002]

[2026-08-27T22:25:12.395Z] 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/1542661281993982002/1542661288314802237]

[2026-08-27T22:28:25.013Z] Leytra: Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+1a299369ac70
Commit: 1a299369ac70
Server OS: Android / Termux 4.19.157-perf+ (arm64)
Server memory: heap 1097.6 / 1632 MiB; RSS 1263.1 MiB
Client OS: Android 11
Browser / app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android
GPU: Adreno (TM) 620
Active connection: Openrouter
Connection provider: openrouter
LLM model: xiaomi/mimo-v2.5
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542662096213516359]

[2026-08-27T22:28:52.530Z] Leytra: There's the support diagnostic if that helps
Taken after having to restart of course
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542662211628048465]

[2026-08-27T22:38:40.919Z] Leytra: It just crashed again.
Managed to copy the diagnostics after the crash lol

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4
Commit: Unavailable
Server OS: Unavailable
Server memory: Unavailable
Client OS: Android 11
Browser / app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android
GPU: Adreno (TM) 620
Active connection: Openrouter
Connection provider: openrouter
LLM model: xiaomi/mimo-v2.5
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542664679510376560]

[2026-08-27T22:39:04.061Z] gunterlie: will look
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542664776574832691]

[2026-08-27T22:40:03.856Z] Leytra: This might help too
The crash from termux.

` ` `
<--- Last few GCs --->

[6585:0xb400007b280d4000]   610131 ms: Scavenge 1259.9 (1298.0) -> 1158.0 (1166.4) MB, pooled: 55 MB, 13.09 / 0.01 ms  (average mu = 0.988, current mu = 0.992) allocation failure;
[6585:0xb400007b280d4000]   610553 ms: Mark-Compact 1594.1 (1602.4) -> 1512.3 (1549.9) MB, pooled: 83 MB, 26.45 / 0.14 ms  (+ 5.4 ms in 2 steps since start of marking, biggest step 5.3 ms, walltime since start of marking 402 ms) (average mu = 0.999, curre
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

./start-termux.sh: line 679:  6585 Aborted                 node dist/index.js
  [ERROR] Marinara Engine server exited with status 134.

[Process completed (code 134) - press Enter]` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542665027373371483]

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.
Originally created by @SpicyMarinara on GitHub (Aug 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5585 Originally assigned to: @Romuromylus on GitHub. ## Summary Marinara Engine 2.4.4 crashed multiple times after updating while running in Termux. The Termux log reports a JavaScript heap out-of-memory error and process exit code 134. ## Expected behavior Marinara Engine should continue running without exhausting the JavaScript heap or crashing. ## Actual behavior The Marinara Engine server exhausts the JavaScript heap, aborts, and exits with status code 134. ## Steps to reproduce 1. Update Marinara Engine to version 2.4.4 and run it in Termux. 2. Use Marinara Engine until the server crashes; the issue reportedly occurred multiple times after the update. ## Environment - Marinara Engine version: 2.4.4 - Install type: termux - OS + version: Server: Android / Termux 4.19.157-perf+ (arm64); Client: Android 11 - Browser or app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android ## Logs, screenshots, or video Termux log: "FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory" followed by "./start-termux.sh: line 679: 6585 Aborted node dist/index.js" and "Marinara Engine server exited with status 134." Before the crash, diagnostics showed heap 1097.6 / 1632 MiB and RSS 1263.1 MiB. Active connection: Openrouter; model: xiaomi/mimo-v2.5. ## Additional context The user reported two crashes after updating, then reported another crash shortly afterward. A post-crash diagnostic showed server OS, server memory, build, and commit as unavailable. The first diagnostic identified build 2.4.4+1a299369ac70 and commit 1a299369ac70. Discord thread: Memory leak? Program crashing! Discord thread link: https://discord.com/channels/1417099416812392641/1542661281993982002 Requested by: gunterlie (gunterlie, Discord ID 282074442962829312) <details> <summary>Discord thread transcript (7 messages)</summary> ```text [2026-08-27T22:25:10.888Z] Leytra: Since updating I've have marinara crash twice it gives me code 134, talking about running out of memory in the termux log. [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542661281993982002] [2026-08-27T22:25:12.395Z] 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/1542661281993982002/1542661288314802237] [2026-08-27T22:28:25.013Z] Leytra: Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+1a299369ac70 Commit: 1a299369ac70 Server OS: Android / Termux 4.19.157-perf+ (arm64) Server memory: heap 1097.6 / 1632 MiB; RSS 1263.1 MiB Client OS: Android 11 Browser / app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android GPU: Adreno (TM) 620 Active connection: Openrouter Connection provider: openrouter LLM model: xiaomi/mimo-v2.5 [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542662096213516359] [2026-08-27T22:28:52.530Z] Leytra: There's the support diagnostic if that helps Taken after having to restart of course [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542662211628048465] [2026-08-27T22:38:40.919Z] Leytra: It just crashed again. Managed to copy the diagnostics after the crash lol Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4 Commit: Unavailable Server OS: Unavailable Server memory: Unavailable Client OS: Android 11 Browser / app shell: Mozilla/5.0 (Linux; Android 11; LM-F100 Build/RKQ1.210420.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36 MarinaraEngine/Android GPU: Adreno (TM) 620 Active connection: Openrouter Connection provider: openrouter LLM model: xiaomi/mimo-v2.5 [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542664679510376560] [2026-08-27T22:39:04.061Z] gunterlie: will look [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542664776574832691] [2026-08-27T22:40:03.856Z] Leytra: This might help too The crash from termux. ` ` ` <--- Last few GCs ---> [6585:0xb400007b280d4000] 610131 ms: Scavenge 1259.9 (1298.0) -> 1158.0 (1166.4) MB, pooled: 55 MB, 13.09 / 0.01 ms (average mu = 0.988, current mu = 0.992) allocation failure; [6585:0xb400007b280d4000] 610553 ms: Mark-Compact 1594.1 (1602.4) -> 1512.3 (1549.9) MB, pooled: 83 MB, 26.45 / 0.14 ms (+ 5.4 ms in 2 steps since start of marking, biggest step 5.3 ms, walltime since start of marking 402 ms) (average mu = 0.999, curre FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- ./start-termux.sh: line 679: 6585 Aborted node dist/index.js [ERROR] Marinara Engine server exited with status 134. [Process completed (code 134) - press Enter]` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1542661281993982002/1542665027373371483] ``` </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.
bsakaguchi 2026-10-21 05:59:33 +07:00
Author
Owner

@Romuromylus commented on GitHub (Aug 29, 2026):

Fixed by PR #5587, squash-merged into staging as 04bf2d110. The Termux launcher's default Node.js heap now budgets roughly twice the on-disk structured profile plus 512 MiB of headroom, bounded by one quarter of known device RAM (never below the 1 GiB baseline, and 1536 MiB when device memory cannot be read), so a large profile regains the headroom it had under the pre-2.4.4 2 GiB default. On the reported setup (~1.1 GiB profile, 8 GiB device) the launcher resolves 2048 MiB again — the log line to look for on next start is "Node.js heap limit set to 2048 MiB for this profile and device". Staging also carries the #5592 lazy-storage/LRU-eviction work, which reduces the resident working set on top of this. If the reporter can update to staging and confirm a long session survives, that closes the loop.

<!-- gh-comment-id:5459705852 --> @Romuromylus commented on GitHub (Aug 29, 2026): Fixed by PR #5587, squash-merged into staging as 04bf2d110. The Termux launcher's default Node.js heap now budgets roughly twice the on-disk structured profile plus 512 MiB of headroom, bounded by one quarter of known device RAM (never below the 1 GiB baseline, and 1536 MiB when device memory cannot be read), so a large profile regains the headroom it had under the pre-2.4.4 2 GiB default. On the reported setup (~1.1 GiB profile, 8 GiB device) the launcher resolves 2048 MiB again — the log line to look for on next start is "Node.js heap limit set to 2048 MiB for this profile and device". Staging also carries the #5592 lazy-storage/LRU-eviction work, which reduces the resident working set on top of this. If the reporter can update to staging and confirm a long session survives, that closes the loop.
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#3094
No description provided.