You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows sandbox: scripts hang at a child process spawned with piped stdio (libuv#5178) #1165
On Windows, a sandboxed lifecycle script hangs at the first child process it spawns with piped stdio. Found during the Windows 11 ARM64 verification pass (item 13).
What happens
The symptom: a script's child_process.spawnSync('whoami.exe', { stdio: 'pipe' }) never returns. The same call returns in 263 ms outside the sandbox.
The first run spun at about 100% CPU for over 6 minutes, with no child process, until lpm was killed.
This happens in every sandbox mode.
What works: spawns that give the child file handles, or stdio: 'ignore', return normally.
Who hits it: any approved lifecycle script that runs a tool and reads its output, such as through execSync, or spawnSync with its default stdio: 'pipe'.
lpm can't change the pipe names libuv picks, and an unelevated lpm can't open the global pipe namespace to an AppContainer. Mitigations to decide on:
Say what is happening: when a sandboxed script's Node (process.versions.uv) is older than 1.53.0, say so if the script runs long or fails, and point to the upstream fix.
Check it ahead of time: a lpm doctor check that reports the Node on PATH as affected.
Document it: the Windows sandbox docs, with the workaround of running the affected package's scripts unsandboxed after review.
Once a Node release bundles libuv 1.53.0, the check can name the first fixed version.
lpm's part shipped in #1208 (9d91dcc), released in v0.87.0. Before scripts start, a sandboxed run on Windows asks the host's node which libuv it bundles. If that libuv is older than 1.53.0, lpm warns once, and names this hang as a possible cause when a script runs out of time. The probe never runs a node the project controls, and it has a two-second limit.
The fix itself is upstream: libuv 1.53.0 (libuv/libuv#5181). As of 2026-11-20 no Node release bundles it. v26.13.1 and the v27 alphas ship libuv 1.52.1, and nodejs/node#66282 is still open. Once a Node release bundles 1.53.0, the warning applies only to older Node versions, and lpm needs no further change.
Activity
tolgaergin commentedon Nov 20, 2026
lpm's part shipped in #1208 (9d91dcc), released in v0.87.0. Before scripts start, a sandboxed run on Windows asks the host's
nodewhich libuv it bundles. If that libuv is older than 1.53.0, lpm warns once, and names this hang as a possible cause when a script runs out of time. The probe never runs anodethe project controls, and it has a two-second limit.The fix itself is upstream: libuv 1.53.0 (libuv/libuv#5181). As of 2026-11-20 no Node release bundles it. v26.13.1 and the v27 alphas ship libuv 1.52.1, and nodejs/node#66282 is still open. Once a Node release bundles 1.53.0, the warning applies only to older Node versions, and lpm needs no further change.