[GH-ISSUE #6046] [Issue]: Termux auto-update fails when protecting launcher data containing a socket #3353

Closed
opened 2026-10-21 06:02:14 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @Romuromylus on GitHub.

Summary

On Termux, Marinara Engine's startup auto-update fails while attempting to protect launcher data because it tries to copy the Unix socket live.sock. The engine then starts without updating in failsafe mode, and the reported incomplete-update backup directory may be absent even though the error references it.

Expected behavior

The startup auto-update should complete successfully, or safely skip socket files and handle missing or empty backup directories without failing. Marinara Engine should start with the update applied when one is available.

Actual behavior

Startup reports Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL for data/storage/.writer-lease/live.sock. It then starts without updating in failsafe mode. The error also appears when the engine update backup folder is empty, and the specific incomplete-update folder referenced in the error cannot be found.

Steps to reproduce

  1. Run Marinara Engine 2.4.5 on Termux during startup with auto-updating enabled.
  2. Allow the startup auto-update process to run while the launcher data contains data/storage/.writer-lease/live.sock.
  3. Observe the socket-copy error and that the engine starts without updating in failsafe mode.
  4. Check the engine update backup directory and the referenced incomplete-update directory.

Environment

  • Marinara Engine version: 2.4.5+1411d71dadbc (commit 1411d71dad)
  • Install type: termux
  • OS + version: Android 10; server OS Android / Termux 6.1.145-android14-11-33419968-abS928BXXS6DZH2 (arm64)
  • Browser or app shell: SamsungBrowser 30.0 / Chrome 143.0.0.0; Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36

Logs, screenshots, or video

Startup log: [ERROR] Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL (cannot copy a socket file: /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock) /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock. Support diagnostics also record a chunk-error with TypeError followed by a reload-requested event with reason chunk-recovery.

Additional context

The reporter states the error occurs even when the engine update backup folder is empty and that no matching incomplete-update folder is present. Support diagnostics report 10 sessions ended without shutdown, no detected freeze, and a background wake lock acquired. No screenshot or video was provided.

Discord thread: Bug report - Auto-update on Termux failed
Discord thread link: https://discord.com/channels/1417099416812392641/1547592863829729404
Requested by: Kuc0 (kuc0, Discord ID 108988150629531648)

Discord thread transcript (5 messages)
[2026-09-10T13:01:31.622Z] Fussel: Trying to start up ME on Termux, something broke the auto updating script.

During startup in Termux, I get the following command lines:

[ERROR] Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL (cannot copy a socket file: /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock) /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock

It then proceeds to start without updating, the failsafe working.

The weird thing is that this error pops up even if the engine update backup folder is empty. When I go to look for the specific folder for incomplete updates, there is none.

Thanks for looking into it!
[Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547592863829729404]

[2026-09-10T13:01:32.228Z] 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/1547592863829729404/1547592866371477655]

[2026-09-10T13:01:52.197Z] Fussel: Marinara Engine diagnostics
Version: 2.4.5
Build: 2.4.5+1411d71dadbc
Commit: 1411d71dadbc
Server OS: Android / Termux 6.1.145-android14-11-33419968-abS928BXXS6DZH2 (arm64)
Server memory: heap 119.7 / 1120 MiB; RSS 287.5 MiB
Background wake lock: acquired
Last detected freeze: none detected
Previous session: ended without shutting down - last alive 2026-09-10T13:29:03.942Z (up 34m, RSS 181 MiB); device rebooted before next launch: no
Sessions ended without shutdown: 10 recorded
Client OS: Android 10
Browser / app shell: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36
GPU: Adreno (TM) 750
Active connection: GLM
Connection provider: openrouter
LLM model: z-ai/glm-5.3
Mari last acted on: none recorded this session
Client runtime:
[Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547592950127788032]

