[GH-ISSUE #4260] [Other] [Benchmark] bench run --profile leaves the engine running on Windows: Strata's own taskkill fails with "Access is denied" and the process cannot be stopped from the same non-elevated shell #1874

Closed
opened 2026-11-04 01:54:56 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @mistral13 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4260

Summary

On Windows, strata bench run --profile <name> completes the benchmark but then fails to stop the engine it started itself. Strata's own taskkill gets "Access is denied", and the engine keeps the profile's port. The surviving processes cannot be ended from the same non-elevated shell by taskkill, strata runtime stop, strata runtime cleanup or strata launch --stop. Only an elevated taskkill, or closing the console window the benchmark ran in, ends them. The next benchmark or launch on that profile then fails or attaches to a stale server.

This looks like the same symptom as #3940 (open), with extra evidence below. It is also related to #3916 (same message from an MSIX-packaged desktop app launch) and to the ENGINE-NOT-STOPPED.txt sidecar added in #3938.

I reproduced this myself on the machine below. I did not read the source. The cause (see "Hypothesis") is unconfirmed.

Environment

  • Strata terminal: 0.2.3.1 (build 0.1.48.1) — please verify with strata --version before submitting
  • OS: Windows 11
  • Machine: HP ZBook Ultra G1a, AMD Ryzen AI Max+ PRO 395, Radeon 8060S (gfx1151)
  • RAM / VRAM: 128 GB RAM, 64 GB of it reserved as GPU memory
  • Model / config: Qwen3.8-Flash-Next, UD-IQ4_XS, 256k context, int8 KV cache, parallel 4, host 127.0.0.1, port 8080, tuning preset applied. Profile name: launch-ud-iq4_xs-256k-p4.
  • Shell: normal, non-elevated PowerShell. The benchmark was started from a Python wrapper in its own console window.

Steps to reproduce

  1. Use an existing saved profile (here created by strata launch) and nothing already listening on its port.
  2. From a non-elevated shell run:
    strata bench run --profile launch-ud-iq4_xs-256k-p4 --out <dir> --track custom --track-notes "<notes>" --load-timeout 600 --model-revision unsloth/Qwen3.8-Flash-Next-GGUF --optional-concurrency --output json
    
  3. Wait for the benchmark to finish (22 requests).
  4. Check <dir>/ENGINE-NOT-STOPPED.txt, the process list and port 8080.

It happened in several runs on this machine. I have not counted how often it happens. In earlier runs the stop sometimes worked.

Expected

After the benchmark, the engine that bench run --profile started is stopped by the same user that started it. Port 8080 is free afterwards.

Actual

The benchmark completes (results.json has status complete). Then Strata writes ENGINE-NOT-STOPPED.txt, which says:

  • taskkill for PID 36376 failed (exit code 128)
  • PID 35332 (child of 36376): "Access is denied"
  • PID 36376 (child of PID 7904) could not be terminated
  • the process was still running 30 s later

Afterwards:

Process PID Notes
python.exe 36376 owner not readable via CIM GetOwner; holds port 8080
strata.exe 35332 child of 36376
  • strata launch --stop → "Nothing from strata launch is running."
  • strata runtime stop --profile launch-ud-iq4_xs-256k-p4 → "runtime is not managed or is stopped"
  • strata runtime cleanup → "ended 0 leftover process(es)"
  • taskkill /F /PID 36376 /T from the same non-elevated shell → "Access is denied"
  • taskkill from an elevated shell works.
  • Closing the console window the benchmark was started from also ends both processes.

So the processes are alive and hold the port, but Strata's own stop paths do not see or cannot touch them.

Workaround that works without administrator rights

Starting the server with the runtime commands first, then benchmarking against it:

strata runtime start --profile NAME
strata bench run --profile NAME ...     # uses the already-running server
strata runtime stop --profile NAME

This stops cleanly each time, so the problem seems specific to the engine that bench run --profile starts itself (via strata serve).

Hypothesis (unconfirmed)

The processes that survive appear to run in a different security context or integrity level than the shell that tries to kill them. I could not read their owner, and a normal-integrity taskkill is refused. This is a guess based on the symptoms; I have not verified it.

  • The console reports the stop as failed while results.json shows status complete.
  • runtime status / runtime stop / runtime cleanup disagree with the actual process table, because they do not seem to know about bench-started servers.

Suggestions / open questions

  • Should a bench-started engine be started so that the same user can always stop it (same token and integrity)?
  • Should strata runtime cleanup / runtime stop adopt servers started by bench run?
  • Could results.json carry a machine-readable field such as engine_stopped: false, so a failed cleanup can be seen in submissions?
  • Should bench run --profile refuse to start, or warn, when a leftover engine from an earlier run is still holding the profile's port?

Logs

Sanitized excerpts are above. The full ENGINE-NOT-STOPPED.txt, results.json, bench.log and the process table can be attached on request. No credentials or private content are in them.

Disclosure: the diagnosis and this write-up were prepared with AI assistance. All observations come from my own runs and command output.

Originally created by @mistral13 on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4260 ## Summary On Windows, `strata bench run --profile <name>` completes the benchmark but then fails to stop the engine it started itself. Strata's own `taskkill` gets "Access is denied", and the engine keeps the profile's port. The surviving processes cannot be ended from the same non-elevated shell by `taskkill`, `strata runtime stop`, `strata runtime cleanup` or `strata launch --stop`. Only an elevated `taskkill`, or closing the console window the benchmark ran in, ends them. The next benchmark or launch on that profile then fails or attaches to a stale server. This looks like the same symptom as #3940 (open), with extra evidence below. It is also related to #3916 (same message from an MSIX-packaged desktop app launch) and to the ENGINE-NOT-STOPPED.txt sidecar added in #3938. I reproduced this myself on the machine below. I did not read the source. The cause (see "Hypothesis") is unconfirmed. ## Environment - Strata terminal: 0.2.3.1 (build 0.1.48.1) — *please verify with `strata --version` before submitting* - OS: Windows 11 - Machine: HP ZBook Ultra G1a, AMD Ryzen AI Max+ PRO 395, Radeon 8060S (gfx1151) - RAM / VRAM: 128 GB RAM, 64 GB of it reserved as GPU memory - Model / config: Qwen3.8-Flash-Next, UD-IQ4_XS, 256k context, int8 KV cache, `parallel 4`, host 127.0.0.1, port 8080, tuning preset applied. Profile name: `launch-ud-iq4_xs-256k-p4`. - Shell: normal, non-elevated PowerShell. The benchmark was started from a Python wrapper in its own console window. ## Steps to reproduce 1. Use an existing saved profile (here created by `strata launch`) and nothing already listening on its port. 2. From a non-elevated shell run: ``` strata bench run --profile launch-ud-iq4_xs-256k-p4 --out <dir> --track custom --track-notes "<notes>" --load-timeout 600 --model-revision unsloth/Qwen3.8-Flash-Next-GGUF --optional-concurrency --output json ``` 3. Wait for the benchmark to finish (22 requests). 4. Check `<dir>/ENGINE-NOT-STOPPED.txt`, the process list and port 8080. It happened in several runs on this machine. I have not counted how often it happens. In earlier runs the stop sometimes worked. ## Expected After the benchmark, the engine that `bench run --profile` started is stopped by the same user that started it. Port 8080 is free afterwards. ## Actual The benchmark completes (`results.json` has status `complete`). Then Strata writes `ENGINE-NOT-STOPPED.txt`, which says: - `taskkill` for PID 36376 failed (exit code 128) - PID 35332 (child of 36376): "Access is denied" - PID 36376 (child of PID 7904) could not be terminated - the process was still running 30 s later Afterwards: | Process | PID | Notes | |---|---|---| | `python.exe` | 36376 | owner not readable via CIM `GetOwner`; holds port 8080 | | `strata.exe` | 35332 | child of 36376 | - `strata launch --stop` → "Nothing from `strata launch` is running." - `strata runtime stop --profile launch-ud-iq4_xs-256k-p4` → "runtime is not managed or is stopped" - `strata runtime cleanup` → "ended 0 leftover process(es)" - `taskkill /F /PID 36376 /T` from the same non-elevated shell → "Access is denied" - `taskkill` from an **elevated** shell works. - Closing the console window the benchmark was started from also ends both processes. So the processes are alive and hold the port, but Strata's own stop paths do not see or cannot touch them. ## Workaround that works without administrator rights Starting the server with the runtime commands first, then benchmarking against it: ``` strata runtime start --profile NAME strata bench run --profile NAME ... # uses the already-running server strata runtime stop --profile NAME ``` This stops cleanly each time, so the problem seems specific to the engine that `bench run --profile` starts itself (via `strata serve`). ## Hypothesis (unconfirmed) The processes that survive appear to run in a different security context or integrity level than the shell that tries to kill them. I could not read their owner, and a normal-integrity `taskkill` is refused. This is a guess based on the symptoms; I have not verified it. ## Related inconsistencies (same as noted in #3940) - The console reports the stop as failed while `results.json` shows status `complete`. - `runtime status` / `runtime stop` / `runtime cleanup` disagree with the actual process table, because they do not seem to know about bench-started servers. ## Suggestions / open questions - Should a bench-started engine be started so that the same user can always stop it (same token and integrity)? - Should `strata runtime cleanup` / `runtime stop` adopt servers started by `bench run`? - Could `results.json` carry a machine-readable field such as `engine_stopped: false`, so a failed cleanup can be seen in submissions? - Should `bench run --profile` refuse to start, or warn, when a leftover engine from an earlier run is still holding the profile's port? ## Logs Sanitized excerpts are above. The full `ENGINE-NOT-STOPPED.txt`, `results.json`, `bench.log` and the process table can be attached on request. No credentials or private content are in them. *Disclosure: the diagnosis and this write-up were prepared with AI assistance. All observations come from my own runs and command output.*
Author
Owner

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

Hello mistral13,

Thank you. In Strata 0.2.11 bench run --profile puts the engine tree it starts into a job object and ends it through that first, then by taskkill /T, then by the process handle. The "still running" report appears only if all three fail. We simulated a refused taskkill and it still ends; we could not reproduce the real "Access is denied" (integrity level or antivirus). Please try 0.2.11 and tell us if the engine is still left running.

The Strata project

<!-- gh-comment-id:6658488054 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello mistral13, Thank you. In Strata 0.2.11 `bench run --profile` puts the engine tree it starts into a job object and ends it through that first, then by taskkill /T, then by the process handle. The "still running" report appears only if all three fail. We simulated a refused taskkill and it still ends; we could not reproduce the real "Access is denied" (integrity level or antivirus). Please try 0.2.11 and tell us if the engine is still left running. The Strata project
Author
Owner

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

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660167516 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1874
No description provided.