shell-escape.test.ts: Windows PowerShell child times out in the cmd-Session powershell test despite the warm-up
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 1-2 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions, powershell, typescript
研究方向
Start with lib/src/lib/shell-escape.test.ts around lines 181–182 and inspect the warm-up added in #1532 and the failure context in #1564. On a Windows runner, time the listed PowerShell script pieces for each Session kind to locate the remaining cost. Done means identifying and addressing the cmd-kind delay, then confirming the test completes reliably without raising the per-shell timeout.
由索引模型根據 Issue 內容生成。
描述
shell-escape.test.ts › reads a cmd Session's paths back literally in powershell timed out again on main after the ConvertTo-Json warm-up from #1532 landed. In run 41778763200 (Standalone Platform Check (windows-latest), head 6c252bf967ba), argvThrough's spawnSync of powershell.exe returned ETIMEDOUT at its 10s bound (shell-escape.test.ts:181-182). The next run on main passed.
The warm-up ran and reported a warm shell. Its first start took 22,940 ms, against 2.4–4.4s on the other post-#1532 runs below, and its second took 437 ms, so the step exited at its sub-second threshold. The Windows PowerShell 5.1 children around the failing test were fast:
| Test (in run order) | Time |
|---|---|
runs native PowerShell startup code and exits |
524 ms |
passes accepted paths through dor.cmd from powershell |
480 ms |
reads a cmd Session's paths back literally in powershell |
10,048 ms, ETIMEDOUT |
reads a powershell Session's paths back literally in powershell |
572 ms |
A cold process start doesn't explain this, and neither does a first module load the warm-up skips: the 5.1 children on either side of the failing test, the later one also running ConvertTo-Json, took about half a second.
On the eight main runs since #1532 whose Windows job passed (41578300835 through 41711627101), the failing test took 697–799 ms each time, while reads a powershell Session's paths back literally in powershell took 303–389 ms. #1532 cut it from the 1.2–3.1s seen before, but some first-use cost the warm-up doesn't reach is still left. On a runner as slow as this one, that cost alone doesn't obviously add up to 10s (≈400 ms × 5–10 ≈ 2–4s). So either the remaining cost grows faster than the runner's slowness, or this run hit a separate stall. This run doesn't settle which.
In #1464, nedtwigg ruled out raising the per-shell bounds ("raising either bound again would only move the line"), so that isn't proposed here.
Possible next diagnostics (need a Windows runner)
- Find what the cmd-kind 5.1 child pays that the warm-up and the powershell-kind child don't. Its script is the same
argvfunction; only the typed arguments differ (the cmd-kind escapes ofWINDOWS_LITERALandWINDOWS_REFUSED). Timing each piece of that script in the warm-up step ([Console]::OutputEncoding, the function definition,ConvertTo-Json -Compress -InputObject @(...)over those strings) on a PR's Windows job would show which one carries the ~400 ms. - If the cost tracks script content rather than process start (for example, a first scan of a new script block), a warm-up that runs the exact
argvThroughscript for each Session kind would pay it before the tests. The check: on that PR's job, the cmd-kind test should drop to about the powershell-kind test's ~300 ms.
Cause of a failure tracked in #1564.
- 主要語言
- TypeScript
- 星號
- 5
- 分支
- 1
- 平均合併
- 11 小時 37 分鐘
- 30 天內合併 PR
- 463
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
diffplug/dormouse 的其他 Issue
-
tend-rate-limit
難度 5/5 一週以上 新手友好度 1/100
diffplug/dormouse#1681 · 1 則留言 ·
維護者通常 1 天內回覆
-
Evaluate wterm未關閉
難度 4/5 3-5 天 新手友好度 35/100
diffplug/dormouse#1604 · 1 則留言 ·
維護者通常 1 天內回覆
-
security
難度 5/5 一週以上 新手友好度 38/100
維護者通常 1 天內回覆
-
red-team
難度 5/5 一週以上 新手友好度 5/100
維護者通常 1 天內回覆
-
review-runs-tracking
難度 5/5 一週以上 新手友好度 5/100
diffplug/dormouse#1492 · 1 則留言 ·
維護者通常 1 天內回覆
查看 diffplug/dormouse 的全部 Issue
相似的 Issue
-
area:tooling good first issue
難度 2/5 1-3 小時 新手友好度 68/100
interledger/publisher-tools#1007 ·
維護者通常 1 天內回覆
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
難度 2/5 1-3 小時 新手友好度 83/100
databrickslabs/ontos#1420 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
vercel-labs/just-bash#756 ·
維護者通常 1 天內回覆
-
area: ci good first issue
難度 1/5 1 小時以內 新手友好度 85/100
interledger/web-monetization-extension#1555 ·
維護者通常 1 天內回覆
-
🐞 bug 🧐 unconfirmed
難度 2/5 1-3 小時 新手友好度 72/100
Tencent/tdesign-vue-next#7056 · 1 則留言 ·
維護者通常 1 天內回覆