Repository navigation
Replies: 1 comment
|
Confirming this independently — same error, same OS build, different trigger. Environment: Windows 11 Home China (10.0.26200), Node v24.16.0, koffi 3.3.1, dsh 0.1.5-rc.3 (launched via a local launcher, not npx). Hit the exact same failure: on a trivial command ( A second trigger branch, distinct from AV injection. In my case it was not antivirus/HIPS. It was a degraded/orphaned host: a stale watchdog ( So the trigger surface is broader than AV injection: a long-lived host that has gone degraded makes the runner fail this exact way. Worth documenting because it means "restart the host" is a legitimate first-line fix, and the probe/fallback fix here would cover both trigger classes. Strong +1 on both proposed fixes:
|
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh0.1.5-rc.2 (npm global install),@deepseek-ai/dsh-subprocess-localdsh web(web profile,127.0.0.1:3080), sandboxworkspace-writeSymptom
Every subprocess-backed tool (
pwsh,glob,grep) fails with:3221225794=0xC0000142=STATUS_DLL_INIT_FAILED. Reproduces for any command(even
echo/"ok"). Pure file tools (read/write/edit) keep working. Within asingle session it worked for a while, then every subsequent spawn failed — consistent
with an environmental trigger, not a command-specific bug.
Root cause
The Windows containment path is fail-closed with no runtime fallback.
In
packages/subprocess/subprocess-local(lib/index.js):selectContainmentMode()forkind === "ordinary"on win32 returns"windows-job"whenever
probeWindowsJob()returns true, else"fallback".probeWindowsJob()only performs static checks:runnerInvocationAvailable()usesaccessSync(file exists/readable), thenloadWin32ProcessBindings()andprobeCurrentTokenJobSupport()verify the bindings load. It never actuallylaunches the runner.
launchWindowsJob) cannotinitialize — e.g. it exits at loader init with 0xC0000142, which we observed under a
Lenovo PCManager / Huorong AV — the static probe still passes, DSH commits to
"windows-job", and the otherwise-goodspawnSubprocessdirect-spawn fallback isnever reached. The entire subprocess tool surface dies.
Proposed fix
Add a cheap real launch probe to
probeWindowsJob()(per-spawn or cached): spawn therunner via
spawnSyncwith the same env, and treat "reached JavaScript" as healthy(a bare runner without its IPC channel exits 127), while any NTSTATUS init failure
(status >= 0xC0000000, or any exit other than 127/null) means the runner cannot start
→ return
false→selectContainmentModefalls back tospawnSubprocess.Also worth improving: the
closehandler inlaunchWindowsJobdiscards the root cause("exited with exit code N before proving its managed range empty"). Mapping the NTSTATUS
code to a name (0xC0000142 → STATUS_DLL_INIT_FAILED) plus a hint (antivirus/HIPS
injection, broken native dependency, desktop-heap exhaustion) would cut diagnosis time
dramatically. The runner's own stderr is also currently
ignored.I have a working patch (real-launch probe + fallback + error mapping) and can turn it
into a PR if you'd like — it restored pwsh/glob/grep immediately in the affected
environment.
All reactions