vp migrate hangs indefinitely (0% CPU) when the project's pinned pnpm deadlocks during install
维护者通常 1 天内回复
@fengmk2 已经在做这个了。
开始于 2026年7月2日。
评估
这个 Issue 还没有评估数据。
描述
Summary
vp migrate can hang indefinitely at 0% CPU (no output, no progress, no timeout) on some projects. The hang is in the dependency install that migrate spawns: the project's pinned pnpm 9.x deadlocks on an internal worker pipe. Because vp migrate has no timeout or hang detection, the command never returns and must be killed manually.
Discovered while smoke-testing the v0.2.2 prerelease (PR #2016, registry-bridge commit 1d7ba811f0e456640b0e761e8e8acf77d1ad3251) across ~64 real-world projects: 2 of them hang every time, the other ~62 migrate fine.
Affected projects (100% reproducible)
| Project | Pinned pnpm | Node |
|---|---|---|
anywidget |
[email protected] |
24.18.0 |
vitepress-carbon |
[email protected] |
22.18.0 (.node-version) |
Both are pnpm monorepos. ~62 other projects in the same run (mostly newer pnpm) migrated successfully through the same registry bridge, so this is specific to these projects' resolution + their old pinned pnpm.
Symptom
vp migrate prints nothing after startup and never returns:
Running vp migrate in /Users/.../anywidget
<-- hangs here forever; killed after 20 min every time -->
- The
vpprocess and itsnode/pnpmchildren all sit at 0.0% CPU (idle deadlock, not a busy loop). - Not a stdin prompt: reproduces identically with
stdinredirected from/dev/null. - Not concurrency: reproduces when run solo with nothing else installing.
Root-cause evidence
The hung process is the install that migrate spawns:
node .../pkg-pr-new/<sha>/package_manager/pnpm/9.10.0/pnpm/bin/pnpm.cjs install --no-frozen-lockfile
Stack sample of the hung node/pnpm main thread (sample <pid>):
node::SpinEventLoopInternal
uv_run
uv__io_poll
kevent <-- main thread parked in the event loop waiting on an fd
lsof of the hung process shows no TCP/network connections — only internal PIPE fds:
node <pid> ... 4 PIPE 0x...->0x...
node <pid> ... 5 PIPE 0x...->0x...
node <pid> ... 12 PIPE 0x...->0x...
node <pid> ... 13 PIPE 0x...->0x...
So it is not stalled on the registry/network. pnpm's main process is blocked in the event loop waiting on an internal worker pipe that never signals, i.e. an internal pnpm worker-IPC deadlock (same class as the pnpm 11.0.6 "hangs after Done" bug that was fixed in 11.5.1, but here on pnpm 9.x).
Reproduction
# via the pkg.pr.new bridge migrate helper
ALLOW_DIRTY=1 .github/scripts/test-pkg-pr-new-migrate.sh \
1d7ba811f0e456640b0e761e8e8acf77d1ad3251 /path/to/anywidget --no-interactive
# ...or plainly: cd anywidget && vp migrate
# hangs at "Running vp migrate ..." with 0% CPU; sample/lsof the pnpm child as above.
Impact
vp migratenever completing is a poor failure mode: no error, no timeout, silent 0%-CPU hang; a CI or a user waits forever.- In an automated fleet run it also leaves orphaned hung pnpm processes behind (observed several, up to 1h+ old) that must be reaped manually.
Suggested directions
- Add a timeout / hang detection to the install step of
vp migrateso it fails loudly (with the pnpm command + partial output) instead of hanging silently forever. This alone converts the worst part (silent infinite hang) into an actionable error. - Consider running the migrate install with vp's managed/bundled pnpm (newer) rather than the project's old pinned
[email protected]that deadlocks, or expose a flag to opt into that. - Investigate the underlying pnpm 9.x worker-pipe deadlock on these two projects' graphs (likely reproducible with a plain
[email protected] installonanywidget).
Found during the v0.2.2 real-world test; see https://github.com/voidzero-dev/vite-plus/pull/2016 for the prerelease build under test.
- 主要语言
- Rust
- 星标
- 5.8k
- 派生
- 267
- 平均合并
- 20 小时 45 分钟
- 30 天内合并 PR
- 142
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-plus 的其他 Issue
-
pending triage
难度 2/5 1-3 小时 新手友好度 84/100
voidzero-dev/vite-plus#2854 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
voidzero-dev/vite-plus#2849 ·
维护者通常 1 天内回复
-
pending triage
难度 2/5 1-3 小时 新手友好度 75/100
voidzero-dev/vite-plus#2801 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
voidzero-dev/vite-plus#2097 · 10 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
pending triage
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-plus#2866 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
bug CLI exec tool-calls
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
-
maintainer-needed p2 triaged ui windows
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
ai_p2
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/ClickHouse#123351 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 92/100
github/copilot-sdk#2804 · 1 条评论 ·
维护者通常 1 天内回复