[2026-09-10T13:59:10.289Z] Fussel: {"build":"2.4.5+1411d71dadbc","page":"mtvlbn23-eaqtv2eo","persistence":"local","navigation":"reload","standalone":false,"view":[878,0,878,0],"events":[{"at":1789046916147,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-start","view":[878,0,878,0]},{"at":1789046916157,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-show","view":[878,0,878,0]},{"at":1789046917962,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046918406,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046931776,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046977052,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046991641,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046992813,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046993545,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789047055072,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789047064159,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"chunk-error","error":"TypeError","view":[878,0,878,0]},
[Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547607370530553916]

[2026-09-10T13:59:11.925Z] Fussel: {"at":1789047064182,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"reload-requested","reason":"chunk-recovery","view":[878,0,878,0]},{"at":1789047064413,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-hide","view":[878,0,878,0]},{"at":1789047064414,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789048564347,"page":"mtvlbn23-eaqtv2eo","build":"2.4.5+1411d71dadbc","kind":"page-start","view":[878,0,878,0]},{"at":1789048564359,"page":"mtvlbn23-eaqtv2eo","build":"2.4.5+1411d71dadbc","kind":"page-show","view":[878,0,878,0]}]}
[Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547607377392439421]

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 (Sep 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6046 Originally assigned to: @Romuromylus on GitHub. ## Summary On Termux, Marinara Engine's startup auto-update fails while attempting to protect launcher data because it tries to copy the Unix socket `live.sock`. The engine then starts without updating in failsafe mode, and the reported incomplete-update backup directory may be absent even though the error references it. ## Expected behavior The startup auto-update should complete successfully, or safely skip socket files and handle missing or empty backup directories without failing. Marinara Engine should start with the update applied when one is available. ## Actual behavior Startup reports `Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL` for `data/storage/.writer-lease/live.sock`. It then starts without updating in failsafe mode. The error also appears when the engine update backup folder is empty, and the specific incomplete-update folder referenced in the error cannot be found. ## Steps to reproduce 1. Run Marinara Engine 2.4.5 on Termux during startup with auto-updating enabled. 2. Allow the startup auto-update process to run while the launcher data contains `data/storage/.writer-lease/live.sock`. 3. Observe the socket-copy error and that the engine starts without updating in failsafe mode. 4. Check the engine update backup directory and the referenced incomplete-update directory. ## Environment - Marinara Engine version: 2.4.5+1411d71dadbc (commit 1411d71dadbc) - Install type: termux - OS + version: Android 10; server OS Android / Termux 6.1.145-android14-11-33419968-abS928BXXS6DZH2 (arm64) - Browser or app shell: SamsungBrowser 30.0 / Chrome 143.0.0.0; Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 ## Logs, screenshots, or video Startup log: `[ERROR] Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL (cannot copy a socket file: /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock) /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock`. Support diagnostics also record a `chunk-error` with `TypeError` followed by a `reload-requested` event with reason `chunk-recovery`. ## Additional context The reporter states the error occurs even when the engine update backup folder is empty and that no matching incomplete-update folder is present. Support diagnostics report 10 sessions ended without shutdown, no detected freeze, and a background wake lock acquired. No screenshot or video was provided. Discord thread: Bug report - Auto-update on Termux failed Discord thread link: https://discord.com/channels/1417099416812392641/1547592863829729404 Requested by: Kuc0 (kuc0, Discord ID 108988150629531648) <details> <summary>Discord thread transcript (5 messages)</summary> ```text [2026-09-10T13:01:31.622Z] Fussel: Trying to start up ME on Termux, something broke the auto updating script. During startup in Termux, I get the following command lines: [ERROR] Could not protect launcher data: Cannot copy a socket file: cp returned EINVAL (cannot copy a socket file: /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock) /data/data/com.termux/files/home/.marinara-engine-update-backups/.incomplete-update-2026-09-10T12-53-50-625Z-16930/data/storage/.writer-lease/live.sock It then proceeds to start without updating, the failsafe working. The weird thing is that this error pops up even if the engine update backup folder is empty. When I go to look for the specific folder for incomplete updates, there is none. Thanks for looking into it! [Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547592863829729404] [2026-09-10T13:01:32.228Z] 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/1547592863829729404/1547592866371477655] [2026-09-10T13:01:52.197Z] Fussel: Marinara Engine diagnostics Version: 2.4.5 Build: 2.4.5+1411d71dadbc Commit: 1411d71dadbc Server OS: Android / Termux 6.1.145-android14-11-33419968-abS928BXXS6DZH2 (arm64) Server memory: heap 119.7 / 1120 MiB; RSS 287.5 MiB Background wake lock: acquired Last detected freeze: none detected Previous session: ended without shutting down - last alive 2026-09-10T13:29:03.942Z (up 34m, RSS 181 MiB); device rebooted before next launch: no Sessions ended without shutdown: 10 recorded Client OS: Android 10 Browser / app shell: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 GPU: Adreno (TM) 750 Active connection: GLM Connection provider: openrouter LLM model: z-ai/glm-5.3 Mari last acted on: none recorded this session Client runtime: [Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547592950127788032] [2026-09-10T13:59:10.289Z] Fussel: {"build":"2.4.5+1411d71dadbc","page":"mtvlbn23-eaqtv2eo","persistence":"local","navigation":"reload","standalone":false,"view":[878,0,878,0],"events":[{"at":1789046916147,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-start","view":[878,0,878,0]},{"at":1789046916157,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-show","view":[878,0,878,0]},{"at":1789046917962,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046918406,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046931776,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046977052,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046991641,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789046992813,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789046993545,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789047055072,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"visible","view":[878,0,878,0]},{"at":1789047064159,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"chunk-error","error":"TypeError","view":[878,0,878,0]}, [Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547607370530553916] [2026-09-10T13:59:11.925Z] Fussel: {"at":1789047064182,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"reload-requested","reason":"chunk-recovery","view":[878,0,878,0]},{"at":1789047064413,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"page-hide","view":[878,0,878,0]},{"at":1789047064414,"page":"mtvkcbar-q8ea9h0m","build":"2.4.5+a959aadf96ea","kind":"hidden","view":[878,0,878,0]},{"at":1789048564347,"page":"mtvlbn23-eaqtv2eo","build":"2.4.5+1411d71dadbc","kind":"page-start","view":[878,0,878,0]},{"at":1789048564359,"page":"mtvlbn23-eaqtv2eo","build":"2.4.5+1411d71dadbc","kind":"page-show","view":[878,0,878,0]}]} [Discord message: https://discord.com/channels/1417099416812392641/1547592863829729404/1547607377392439421] ``` </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 06:02:14 +07:00
Author
Owner

@Romuromylus commented on GitHub (Sep 11, 2026):

Fixed by #6056, squash-merged into staging as 80b6bc04c. The update snapshot now leaves the per-process storage writer lease (and any socket or FIFO under the data directory) out of the copy, so the Termux/Linux launcher auto-update no longer aborts when live.sock is still on disk. Closing.

<!-- gh-comment-id:5634359914 --> @Romuromylus commented on GitHub (Sep 11, 2026): Fixed by #6056, squash-merged into `staging` as 80b6bc04c. The update snapshot now leaves the per-process storage writer lease (and any socket or FIFO under the data directory) out of the copy, so the Termux/Linux launcher auto-update no longer aborts when `live.sock` is still on disk. Closing.
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#3353
No description provided.