mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[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
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1874
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 owntaskkillgets "Access is denied", and the engine keeps the profile's port. The surviving processes cannot be ended from the same non-elevated shell bytaskkill,strata runtime stop,strata runtime cleanuporstrata launch --stop. Only an elevatedtaskkill, 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 --versionbefore submittingparallel 4, host 127.0.0.1, port 8080, tuning preset applied. Profile name:launch-ud-iq4_xs-256k-p4.Steps to reproduce
strata launch) and nothing already listening on its port.<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 --profilestarted is stopped by the same user that started it. Port 8080 is free afterwards.Actual
The benchmark completes (
results.jsonhas statuscomplete). Then Strata writesENGINE-NOT-STOPPED.txt, which says:taskkillfor PID 36376 failed (exit code 128)Afterwards:
python.exeGetOwner; holds port 8080strata.exestrata launch --stop→ "Nothing fromstrata launchis 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 /Tfrom the same non-elevated shell → "Access is denied"taskkillfrom an elevated shell works.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:
This stops cleanly each time, so the problem seems specific to the engine that
bench run --profilestarts itself (viastrata 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
taskkillis refused. This is a guess based on the symptoms; I have not verified it.Related inconsistencies (same as noted in #3940)
results.jsonshows statuscomplete.runtime status/runtime stop/runtime cleanupdisagree with the actual process table, because they do not seem to know about bench-started servers.Suggestions / open questions
strata runtime cleanup/runtime stopadopt servers started bybench run?results.jsoncarry a machine-readable field such asengine_stopped: false, so a failed cleanup can be seen in submissions?bench run --profilerefuse 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.logand 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.
@Niko1221 commented on GitHub (Nov 5, 2026):
Hello mistral13,
Thank you. In Strata 0.2.11
bench run --profileputs 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
@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:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.