Repository navigation
[WIP] Diagnose flaky Deno inspector attach cancel test on Windows - #21929
David Fowler (davidfowl) wants to merge 2 commits into
Conversation
…-path stress loop The stress loop is temporary and will be removed before review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21929Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21929" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
The Windows debugger-cancellation race remains unresolved, and Windows stress-run diagnostics must be evaluated before the cleanup behavior can be validated.
No open issues 🎉
What changed in this PR
This draft adds diagnostics to investigate the Windows Deno inspector-attach cancellation flake in the VS Code extension. It does not yet implement a fix.
Changes:
- Captures extension logs and cancellation progress markers.
- Reports still-connected fixtures and fresh process ancestry when a test fails.
- Adds a temporary 120-iteration stress loop, skipping remaining iterations after three failures.
| File | Description |
|---|---|
extension/src/test/nodeInspectorAttach.test.ts |
Adds failure diagnostics and temporary stress coverage for inspector-attach cleanup. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
The 120-iteration Windows stress loop passed 360/360 across three CI attempts without reproducing the flake. Keep only the on-failure cleanup log and process-tree diagnostics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests selector0 / 101 PR test projects · 2 PR jobs, from 1 changed file. Selected PR test projects (0 / 101)none — no PR-gated .NET test projects run for this change. Selected PR jobs (2)
How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
Important
Draft: the root cause is not confirmed. Do not merge. The evidence is WEAK, so this PR stays a draft. It now carries only on-failure diagnostics. No product fix is included.
What failed
On Windows only,
Node Debugger Deno AppHost inspector attach (js-debug) > stops a pending inspector attach when the debug session is cancelledhits the 60s mocha timeout. This is the rank 2 flake in #21600.node.ts, and every Deno attach test after the first timed out.In both runs on current code, the test after it passed one second later.
stopDebuggingitself returned normally, and the only failure was that the fixture runtime never exited.Why (best supported hypothesis, not proven)
The runtime blocked in
--inspect-waitcan only be stopped by the extension's cleanup,stopInspectorWaitingProcessesinnode.ts. js-debug keeps the pending program in a local variable until attach and never kills it on disconnect.That cleanup finds the runtime with a PowerShell
Get-CimInstance Win32_Processlisting. Each listing has a 30s timeout, and the settle window is 15s. On the cancel path,isSpawnSettlednever becomes true, because neither a launch response noronExitarrives. If every listing fails for longer than the settle window, the cleanup throws without signalling anything. One stalled PowerShell over 30s also exceeds the window by itself. The test'strackPendingResourceCleanupstub runs cleanup once, so the runtime stays blocked and the test times out.Reproduced locally (Linux, VS Code 1.131.0,
listProcessesstubbed to fail for a fixed window in the cancel flow):What is not proven: that a Windows listing outage or stall actually happened in the failing runs. The original logs carry no cleanup output. 360 Windows stress iterations on this PR did not reproduce the failure. I also ruled out a candidate correlation: the preceding never-ready test takes 5–8s in most passing main runs, so its 6s in the failing runs is not a signal.
Fix
None yet. A fix should not be speculative, and the hypothesis is not confirmed. This PR now contains only on-failure diagnostics in
nodeInspectorAttach.test.ts. When a test in that suite fails, they print the cleanup's log lines (listing errors and kills) and the extension-host process tree, which would confirm or refute the hypothesis the next time it hits. The temporary 120-iteration stress loop has been removed.Confidence
Low. The induced outage reproduces the exact symptom, but nothing shows the outage occurred on the Windows runners.
How we stop this recurring: capture the cleanup log on failure, which this PR does, then fix the layer the log implicates. If it is a listing outage, the cleanup should not give up on an unconfirmed runtime after a single stalled listing.
Failure stats (14d, attempt 1)
🤖 Posted by AspireAgent (AI Agent)