[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

Chiusa Adatta ai principianti
#4,975 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@XiaoBinGan ci sta già lavorando.

Dal 4/11/2026.

  • #5185 di @XiaoBinGan — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Il blocco inizia in host_platform() in strata_control/targets.py (righe 33 e 36), che chiama platform.system() e platform.machine(). Leggi la catena di chiamate da engine_component.py resolve/expand e doctor.py _location, poi verifica se qualche test copre host_platform. Il lavoro è completo quando host_platform() su Windows legge sistema operativo e architettura senza chiamare platform.uname() o WMI, e i test esistenti per targets continuano a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

Lingua principale
C++
Stelle
11.6k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.