mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4975] [Other] Control hangs in platform.system() when Windows WMI is stuck: «Strata Control did not answer within 60 s (models list)», no GPU, nothing loads #2291
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#2291
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 @danscMax on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4975
Area
[Other] (anything else, including setup and installation) — Strata Control
Desktop app, Terminal or source?
Desktop app (Windows, Linux or Mac)
What happened
After the Windows WMI service (
winmgmt) got stuck on this PC (it stays inSTOP_PENDING,Get-CimInstance Win32_OperatingSystemdoes not answer in 40 s), the desktop app could no longer load any model:GET /api/native→"available": false,catalog.error: «The native engine did not respond in time. Check engine logs.»;GET /api/native?refresh=1takes exactly 60 s and returns the same.nvidia-smiitself answers in 0.08 s at the same time, so the GPU and driver are fine.The cause is in Control, not the engine:
host_platform()callsplatform.system()/platform.machine(). On the bundled Python 3.12 these go throughplatform.uname()→win32_ver()→_wmi_query(), a WMI call with no timeout, so every Control command that resolves the engine component blocks for as long as WMI does.Stack of
strata.py models list --json(run by hand with the app's own Python and environment, dumped byfaulthandlerafter 25 s; without it the command was still silent after 3 minutes):The same code is on
maintoday:strata_control/targets.py:33(platform.system()) and:36(platform.machine()).Expected: a stuck WMI should not take the whole app down — the OS and architecture are known without WMI.
Possible fix (not tested): on Windows avoid
platform.uname()inhost_platform()— e.g.sys.platform == "win32"for the OS andos.environ.get("PROCESSOR_ARCHITEW6432") or os.environ.get("PROCESSOR_ARCHITECTURE")(AMD64/ARM64) for the architecture — or compute it once and cache it. Related, different code path: #3939 (Monitor's WMI polling).Smallest steps or command that reproduce it
winmgmtstuck inSTOP_PENDINGandGet-CimInstancenot answering).control\python\python.exe strata.py models list --json(with the app'sSTRATA_*environment) never returns.Reproduction status
Reproduced locally
Strata version
Strata 0.2.9 · engine 0.1.55 (windows-x86_64-cuda), Control on bundled Python 3.12.15
Graphics card, memory and system
RTX 5090 32 GB · 62 GB RAM · Windows 11 Pro 26200
Model, size and settings
Qwen3.8-Flash-Next IQ3_S (GSQ-RCO) · 384K context · pictures on (not relevant: nothing could be loaded)
@XiaoBinGan commented on GitHub (Nov 4, 2026):
Thanks for the faulthandler stack — it is exactly the WMI path. On Windows
platform.system()andplatform.machine()both go throughplatform.uname(), which in Python 3.12 reads WMI with no timeout, so a stuckwinmgmthangs every Control command that resolves an engine component.Pull request #5185 reads
sys.platformandPROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTUREinstead — the same valuesplatform.uname()reads on Windows — so no WMI call is made. The new test stubs that entire source and asserts the answer still comes back (windows-x86_64,windows-arm64,macos-arm64,linux-aarch64).@Niko1221 commented on GitHub (Nov 5, 2026):
Hello danscMax,
Thank you, this was a clear one. In Strata 0.2.11 Control no longer asks WMI for the operating system and architecture on Windows; they come from the environment and the process, with a test that simulates a stuck WMI. We also found that
strata launch --planasked the display adapter question 18 times in one run (26 child processes, 15 to 17 seconds); it is asked once per process and 2 minutes now, andnvidia-smiis cached for 30 seconds. PR #5185 pointed at the same call. If "did not answer within 60 s" still appears on 0.2.11, please send the log line before it.The Strata project