[operation-graph] WatchLoop.runIPCAsync never exits when the IPC host disconnects, so heft run-watch outlives its host
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- devtools
研究方向
在 @rushstack/operation-graph 套件中找到 WatchLoop.runIPCAsync,並閱讀現有的 IPC 訊息處理方式。透過中斷主機連線或終止主機來重現回報的情況,接著檢查 watch-loop 測試是否涵蓋此情況。完成條件是 IPC 通道關閉後迴圈結束且 Heft 退出,同時不影響現有 exit 命令的行為。
由索引模型根據 Issue 內容生成。
描述
🤖 Filed by GitHub Copilot acting for @namankanakiya (light review only).
Package: @rushstack/operation-graph 0.7.4 (via @rushstack/heft 1.3.2). Linux, Node 22.
Repro: in any Heft project, create host.js:
const cp = require('child_process').fork(
require.resolve('@rushstack/heft/bin/heft'),
['run-watch', '--only', 'build'],
{ stdio: ['inherit', 'inherit', 'inherit', 'ipc'] }
);
setTimeout(() => process.kill(process.pid, 'SIGKILL'), 30000);
Run node host.js.
Observed: after the host dies, heft run-watch keeps running forever with ppid 1. Inside it, process.connected === false and there are no 'disconnect' listeners; its file watchers keep the event loop alive, so it holds its memory indefinitely. The same happens after cp.disconnect(). In a large monorepo where a Rush plugin hosts many such IPC watchers, a crashed or OOM-killed host left orphaned watcher groups totaling ~19-33 GB RSS.
Expected: when the IPC host's channel closes, the watch loop ends and heft exits, the same as on the host's exit command.
Suggested fix: in WatchLoop.runIPCAsync, add host.once('disconnect', () => resolve()) (or reject with an error) next to the 'message' handler, so a lost host is treated like the exit command.
Happy to test a candidate fix.
- 主要語言
- TypeScript
- 星號
- 6.5k
- 分支
- 714
- 平均合併
- 1 天 22 小時
- 30 天內合併 PR
- 37
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/rushstack 的其他 Issue
-
[api-extractor] Source map segment without a source crashes SourceMapper with "Target is a folder, not a file"可能已有人在做 @joshuaellis 於 6 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
[rush-serve-plugin] The auto-picked port never reaches the port parameter: `_value` is ignored since ts-command-line uses `#value`可能已有人在做 @b84330808 於 5 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
[rush] Upgrade the pnpm-sync-lib dependency to 0.3.5.可能已有人在做 @martinnaj 於 26 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
microsoft/rushstack#5971 · 2 則留言 ·
維護者通常 1 天內回覆
查看 microsoft/rushstack 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
grafana/profiles-drilldown#1212 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
grafana/traces-drilldown#980 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
openremote/openremote#3487 · 1 則留言 ·
-
triage:needs-human
難度 2/5 1-3 小時 新手友好度 67/100
garrytan/gbrain#7635 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
coollabsio/jean#867 ·
維護者通常 1 天內回覆