#6270 [Engine] vision: every picture fails with 'ERR cannot write <hash>.sve' on PCs where Windows blocks file creation by newly-landed unsigned binaries (work dir is under %TEMP%)
open · @udqe · 0 comments · View on GitHub
NVIDIA / CUDAModels & quantsSecurityWindows
Description
After adopting 0.2.14 (engine 0.1.60) every picture request failed with `ERR cannot write <hash>.sve` and, because our chat history replays the picture on every turn, the whole conversation was dead: every later message (even text-only ones) came back 400 on the same `<hash>.sve`. Same on 0.2.15/0.1.62. Before concluding it was the engine I chased this to ground; the root cause is our machine's Windows, but the failure mode is 100% reproducible for any user of a PC with the same protection, and the engine knows nothing about it. Sharing the whole fact set because three small changes would turn this into a self-healing or self-explaining event. ## What the machine actually does (proven, not theory) Windows on this PC refuses file creation by **unsigned binaries that landed recently** anywhere under `%USERPROFILE%` (incl. `%APPDATA%\Local\Temp`). Proven with a compiled 8-line C program that only calls `fopen(name,"wb")` in a fresh temp dir: EACCES. Same result run from a scheduled task, fully outside any parent chain; `cmd.exe` copied next to it writes fine (signed), an old file of the same unsigned program passes (pre-baseline), a freshly copied old build fails (landed now), and writing to the same-named file under `C:\Windows\Temp` or a whitelisted folder succeeds. Defender's operational log records nothing; SAC off, no ASR rule, no non-Microsoft filter visible. So: an environmental protection with **no event log and a generic errno 13**. ## Why that kills vision but not the engine `Vision.work_dir()` creates its folder under the system temp dir first (`%TEMP%\strata-vision-XXXX`), and strata-vision writes `.sve` (and its `strata-vision-meta-*.gguf`) there. The vision binary is fresh after every update and unsigned (`Get-AuthenticodeSignature`: NotSigned on all feed builds, 0.1.57 through 0.1.62), so every creation under that folder is refused. The engine binary is not the problem - it does not write under Temp for serving. Version history on this PC, all consistent with the protection: | binary | landed | writes .sve | | --- | --- | --- | | engine 0.1.57 feed | Oct | yes | | engine 0.1.60 feed (0.2.14) | 11-16 | refused (Temp) | | engine 0.1.62 (0.2.16) | 11-19 | refused (Temp) | | 0.1.57 binary re-copied | fresh copy | refused (the copy is new) | ## Workaround we run now A launcher that sets `TMP`/`TEMP` to a folder on the protected list before starting the server puts `work_dir()` there and everything works: 200s, correct picture answers, 92 KB `.sve` files, no config change. (The meta-gguf write still fails because it resolves through the known-folder API which ignores TMP; that is non-fatal, the reader reaches READY and encodes.) ## What would help 1. **Authenticode-sign the Windows binaries.** The release assets carry cosign `.sig` files, but Windows reputation/EDR policy only cares about Authenticode, and every protection like this keys on "unsigned and newly landed". 2. **Prefer a work dir outside the user temp** when the temp one misbehaves: e.g. a `strata-vision` folder beside the model or under Strata's data folder (the `work_dir` chain already falls back to cwd and drive root - it just never sees the failure because mkdtemp itself succeeds; it is the *encoder's* writes that are refused). At minimum, when the reader replies `ERR cannot write X` twice for fresh files, retry once with the next work_dir candidate. 3. **Surface `ERR cannot write` as its own error.** Today it becomes a generic 400 per message; because history replays the picture, one bad turn poisons the whole chat with 400s pointing at a temp path most users will not find. A line like "the picture encoder cannot write to its temp folder (antivirus or policy blocking a new strata-vision.exe?)" would make this self-diagnosing. Environment: Windows 11 x64, RTX 4090 pair, engine feed 0.2.14/0.2.15/0.2.16, Qwen3.8-Flash-Next native pack, vision mmproj BF16, default `--vision` config. Happy to run any diagnostic build on the box - the repro is a one-line C program and the five-minute scheduled task.
Related on this site
Quick links to related pages.