[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

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

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 in STOP_PENDING, Get-CimInstance Win32_OperatingSystem does not answer in 40 s), the desktop app could no longer load any model:

  • Models page: «Strata Control did not answer within 60 s (models list).» with the «Подключить движок» (Connect engine) button, and «Эта установка не сообщает о поддерживаемой видеокарте» (the install reports no supported GPU).
  • GET /api/native → "available": false, catalog.error: «The native engine did not respond in time. Check engine logs.»; GET /api/native?refresh=1 takes exactly 60 s and returns the same.
  • Restarting the app does not help while WMI is stuck. nvidia-smi itself 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() calls platform.system() / platform.machine(). On the bundled Python 3.12 these go through platform.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 by faulthandler after 25 s; without it the command was still silent after 3 minutes):

File "...\Strata\control\python\Lib\platform.py", line 327 in _wmi_query
File "...\Strata\control\python\Lib\platform.py", line 388 in _win32_ver
File "...\Strata\control\python\Lib\platform.py", line 450 in win32_ver
File "...\Strata\control\python\Lib\platform.py", line 922 in uname
File "...\Strata\control\python\Lib\platform.py", line 987 in system
File "...\Strata\control\strata_control\targets.py", line 33 in host_platform
File "...\Strata\control\strata_control\engine_component.py", line 914 in resolve
File "...\Strata\control\strata_control\engine_component.py", line 1016 in expand
File "...\Strata\control\strata_control\doctor.py", line 35 in _location
File "...\Strata\control\strata_control\doctor.py", line 167 in inspect
File "...\Strata\control\strata_control\models.py", line 178 in _inspect_one
File "...\Strata\control\strata_control\models.py", line 202 in list_installed
File "...\Strata\control\strata_cli\cli.py", line 588 in _models
File "...\Strata\control\strata_cli\cli.py", line 2141 in _run
File "...\Strata\control\strata_cli\cli.py", line 2253 in main
File "strata.py", line 43 in <module>

The same code is on main today: 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() in host_platform() — e.g. sys.platform == "win32" for the OS and os.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

  1. Have WMI unresponsive (here it happened on its own; it shows as winmgmt stuck in STOP_PENDING and Get-CimInstance not answering).
  2. Start the desktop app → Models page shows «Strata Control did not answer within 60 s (models list).» and no supported GPU; loading a model is refused.
  3. Or directly: control\python\python.exe strata.py models list --json (with the app's STRATA_* 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)

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 in `STOP_PENDING`, `Get-CimInstance Win32_OperatingSystem` does not answer in 40 s), the desktop app could no longer load any model: - Models page: **«Strata Control did not answer within 60 s (models list).»** with the «Подключить движок» (Connect engine) button, and «Эта установка не сообщает о поддерживаемой видеокарте» (the install reports no supported GPU). - `GET /api/native` → `"available": false`, `catalog.error`: «The native engine did not respond in time. Check engine logs.»; `GET /api/native?refresh=1` takes exactly 60 s and returns the same. - Restarting the app does not help while WMI is stuck. `nvidia-smi` itself 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()` calls `platform.system()` / `platform.machine()`. On the bundled **Python 3.12** these go through `platform.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 by `faulthandler` after 25 s; without it the command was still silent after 3 minutes): ``` File "...\Strata\control\python\Lib\platform.py", line 327 in _wmi_query File "...\Strata\control\python\Lib\platform.py", line 388 in _win32_ver File "...\Strata\control\python\Lib\platform.py", line 450 in win32_ver File "...\Strata\control\python\Lib\platform.py", line 922 in uname File "...\Strata\control\python\Lib\platform.py", line 987 in system File "...\Strata\control\strata_control\targets.py", line 33 in host_platform File "...\Strata\control\strata_control\engine_component.py", line 914 in resolve File "...\Strata\control\strata_control\engine_component.py", line 1016 in expand File "...\Strata\control\strata_control\doctor.py", line 35 in _location File "...\Strata\control\strata_control\doctor.py", line 167 in inspect File "...\Strata\control\strata_control\models.py", line 178 in _inspect_one File "...\Strata\control\strata_control\models.py", line 202 in list_installed File "...\Strata\control\strata_cli\cli.py", line 588 in _models File "...\Strata\control\strata_cli\cli.py", line 2141 in _run File "...\Strata\control\strata_cli\cli.py", line 2253 in main File "strata.py", line 43 in <module> ``` The same code is on `main` today: `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()` in `host_platform()` — e.g. `sys.platform == "win32"` for the OS and `os.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 1. Have WMI unresponsive (here it happened on its own; it shows as `winmgmt` stuck in `STOP_PENDING` and `Get-CimInstance` not answering). 2. Start the desktop app → Models page shows «Strata Control did not answer within 60 s (models list).» and no supported GPU; loading a model is refused. 3. Or directly: `control\python\python.exe strata.py models list --json` (with the app's `STRATA_*` 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)
Author
Owner

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

Thanks for the faulthandler stack — it is exactly the WMI path. On Windows platform.system() and platform.machine() both go through platform.uname(), which in Python 3.12 reads WMI with no timeout, so a stuck winmgmt hangs every Control command that resolves an engine component.

Pull request #5185 reads sys.platform and PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE instead — the same values platform.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).

<!-- gh-comment-id:6624335422 --> @XiaoBinGan commented on GitHub (Nov 4, 2026): Thanks for the faulthandler stack — it is exactly the WMI path. On Windows `platform.system()` and `platform.machine()` both go through `platform.uname()`, which in Python 3.12 reads WMI with no timeout, so a stuck `winmgmt` hangs every Control command that resolves an engine component. Pull request #5185 reads `sys.platform` and `PROCESSOR_ARCHITEW6432`/`PROCESSOR_ARCHITECTURE` instead — the same values `platform.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`).
Author
Owner

@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 --plan asked 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, and nvidia-smi is 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

<!-- gh-comment-id:6658456703 --> @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 --plan` asked 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, and `nvidia-smi` is 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
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#2291
No description provided.