[GH-ISSUE #4973] [GUI] loaded native instance stops itself while idle; host then reports status:"ready" + phase:"unavailable" forever #2288

Closed
opened 2026-11-04 01:58:11 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @ambrato on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4973

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app

Reproduction status

Reproduced locally — observed 6 times over 2 days on one machine, every occurrence captured by an external 10 s / 1 s flight recorder (see Logs)

Strata version

Strata 0.2.8 (desktop app) · engine/Control 0.1.54

Graphics card, memory and system

Apple M1 Max, 32-core GPU (unified memory) · 64 GB RAM · macOS 26.5.2

Model, size and settings

Qwen3.8-Flash-Next Q2_0 · 204800 context · pictures on (--vision --mmap-experts --spec 2 --mtp --expert-cache 64 --pool-workers 8 --vram-reserve-mib 2560)


What happened

Two things, and the second is the reason this is confusing to live with.

A. The loaded native instance stops itself while idle — as a clean, externally-ordered stop

I load the model, run a task, then leave Strata idle (app stays open, nothing unloaded by me). After a while — 2.5 h, 3.5 h, 3 h, 2.6 h and 7.5 h on different days, and once at 05:32 while I was asleep — the whole instance is gone: owner host, serve.server wrapper, engine and strata-vision all terminate together.

The wrapper's own log (~/.local/state/strata/runtime/app-1.server.log) ends the same way every time:

[strata] reading the prompt: 48 of 53 tokens, 1 s so far
[strata] done: 1 tokens in 1 s (no speed) (length, cancel=False)
[strata] the reply reached max tokens while still thinking, so it has no answer: a thinking budget ... leaves room to answer

[strata] stopping (Ctrl+C again to end the engine at once) ...
[strata] stopped

So this is the request_stop() → drain → exit path, not a crash:

  • no .ips crash report for any process in the chain, ever;
  • the engine's session log ends on a complete [strata] stopped, and the wrapper then exits with the engine's QUIT already sent;
  • free memory at every death was ample — I sampled vm_stat every 10 s and streamed kernel memorystatus/jetsam telemetry continuously: 11.3–14.4 GB free at each death, zero kill events. So it is not the OOM killer and not pressure.

It happens with idle auto-unload disabled: beginner.gpuIdle = "never" in the app state, and idle_unload_s unset (serve/server.py:9142 → svc.idle_unload_s = 0). Had idle unload run, the wrapper would have printed the model unloads after N s without requests and only the model would have gone — here the wrapper itself exits.

What makes this hard to notice as "unloaded": the loss is discovered only by failing inference requests, and see B.

B. After the instance dies, the published state is permanently wrong and silent

GET /api/native keeps reporting the dead instance as ready:

{"instances":[{"id":"<uuid>","status":"ready","phase":"unavailable","context":204800}]}
  • The loader keeps presenting the model as ready while the Monitor pane shows "Error / Model unavailable". The two disagree forever, until I unload and reload by hand.
  • Nothing in the host notices the child is gone, nothing tries to restart it, and nothing is logged: ~/.local/state/strata/runtime/app-1.host.log is a 0-byte file for the entire life of the app, spanning 6 of these deaths and their reloads.

Confirmed independent of my config: if I ask the host to unload and load the same model again, it registers the new instance cleanly and serves normally — so the state/supervision gap in B is not caused by the stop in A.

Smallest steps or command that reproduce it

  1. Strata 0.2.8 desktop app on macOS, model loaded (native), gpuIdle: "never", idle unload unset.
  2. Run one chat completion, then leave the app open and the model unused.
  3. Wait (in my case 2.5–7.5 h; it also happened overnight with nobody present).

Expected: the instance either keeps serving, or — if some policy decided to release the GPU — the app says so and can serve the next request again.
Actual: the instance is gracefully gone, and the app still reports it as status:"ready".

I could not make it happen faster on demand: there is no minute-scale timer I can point at. What I can report as fact is that every death was preceded within seconds by the small request shown above (prompt 53 tokens = 0 reused + 53 read, 1 generated, ending in "the reply reached max tokens while still thinking, so it has no answer").

Ruled out on my side (each check stated so it can be repeated)

  1. Not jetsam / OOM — vm_stat at 10 s resolution shows 11.3–14.4 GB free at the moment of every death; continuous log stream on memorystatus/jetsam/per-process-limit recorded no kill for this process; no .ips files.
  2. Not idle auto-unload — gpuIdle: "never", idle_unload_s unset → 0; the wrapper's own "unloads after N s" line never appears in its log; the wrapper itself dies, not only the model.
  3. Not sleep / display / screen-lock — pmset -g log shows only display sleep well before the window, system uptime continuous.
  4. Not --die-with-pid — the node host never restarted across all 6 deaths (same pid and start time), and I verified live that procs.start_token(die_with_pid) still equals the --die-with-token the owner host was launched with.
  5. No external runtime stop was involved in the idle deaths — I sampled the process table once per second for 6 days. The CLI form is catchable and was caught exactly once: the deliberate unload I triggered through the host API (strata.py runtime stop --profile app-1 --wait 120 --output json, 2026-10-31 17:16:33). The 5 unattended deaths have no such record.
  6. No other client issued it — the only HTTP client that ever reaches the model here is my local gateway (Go-http-client/1.1); its own logs show zero forwarded requests inside the death windows. Nothing else on the machine references Strata.
  7. Not an engine crash — the engine's log always ends with the wrapper's clean stopped, and the exit is preceded by the drain path.

Code paths that could produce exactly this signature (from reading the shipped 0.2.8 source; I did not observe them executing)

The signature is "wrapper takes the SIGTERM/request_stop path, and its parent owner host is gone in the same 10 s window". Two places in the runtime supervisor can do that without leaving any log line I can find:

  • strata_control/runtime.py:1300 in the serve loop — if self.probe_result is not None and "error" in self.probe_result and self.child … : self._stop_child(). Anything that writes an error into probe_result after the instance is up would SIGTERM a healthy engine.
  • the readiness/generation-probe path (runtime.py:908–972, 1197–1210, readiness.py, including probe_instance_mismatch / probe_invalid_ready_file / probe_internal_error) — note the small 53-token/1-token request that precedes every death, which matches a readiness-style probe, and its "reply reached max tokens while still thinking" outcome for a thinking model with max_tokens=1.
  • and the owner-loss channel: runtime.py:1001 _close_owner_pipe() on the host's own exit, which serve/owner_guard.py turns into killpg(SIGTERM) (then SIGKILL after grace) for the wrapper and engine — no command line, no log.

For symptom B, the state record is published independently of child liveness; #4250 ("record child absence before publishing managed host state") looks adjacent, though that one covers a host killed before launch rather than a child lost after ready.

Logs

Attached: issue-evidence.txt — death timeline with watermarks, the wrapper log tail for each of the 6 deaths, the process chain snapshot at death, the per-second CLI capture, a raw sample series across one overnight death, and the setting values. Paths and ids are scrubbed; no keys included.

Extra context that might help

An external watchdog currently recovers automatically: on death it calls the app's own API (POST /api/native/instances/<id>/unload, then POST /api/native/operations {"kind":"load",…}) and the model is serving again in ~25 s with the UI consistent. That workaround is also evidence for B being a state/liveness gap rather than a load problem — the host re-registers a fresh instance without complaint as soon as something else notices the old one died.

If it narrows anything down: the deaths are spread over idle durations from 2.5 h to 7.5 h and are not tied to sleep, display state, or my activity; and every one of them follows that small internal request. I can run a targeted experiment (e.g. disable whatever issues that probe, or add the stop reason to the wrapper's log) if you tell me which knob to turn.

Attached evidence (flight-recorder output, scrubbed)
=== 1. Death timeline (10s flight recorder; pid + memory watermarks at the moment of death) ===
==== 2026-10-31 13:48:24  ENGINE DIED (last pid 99982)  ==============
-- watermarks: free=14.44GB spec=0.02GB wired=3.49GB compr=1.42GB  swap_used=1197.19M
System-wide memory free percentage: 92%
--
==== 2026-10-31 17:16:35  ENGINE DIED (last pid 96597)  ==============
-- watermarks: free=11.39GB spec=0.08GB wired=3.80GB compr=1.08GB  swap_used=1125.12M
System-wide memory free percentage: 92%
--
==== 2026-11-01 13:16:29  ENGINE DIED (last pid 16989)  ==============
-- watermarks: free=13.70GB spec=0.03GB wired=3.66GB compr=0.90GB  swap_used=1480.19M
System-wide memory free percentage: 92%
--
==== 2026-11-01 15:40:28  ENGINE DIED (last pid 88864)  ==============
-- watermarks: free=12.84GB spec=0.03GB wired=3.62GB compr=0.77GB  swap_used=1472.19M
System-wide memory free percentage: 93%
--
==== 2026-11-01 19:24:25  ENGINE DIED (last pid 6955)  ==============
-- watermarks: free=11.34GB spec=0.04GB wired=3.71GB compr=0.73GB  swap_used=1424.19M
System-wide memory free percentage: 92%
--
==== 2026-11-01 22:04:23  ENGINE DIED (last pid 91580)  ==============
-- watermarks: free=12.18GB spec=0.03GB wired=3.69GB compr=0.75GB  swap_used=1416.19M
System-wide memory free percentage: 92%
--
==== 2026-11-02 05:32:30  ENGINE DIED (last pid 22328)  ==============
-- watermarks: free=11.85GB spec=0.02GB wired=3.63GB compr=0.95GB  swap_used=1160.62M
System-wide memory free percentage: 92%

=== 2. Wrapper log tail at each death (its OWN stdout; graceful-stop signature) ===

-- wrapper log tail (app-1.server.log) — stop requests land here:
loading the vision encoder ...

-- wrapper log tail (app-1.server.log) — stop requests land here:
[strata] stopped

-- wrapper log tail (app-1.server.log) — stop requests land here:
[strata] stopped

-- wrapper log tail (app-1.server.log) — stop requests land here:
[strata] stopped

-- wrapper log tail (app-1.server.log) — stop requests land here:
[strata] stopped

-- wrapper log tail (app-1.server.log) — stop requests land here:
[strata] stopped

=== 3. Process chain captured at death (owner host + wrapper + engine all gone; node host alive) ===
91672     1 Sat Oct 31 14:35:38 2026     /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python"))
96896     1 Sat Oct 31 14:48:03 2026     /bin/zsh <HOME>/strata-watch/record.sh
99674     1 Sat Oct 31 09:44:37 2026     /Applications/Strata.app/Contents/MacOS/strata-desktop
99679 99674 Sat Oct 31 09:44:39 2026     /Applications/Strata.app/Contents/Resources/node/node /Applications/Strata.app/Contents/Resources/host/server/index.mjs
99733 99679 Sat Oct 31 09:44:42 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/tools/strata_mcp.py --root <HOME>/.local/share/strata/install --src /Applications/Strata.app/Contents/Resources/control
21602     1 Sun Nov  1 07:50:28 2026     /bin/zsh <HOME>/strata-watch/record.sh
91672     1 Sat Oct 31 14:35:38 2026     /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python"))
99674     1 Sat Oct 31 09:44:37 2026     /Applications/Strata.app/Contents/MacOS/strata-desktop
99679 99674 Sat Oct 31 09:44:39 2026     /Applications/Strata.app/Contents/Resources/node/node /Applications/Strata.app/Contents/Resources/host/server/index.mjs
99733 99679 Sat Oct 31 09:44:42 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/tools/strata_mcp.py --root <HOME>/.local/share/strata/install --src /Applications/Strata.app/Contents/Resources/control
21602     1 Sun Nov  1 07:50:28 2026     /bin/zsh <HOME>/strata-watch/record.sh
91672     1 Sat Oct 31 14:35:38 2026     /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python"))

=== 4. Per-second process capture: the ONLY runtime-stop CLI in 6 days was the one I triggered over the host API ===
2026-10-31 14:41:17 NEW: Sat Oct 31 14:41:16 2026     /bin/zsh -c zsh -c '/bin/sleep 4 # strata_cli runtime stop --profile app-1' & FAKE=$!; sleep 3; cat ~/strata-watch/exec.log 2>/dev/null; kill $FAKE 2>/dev/null; echo 
2026-10-31 14:47:40 NEW: Sat Oct 31 14:47:39 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-10-31 17:16:33 NEW: Sat Oct 31 17:16:33 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime stop --profile app-1 -
2026-10-31 17:17:02 NEW: Sat Oct 31 17:16:58 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-11-01 13:16:55 NEW: Sun Nov  1 13:16:50 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-11-01 15:40:53 NEW: Sun Nov  1 15:40:49 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-11-01 19:24:51 NEW: Sun Nov  1 19:24:46 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-11-01 22:04:49 NEW: Sun Nov  1 22:04:45 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 
2026-11-02 05:32:55 NEW: Mon Nov  2 05:32:51 2026     /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 

=== 5. Idle death vs memory: samples across the overnight death (engine rss + free/wired/compressor) ===
2026-11-02 05:25:07 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:25:18 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:25:29 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:25:39 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:25:50 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:26:01 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:26:12 eng=22328 rss=36173MB free=0.11GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:26:23 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:26:34 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:26:44 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:26:55 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:27:06 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:27:16 eng=22328 rss=36173MB free=0.12GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:27:27 eng=22328 rss=36173MB free=0.13GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:27:38 eng=22328 rss=36173MB free=0.10GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:27:49 eng=22328 rss=36173MB free=0.13GB spec=0.05GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:28:00 eng=22328 rss=36173MB free=0.06GB spec=0.03GB wired=3.72GB compr=4.70GB swap=1160.62M
2026-11-02 05:28:10 eng=22328 rss=36173MB free=0.09GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:28:21 eng=22328 rss=36173MB free=0.11GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:28:32 eng=22328 rss=36173MB free=0.10GB spec=0.03GB wired=3.69GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:28:43 eng=22328 rss=36173MB free=0.14GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:28:54 eng=22328 rss=36173MB free=0.16GB spec=0.03GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:29:04 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:29:15 eng=22328 rss=36173MB free=0.16GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:29:26 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:29:37 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:29:47 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:29:58 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:30:08 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:30:19 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:30:30 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:30:41 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:30:51 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:31:02 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:31:14 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:31:24 eng=22328 rss=36173MB free=0.16GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:31:35 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M
2026-11-02 05:31:46 eng=22328 rss=36173MB free=0.15GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272
2026-11-02 05:31:57 eng=22328 rss=36173MB free=0.18GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:32:08 eng=22328 rss=36173MB free=0.16GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:32:19 eng=22328 rss=36173MB free=0.18GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M
2026-11-02 05:32:30 eng=dead free=7.06GB spec=0.51GB wired=6.44GB compr=0.95GB swap=1160.62M
2026-11-02 05:33:06 eng=87960 rss=36418MB free=0.13GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M
2026-11-02 05:33:17 eng=87960 rss=36418MB free=0.33GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:33:28 eng=87960 rss=36418MB free=0.32GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M
2026-11-02 05:33:39 eng=87960 rss=36418MB free=0.33GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M
2026-11-02 05:33:49 eng=87960 rss=36418MB free=0.51GB spec=0.05GB wired=4.65GB compr=4.69GB swap=1160.62M
2026-11-02 05:34:00 eng=87960 rss=36418MB free=0.46GB spec=0.05GB wired=4.69GB compr=4.67GB swap=1160.62M
2026-11-02 05:34:10 eng=87960 rss=36418MB free=0.96GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:34:21 eng=87960 rss=36418MB free=0.99GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:34:32 eng=87960 rss=36418MB free=0.94GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:34:43 eng=87960 rss=36418MB free=0.95GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:34:53 eng=87960 rss=36418MB free=0.93GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:35:04 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:35:14 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:35:25 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:35:36 eng=87960 rss=36418MB free=0.89GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:35:46 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:35:57 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:36:08 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:36:19 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:36:29 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:36:40 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:36:51 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:37:02 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.66GB compr=4.67GB swap=1160.62M
2026-11-02 05:37:12 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M
2026-11-02 05:37:23 eng=87960 rss=36418MB free=0.91GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M
2026-11-02 05:37:34 eng=87960 rss=36418MB free=0.87GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:37:45 eng=87960 rss=36418MB free=0.87GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M
2026-11-02 05:37:56 eng=87960 rss=36418MB free=0.75GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:38:06 eng=87960 rss=36418MB free=0.74GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M
2026-11-02 05:38:17 eng=87960 rss=36418MB free=0.77GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:38:28 eng=87960 rss=36418MB free=0.76GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M
2026-11-02 05:38:39 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:38:50 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:39:00 eng=87960 rss=36418MB free=0.84GB spec=0.07GB wired=3.71GB compr=4.66GB swap=1160.62M
2026-11-02 05:39:11 eng=87960 rss=36418MB free=0.85GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:39:22 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:39:32 eng=87960 rss=36418MB free=0.85GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M
2026-11-02 05:39:43 eng=87960 rss=36418MB free=0.83GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949
2026-11-02 05:39:53 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M

=== 6. Settings that should have prevented this ===
state.json: beginner.gpuIdle = "never"
instance config: idle_unload_s unset -> serve/server.py:9142 -> svc.idle_unload_s = 0
runtime host args: --shutdown-timeout 15.0 --owner-fd 7 (no idle timer)

=== 7. Host-side liveness gap (symptom B) ===
<HOME>/.local/state/strata/runtime/app-1.host.log = 0 bytes, across 6 self-stops and their restarts
GET /api/native after death: instances[0].status = "ready", phase = "unavailable" (never corrected, never restarted)

(Also available as files: death forensics blocks, per-second process captures, 10-second vm_stat series, pmset power log. Happy to paste more of any section.)

Originally created by @ambrato on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4973 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app ### Reproduction status Reproduced locally — observed 6 times over 2 days on one machine, every occurrence captured by an external 10 s / 1 s flight recorder (see Logs) ### Strata version Strata 0.2.8 (desktop app) · engine/Control 0.1.54 ### Graphics card, memory and system Apple M1 Max, 32-core GPU (unified memory) · 64 GB RAM · macOS 26.5.2 ### Model, size and settings Qwen3.8-Flash-Next Q2_0 · 204800 context · pictures on (`--vision --mmap-experts --spec 2 --mtp --expert-cache 64 --pool-workers 8 --vram-reserve-mib 2560`) --- ### What happened **Two things, and the second is the reason this is confusing to live with.** #### A. The loaded native instance stops itself while idle — as a clean, externally-ordered stop I load the model, run a task, then leave Strata idle (app stays open, nothing unloaded by me). After a while — 2.5 h, 3.5 h, 3 h, 2.6 h and 7.5 h on different days, and once at 05:32 while I was asleep — the whole instance is gone: owner host, `serve.server` wrapper, engine and `strata-vision` all terminate together. The wrapper's own log (`~/.local/state/strata/runtime/app-1.server.log`) ends the same way every time: ``` [strata] reading the prompt: 48 of 53 tokens, 1 s so far [strata] done: 1 tokens in 1 s (no speed) (length, cancel=False) [strata] the reply reached max tokens while still thinking, so it has no answer: a thinking budget ... leaves room to answer [strata] stopping (Ctrl+C again to end the engine at once) ... [strata] stopped ``` So this is the `request_stop()` → drain → exit path, not a crash: * no `.ips` crash report for any process in the chain, ever; * the engine's session log ends on a complete `[strata] stopped`, and the wrapper then exits with the engine's QUIT already sent; * free memory at every death was ample — I sampled `vm_stat` every 10 s and streamed kernel `memorystatus`/jetsam telemetry continuously: **11.3–14.4 GB free at each death, zero kill events**. So it is not the OOM killer and not pressure. It happens with idle auto-unload disabled: `beginner.gpuIdle = "never"` in the app state, and `idle_unload_s` unset (`serve/server.py:9142` → `svc.idle_unload_s = 0`). Had idle unload run, the wrapper would have printed `the model unloads after N s without requests` and only the model would have gone — here the wrapper itself exits. What makes this hard to notice as "unloaded": the loss is discovered only by failing inference requests, and see B. #### B. After the instance dies, the published state is permanently wrong and silent `GET /api/native` keeps reporting the dead instance as ready: ```json {"instances":[{"id":"<uuid>","status":"ready","phase":"unavailable","context":204800}]} ``` * The loader keeps presenting the model as ready while the Monitor pane shows "Error / Model unavailable". The two disagree forever, until I unload and reload by hand. * Nothing in the host notices the child is gone, nothing tries to restart it, and nothing is logged: `~/.local/state/strata/runtime/app-1.host.log` is a **0-byte file** for the entire life of the app, spanning 6 of these deaths and their reloads. Confirmed independent of my config: if I ask the host to unload and load the same model again, it registers the new instance cleanly and serves normally — so the state/supervision gap in B is not caused by the stop in A. ## Smallest steps or command that reproduce it 1. Strata 0.2.8 desktop app on macOS, model loaded (native), `gpuIdle: "never"`, idle unload unset. 2. Run one chat completion, then leave the app open and the model unused. 3. Wait (in my case 2.5–7.5 h; it also happened overnight with nobody present). Expected: the instance either keeps serving, or — if some policy decided to release the GPU — the app says so and can serve the next request again. Actual: the instance is gracefully gone, and the app still reports it as `status:"ready"`. I could not make it happen faster on demand: there is no minute-scale timer I can point at. What I can report as fact is that **every death was preceded within seconds by the small request shown above** (`prompt 53 tokens = 0 reused + 53 read, 1 generated`, ending in *"the reply reached max tokens while still thinking, so it has no answer"*). ## Ruled out on my side (each check stated so it can be repeated) 1. **Not jetsam / OOM** — `vm_stat` at 10 s resolution shows 11.3–14.4 GB free at the moment of every death; continuous `log stream` on `memorystatus`/`jetsam`/`per-process-limit` recorded no kill for this process; no `.ips` files. 2. **Not idle auto-unload** — `gpuIdle: "never"`, `idle_unload_s` unset → 0; the wrapper's own "unloads after N s" line never appears in its log; the wrapper itself dies, not only the model. 3. **Not sleep / display / screen-lock** — `pmset -g log` shows only display sleep well before the window, system uptime continuous. 4. **Not `--die-with-pid`** — the node host never restarted across all 6 deaths (same pid and start time), and I verified live that `procs.start_token(die_with_pid)` still equals the `--die-with-token` the owner host was launched with. 5. **No external `runtime stop` was involved in the idle deaths** — I sampled the process table once per second for 6 days. The CLI form is catchable and was caught exactly once: the deliberate unload *I* triggered through the host API (`strata.py runtime stop --profile app-1 --wait 120 --output json`, 2026-10-31 17:16:33). The 5 unattended deaths have no such record. 6. **No other client issued it** — the only HTTP client that ever reaches the model here is my local gateway (`Go-http-client/1.1`); its own logs show zero forwarded requests inside the death windows. Nothing else on the machine references Strata. 7. **Not an engine crash** — the engine's log always ends with the wrapper's clean `stopped`, and the exit is preceded by the drain path. ## Code paths that could produce exactly this signature (from reading the shipped 0.2.8 source; I did not observe them executing) The signature is "wrapper takes the SIGTERM/`request_stop` path, and its parent owner host is gone in the same 10 s window". Two places in the runtime supervisor can do that without leaving any log line I can find: * `strata_control/runtime.py:1300` in the serve loop — `if self.probe_result is not None and "error" in self.probe_result and self.child … : self._stop_child()`. Anything that writes an error into `probe_result` after the instance is up would SIGTERM a healthy engine. * the readiness/generation-probe path (`runtime.py:908–972`, `1197–1210`, `readiness.py`, including `probe_instance_mismatch` / `probe_invalid_ready_file` / `probe_internal_error`) — note the small 53-token/1-token request that precedes every death, which matches a readiness-style probe, and its *"reply reached max tokens while still thinking"* outcome for a thinking model with `max_tokens=1`. * and the owner-loss channel: `runtime.py:1001` `_close_owner_pipe()` on the host's own exit, which `serve/owner_guard.py` turns into `killpg(SIGTERM)` (then SIGKILL after grace) for the wrapper and engine — no command line, no log. For symptom B, the state record is published independently of child liveness; #4250 ("record child absence before publishing managed host state") looks adjacent, though that one covers a host killed before launch rather than a child lost after `ready`. ## Logs Attached: `issue-evidence.txt` — death timeline with watermarks, the wrapper log tail for each of the 6 deaths, the process chain snapshot at death, the per-second CLI capture, a raw sample series across one overnight death, and the setting values. Paths and ids are scrubbed; no keys included. ## Extra context that might help An external watchdog currently recovers automatically: on death it calls the app's own API (`POST /api/native/instances/<id>/unload`, then `POST /api/native/operations {"kind":"load",…}`) and the model is serving again in ~25 s with the UI consistent. That workaround is also evidence for B being a state/liveness gap rather than a load problem — the host re-registers a fresh instance without complaint as soon as something else notices the old one died. If it narrows anything down: the deaths are spread over idle durations from 2.5 h to 7.5 h and are not tied to sleep, display state, or my activity; and every one of them follows that small internal request. I can run a targeted experiment (e.g. disable whatever issues that probe, or add the stop reason to the wrapper's log) if you tell me which knob to turn. <details> <summary>Attached evidence (flight-recorder output, scrubbed)</summary> ```text === 1. Death timeline (10s flight recorder; pid + memory watermarks at the moment of death) === ==== 2026-10-31 13:48:24 ENGINE DIED (last pid 99982) ============== -- watermarks: free=14.44GB spec=0.02GB wired=3.49GB compr=1.42GB swap_used=1197.19M System-wide memory free percentage: 92% -- ==== 2026-10-31 17:16:35 ENGINE DIED (last pid 96597) ============== -- watermarks: free=11.39GB spec=0.08GB wired=3.80GB compr=1.08GB swap_used=1125.12M System-wide memory free percentage: 92% -- ==== 2026-11-01 13:16:29 ENGINE DIED (last pid 16989) ============== -- watermarks: free=13.70GB spec=0.03GB wired=3.66GB compr=0.90GB swap_used=1480.19M System-wide memory free percentage: 92% -- ==== 2026-11-01 15:40:28 ENGINE DIED (last pid 88864) ============== -- watermarks: free=12.84GB spec=0.03GB wired=3.62GB compr=0.77GB swap_used=1472.19M System-wide memory free percentage: 93% -- ==== 2026-11-01 19:24:25 ENGINE DIED (last pid 6955) ============== -- watermarks: free=11.34GB spec=0.04GB wired=3.71GB compr=0.73GB swap_used=1424.19M System-wide memory free percentage: 92% -- ==== 2026-11-01 22:04:23 ENGINE DIED (last pid 91580) ============== -- watermarks: free=12.18GB spec=0.03GB wired=3.69GB compr=0.75GB swap_used=1416.19M System-wide memory free percentage: 92% -- ==== 2026-11-02 05:32:30 ENGINE DIED (last pid 22328) ============== -- watermarks: free=11.85GB spec=0.02GB wired=3.63GB compr=0.95GB swap_used=1160.62M System-wide memory free percentage: 92% === 2. Wrapper log tail at each death (its OWN stdout; graceful-stop signature) === -- wrapper log tail (app-1.server.log) — stop requests land here: loading the vision encoder ... -- wrapper log tail (app-1.server.log) — stop requests land here: [strata] stopped -- wrapper log tail (app-1.server.log) — stop requests land here: [strata] stopped -- wrapper log tail (app-1.server.log) — stop requests land here: [strata] stopped -- wrapper log tail (app-1.server.log) — stop requests land here: [strata] stopped -- wrapper log tail (app-1.server.log) — stop requests land here: [strata] stopped === 3. Process chain captured at death (owner host + wrapper + engine all gone; node host alive) === 91672 1 Sat Oct 31 14:35:38 2026 /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python")) 96896 1 Sat Oct 31 14:48:03 2026 /bin/zsh <HOME>/strata-watch/record.sh 99674 1 Sat Oct 31 09:44:37 2026 /Applications/Strata.app/Contents/MacOS/strata-desktop 99679 99674 Sat Oct 31 09:44:39 2026 /Applications/Strata.app/Contents/Resources/node/node /Applications/Strata.app/Contents/Resources/host/server/index.mjs 99733 99679 Sat Oct 31 09:44:42 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/tools/strata_mcp.py --root <HOME>/.local/share/strata/install --src /Applications/Strata.app/Contents/Resources/control 21602 1 Sun Nov 1 07:50:28 2026 /bin/zsh <HOME>/strata-watch/record.sh 91672 1 Sat Oct 31 14:35:38 2026 /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python")) 99674 1 Sat Oct 31 09:44:37 2026 /Applications/Strata.app/Contents/MacOS/strata-desktop 99679 99674 Sat Oct 31 09:44:39 2026 /Applications/Strata.app/Contents/Resources/node/node /Applications/Strata.app/Contents/Resources/host/server/index.mjs 99733 99679 Sat Oct 31 09:44:42 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/tools/strata_mcp.py --root <HOME>/.local/share/strata/install --src /Applications/Strata.app/Contents/Resources/control 21602 1 Sun Nov 1 07:50:28 2026 /bin/zsh <HOME>/strata-watch/record.sh 91672 1 Sat Oct 31 14:35:38 2026 /usr/bin/log stream --style compact --predicate eventMessage CONTAINS[c] "memorystatus" OR eventMessage CONTAINS[c] "jetsam" OR eventMessage CONTAINS[c] "vm pressure" OR eventMessage CONTAINS[c] "per-process-limit" OR (process == "runningboardd" AND (eventMessage CONTAINS "strata" OR eventMessage CONTAINS "python3.12" OR eventMessage CONTAINS "index.mjs" OR eventMessage CONTAINS "anon<node" OR eventMessage CONTAINS "anon<python")) === 4. Per-second process capture: the ONLY runtime-stop CLI in 6 days was the one I triggered over the host API === 2026-10-31 14:41:17 NEW: Sat Oct 31 14:41:16 2026 /bin/zsh -c zsh -c '/bin/sleep 4 # strata_cli runtime stop --profile app-1' & FAKE=$!; sleep 3; cat ~/strata-watch/exec.log 2>/dev/null; kill $FAKE 2>/dev/null; echo 2026-10-31 14:47:40 NEW: Sat Oct 31 14:47:39 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-10-31 17:16:33 NEW: Sat Oct 31 17:16:33 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime stop --profile app-1 - 2026-10-31 17:17:02 NEW: Sat Oct 31 17:16:58 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-11-01 13:16:55 NEW: Sun Nov 1 13:16:50 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-11-01 15:40:53 NEW: Sun Nov 1 15:40:49 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-11-01 19:24:51 NEW: Sun Nov 1 19:24:46 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-11-01 22:04:49 NEW: Sun Nov 1 22:04:45 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 2026-11-02 05:32:55 NEW: Mon Nov 2 05:32:51 2026 /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/strata.py runtime start --profile app-1 === 5. Idle death vs memory: samples across the overnight death (engine rss + free/wired/compressor) === 2026-11-02 05:25:07 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:25:18 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:25:29 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:25:39 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:25:50 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:26:01 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:26:12 eng=22328 rss=36173MB free=0.11GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:26:23 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:26:34 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:26:44 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:26:55 eng=22328 rss=36173MB free=0.12GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:27:06 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:27:16 eng=22328 rss=36173MB free=0.12GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:27:27 eng=22328 rss=36173MB free=0.13GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:27:38 eng=22328 rss=36173MB free=0.10GB spec=0.05GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:27:49 eng=22328 rss=36173MB free=0.13GB spec=0.05GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:28:00 eng=22328 rss=36173MB free=0.06GB spec=0.03GB wired=3.72GB compr=4.70GB swap=1160.62M 2026-11-02 05:28:10 eng=22328 rss=36173MB free=0.09GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:28:21 eng=22328 rss=36173MB free=0.11GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:28:32 eng=22328 rss=36173MB free=0.10GB spec=0.03GB wired=3.69GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:28:43 eng=22328 rss=36173MB free=0.14GB spec=0.03GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:28:54 eng=22328 rss=36173MB free=0.16GB spec=0.03GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:29:04 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:29:15 eng=22328 rss=36173MB free=0.16GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:29:26 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:29:37 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:29:47 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:29:58 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:30:08 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:30:19 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:30:30 eng=22328 rss=36173MB free=0.15GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:30:41 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:30:51 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:31:02 eng=22328 rss=36173MB free=0.13GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:31:14 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:31:24 eng=22328 rss=36173MB free=0.16GB spec=0.04GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:31:35 eng=22328 rss=36173MB free=0.14GB spec=0.04GB wired=3.69GB compr=4.70GB swap=1160.62M 2026-11-02 05:31:46 eng=22328 rss=36173MB free=0.15GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M host_phase=idle wrapper=22272 2026-11-02 05:31:57 eng=22328 rss=36173MB free=0.18GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:32:08 eng=22328 rss=36173MB free=0.16GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:32:19 eng=22328 rss=36173MB free=0.18GB spec=0.02GB wired=3.68GB compr=4.70GB swap=1160.62M 2026-11-02 05:32:30 eng=dead free=7.06GB spec=0.51GB wired=6.44GB compr=0.95GB swap=1160.62M 2026-11-02 05:33:06 eng=87960 rss=36418MB free=0.13GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M 2026-11-02 05:33:17 eng=87960 rss=36418MB free=0.33GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:33:28 eng=87960 rss=36418MB free=0.32GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M 2026-11-02 05:33:39 eng=87960 rss=36418MB free=0.33GB spec=0.04GB wired=4.65GB compr=4.69GB swap=1160.62M 2026-11-02 05:33:49 eng=87960 rss=36418MB free=0.51GB spec=0.05GB wired=4.65GB compr=4.69GB swap=1160.62M 2026-11-02 05:34:00 eng=87960 rss=36418MB free=0.46GB spec=0.05GB wired=4.69GB compr=4.67GB swap=1160.62M 2026-11-02 05:34:10 eng=87960 rss=36418MB free=0.96GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:34:21 eng=87960 rss=36418MB free=0.99GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:34:32 eng=87960 rss=36418MB free=0.94GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:34:43 eng=87960 rss=36418MB free=0.95GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:34:53 eng=87960 rss=36418MB free=0.93GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:35:04 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:35:14 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:35:25 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:35:36 eng=87960 rss=36418MB free=0.89GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:35:46 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:35:57 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:36:08 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:36:19 eng=87960 rss=36418MB free=0.92GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:36:29 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:36:40 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:36:51 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:37:02 eng=87960 rss=36418MB free=0.91GB spec=0.05GB wired=4.66GB compr=4.67GB swap=1160.62M 2026-11-02 05:37:12 eng=87960 rss=36418MB free=0.90GB spec=0.05GB wired=4.65GB compr=4.67GB swap=1160.62M 2026-11-02 05:37:23 eng=87960 rss=36418MB free=0.91GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M 2026-11-02 05:37:34 eng=87960 rss=36418MB free=0.87GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:37:45 eng=87960 rss=36418MB free=0.87GB spec=0.06GB wired=3.67GB compr=4.66GB swap=1160.62M 2026-11-02 05:37:56 eng=87960 rss=36418MB free=0.75GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:38:06 eng=87960 rss=36418MB free=0.74GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M 2026-11-02 05:38:17 eng=87960 rss=36418MB free=0.77GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:38:28 eng=87960 rss=36418MB free=0.76GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M 2026-11-02 05:38:39 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:38:50 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:39:00 eng=87960 rss=36418MB free=0.84GB spec=0.07GB wired=3.71GB compr=4.66GB swap=1160.62M 2026-11-02 05:39:11 eng=87960 rss=36418MB free=0.85GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:39:22 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:39:32 eng=87960 rss=36418MB free=0.85GB spec=0.07GB wired=3.68GB compr=4.66GB swap=1160.62M 2026-11-02 05:39:43 eng=87960 rss=36418MB free=0.83GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M host_phase=idle wrapper=87949 2026-11-02 05:39:53 eng=87960 rss=36418MB free=0.86GB spec=0.07GB wired=3.69GB compr=4.66GB swap=1160.62M === 6. Settings that should have prevented this === state.json: beginner.gpuIdle = "never" instance config: idle_unload_s unset -> serve/server.py:9142 -> svc.idle_unload_s = 0 runtime host args: --shutdown-timeout 15.0 --owner-fd 7 (no idle timer) === 7. Host-side liveness gap (symptom B) === <HOME>/.local/state/strata/runtime/app-1.host.log = 0 bytes, across 6 self-stops and their restarts GET /api/native after death: instances[0].status = "ready", phase = "unavailable" (never corrected, never restarted) ``` </details> _(Also available as files: death forensics blocks, per-second process captures, 10-second vm_stat series, pmset power log. Happy to paste more of any section.)_
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6567814396 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6567843435 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): Thanks, this follows the format now.
Author
Owner

@ambrato commented on GitHub (Nov 4, 2026):

Update — fine-grained differential probe: the death always starts at the owner host, never at the wrapper

9 more idle self-stops since filing (16 total; including two between 01:30 and 03:10 overnight, nobody present). I upgraded the recorder to sample the two supervisor levels separately at 0.5 s granularity, purely to answer one question: does the stop order reach the wrapper directly (RPC/CLI stop), or does the wrapper only die as a side effect of its parent owner host exiting?

Verdict so far — unanimous, all 9 deaths:

2026-11-02 11:08:22.13  OWNER-HOST DIED (was 87943);  wrapper already gone too
2026-11-02 13:16:24.07  OWNER-HOST DIED (was 99740);  wrapper already gone too
2026-11-03 09:00:24.77  OWNER-HOST DIED (was 11561);  wrapper already gone too
2026-11-03 10:04:22.25  OWNER-HOST DIED (was 84046);  wrapper already gone too
2026-11-03 12:12:22.09  OWNER-HOST DIED (was 89967);  wrapper already gone too
2026-11-03 18:52:24.16  OWNER-HOST DIED (was 1614);   wrapper already gone too
2026-11-03 22:20:23.39  OWNER-HOST DIED (was 66599);  wrapper already gone too
2026-11-04 01:32:22.30  OWNER-HOST DIED (was 60044);  wrapper already gone too
2026-11-04 03:08:21.54  OWNER-HOST DIED (was 22940);  wrapper already gone too

The opposite signature — "wrapper died, owner host still alive", which an ordinary runtime stop should produce — has been observed zero times in 9 deaths. The order is always: the owner host (python3.12 -m strata_control.runtime …) disappears, and the wrapper + engine are gone within the same sub-second window. That is consistent with the owner_guard pipe-EOF → killpg(SIGTERM) channel, and also with the supervisor's own stop-and-exit path completing faster than my sample period. At 0.5 s these two are not yet separable — see the new probe at the end.

Further ruled out since filing:

  • OS-level kill of the owner host — the continuous log stream (memorystatus / jetsam / runningboardd, filtered to strata/python) is empty in every death window ±90 s; free memory at death 9.9–14.4 GB, no .ips anywhere in the chain.
  • --die-with-pid misfire — the node host pid (99679) keeps the same start time (Oct 31 09:44:39) across all 16 deaths, and procs.start_token for it still equals the --die-with-token the owner host was launched with.
  • A CLI stop — per-second process-table sampling still shows exactly one runtime stop in 6 days: the deliberate one I triggered over the host API on Oct 31 17:16.
  • A fixed timer — intervals since filing: 1 h 04 m, 2 h 08 m, 6 h 40 m, 3 h 28 m, 3 h 12 m, 1 h 36 m. And two of the deaths happened after 01:30 with nobody at the machine and no request in flight.
  • Reload does not cure anything — every death is recovered via the app's own unload → load API within ~25 s (the fresh instance registers fine, which again shows symptom B is a liveness/state gap, not a load problem); 1–7 h later the new instance dies in exactly the same way.

What every death still has in common: seconds before it, the same small internal request at the end of the wrapper's log —

[strata] done: 1 tokens in 1 s (no speed) (length, cancel=False)
[strata] the reply reached max tokens while still thinking, so it has no answer: …
[strata] stopping (Ctrl+C again to end the engine at once) …
[strata] stopped

Next probe deployed: a once-per-second snapshot of every process holding the runtime's AF_UNIX socket (~/.local/state/strata/runtime/<hash>.sock) besides the owner host itself. If the next death catches a connecting process, that process is the caller ordering the stop; if deaths keep happening with zero socket clients, the owner host is exiting on its own decision and the search space collapses to runtime.py's own exit paths around the serve loop. I will post whichever way it lands.

If there is a knob you want tested here — something that disables the readiness probe, or a debug build that logs the owner host's stop reason / exit status — I'm glad to run the experiment and report exact numbers.

<!-- gh-comment-id:6627038381 --> @ambrato commented on GitHub (Nov 4, 2026): ## Update — fine-grained differential probe: the death always starts at the owner host, never at the wrapper 9 more idle self-stops since filing (16 total; including two between 01:30 and 03:10 overnight, nobody present). I upgraded the recorder to sample the two supervisor levels separately at 0.5 s granularity, purely to answer one question: does the stop order reach the wrapper directly (RPC/CLI stop), or does the wrapper only die as a side effect of its parent owner host exiting? Verdict so far — unanimous, all 9 deaths: ```text 2026-11-02 11:08:22.13 OWNER-HOST DIED (was 87943); wrapper already gone too 2026-11-02 13:16:24.07 OWNER-HOST DIED (was 99740); wrapper already gone too 2026-11-03 09:00:24.77 OWNER-HOST DIED (was 11561); wrapper already gone too 2026-11-03 10:04:22.25 OWNER-HOST DIED (was 84046); wrapper already gone too 2026-11-03 12:12:22.09 OWNER-HOST DIED (was 89967); wrapper already gone too 2026-11-03 18:52:24.16 OWNER-HOST DIED (was 1614); wrapper already gone too 2026-11-03 22:20:23.39 OWNER-HOST DIED (was 66599); wrapper already gone too 2026-11-04 01:32:22.30 OWNER-HOST DIED (was 60044); wrapper already gone too 2026-11-04 03:08:21.54 OWNER-HOST DIED (was 22940); wrapper already gone too ``` The opposite signature — "wrapper died, owner host still alive", which an ordinary `runtime stop` should produce — has been observed **zero times in 9 deaths**. The order is always: the owner host (`python3.12 -m strata_control.runtime …`) disappears, and the wrapper + engine are gone within the same sub-second window. That is consistent with the `owner_guard` pipe-EOF → `killpg(SIGTERM)` channel, and also with the supervisor's own stop-and-exit path completing faster than my sample period. At 0.5 s these two are not yet separable — see the new probe at the end. Further ruled out since filing: * **OS-level kill of the owner host** — the continuous `log stream` (memorystatus / jetsam / runningboardd, filtered to strata/python) is empty in every death window ±90 s; free memory at death 9.9–14.4 GB, no `.ips` anywhere in the chain. * **`--die-with-pid` misfire** — the node host pid (99679) keeps the same start time (Oct 31 09:44:39) across all 16 deaths, and `procs.start_token` for it still equals the `--die-with-token` the owner host was launched with. * **A CLI stop** — per-second process-table sampling still shows exactly one `runtime stop` in 6 days: the deliberate one I triggered over the host API on Oct 31 17:16. * **A fixed timer** — intervals since filing: 1 h 04 m, 2 h 08 m, 6 h 40 m, 3 h 28 m, 3 h 12 m, 1 h 36 m. And two of the deaths happened after 01:30 with nobody at the machine and no request in flight. * **Reload does not cure anything** — every death is recovered via the app's own unload → load API within ~25 s (the fresh instance registers fine, which again shows symptom B is a liveness/state gap, not a load problem); 1–7 h later the new instance dies in exactly the same way. What every death still has in common: seconds before it, the same small internal request at the end of the wrapper's log — ```text [strata] done: 1 tokens in 1 s (no speed) (length, cancel=False) [strata] the reply reached max tokens while still thinking, so it has no answer: … [strata] stopping (Ctrl+C again to end the engine at once) … [strata] stopped ``` Next probe deployed: a once-per-second snapshot of every process holding the runtime's AF_UNIX socket (`~/.local/state/strata/runtime/<hash>.sock`) **besides the owner host itself**. If the next death catches a connecting process, that process is the caller ordering the stop; if deaths keep happening with zero socket clients, the owner host is exiting on its own decision and the search space collapses to `runtime.py`'s own exit paths around the serve loop. I will post whichever way it lands. If there is a knob you want tested here — something that disables the readiness probe, or a debug build that logs the owner host's stop reason / exit status — I'm glad to run the experiment and report exact numbers.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello ambrato,

Thank you for the long log. We found two causes and fixed both in Strata 0.2.11. On macOS without psutil the runtime owner followed the app host through a ps call with a 5-second limit, and any failed look was read as "app gone", so it stopped the engine cleanly and silently. A changed start time still ends it at once, but a failed look now needs three in a row and a failed liveness check, and it writes a line in host.log. The app also stays at ready/unavailable forever: after three failed polls it now asks Control and marks the instance stopped if Control says so. In a 20-minute idle test the instance stayed ready every time. If it still stops itself on 0.2.11, please send host.log.

The Strata project

<!-- gh-comment-id:6658454907 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello ambrato, Thank you for the long log. We found two causes and fixed both in Strata 0.2.11. On macOS without psutil the runtime owner followed the app host through a `ps` call with a 5-second limit, and any failed look was read as "app gone", so it stopped the engine cleanly and silently. A changed start time still ends it at once, but a failed look now needs three in a row and a failed liveness check, and it writes a line in `host.log`. The app also stays at ready/unavailable forever: after three failed polls it now asks Control and marks the instance stopped if Control says so. In a 20-minute idle test the instance stayed ready every time. If it still stops itself on 0.2.11, please send `host.log`. The Strata project
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
Niko1221/Strata#2288
No description provided.