Repository navigation
Windows CI hang: in-box Windows PowerShell attach E2E test wedges after the 20260614 runner image #2323
Description
Activity
- addedIssue-BugA bug to squash.A bug to squash.
on Jun 18, 2026 - added a commit that references this issue
on Jun 19, 2026 - changed the title
[-]Intermittent Windows CI hang: debugger-attach E2E test wedges and rides the job timeout[/-][+]Windows CI hang: in-box Windows PowerShell attach E2E test wedges after the 20260614 runner image[/+]on Jun 19, 2026 andyleejordan commented
on Jun 19, 2026 MemberAuthorMore actionsUpdate: the stopgap is green on
main's CI.The expanded skip landed in
e6ca2dfa6, and theCI Testsrun on that commit passed — thedotnet (windows-latest)leg finished in ~9.5 min (21:50→22:00) instead of riding the timeout to cancellation.A few corrections/expansions now that we understand the failure better:
- It's not attach-specific — it's WinPS-hosted server startup. Skipping only
CanAttachScriptWithPathMappingsjust relocated the wedge to the next test that starts the in-box Windows PowerShell server. The hang is in spawningStart-EditorServices.ps1under Windows PowerShell 5.1, which both E2E suites do. So Skip attach E2E test on in-box Windows PowerShell (20260614 image regression); cap CI job #2318 now discovery-time skips the entire WinPS-hosted E2E surface:- the whole debug-adapter class (
DebugAdapterProtocolMessageTests, 13 tests) —c667d3906 - the whole language-server class (
LanguageServerProtocolMessageTests) —e6ca2dfa6
- the whole debug-adapter class (
- xUnit gotcha worth recording: a discovery-time
Skipstops per-testIAsyncLifetimesetup (the DAP class), but xUnit still creates anIClassFixture<>even when every method in the class is skipped. The LSP server start lives inLSPTestsFixture.InitializeAsync, so the discovery skip alone didn't help there —LSPTestsFixturenow also guards against starting the server under Windows PowerShell. - Strongest evidence yet that it's purely the image: I re-ran an old
maincommit that predates Match strong-name identity when resolving PSES dependencies #2303 and all of our recent PRs and previously passed —6ad4f46657("Correct example PowerShell-Uriargument name (Correct example PowerShell -Uri argument name #2304)"). On today's image it now hangs the same way (run27572333402), while macOS/Linux stay green. That fully exonerates our code, including Match strong-name identity when resolving PSES dependencies #2303. - Windows PowerShell unit coverage (
TestPS51) is unaffected and still runs; only the WinPS-hosted E2E server tests are skipped.
The job
timeout-minutesis currently 60 (raised from 30 as a backstop while the suite was still wedging). The "Next steps toward a real fix" above still stand — identify the20260614servicing delta and, once fixed, remove the discovery-time skips.Drafted by Copilot (Claude Opus 4.8) on Andy's behalf.
- It's not attach-specific — it's WinPS-hosted server startup. Skipping only
- added a commit that references this issue
on Jun 22, 2026 andyleejordan commented
on Jun 22, 2026 MemberAuthorMore actionsOkay so no idea how the GitHub Actions image update managed to break the PowerShell 5.1 end-to-end tests but I'm guessing something to do with permissions. Thing is, that is what happened, since if you go back and re-run old passing CI runs they'll start to fail the same way. Hence disabled for now.
- added 6 commits that reference this issue
on Jun 23, 2026
Summary
The Windows leg of CI (
CI Testsworkflow) hangs on the E2E debugger-attachtest
CanAttachScriptWithPathMappingsand rides GitHub Actions' default6-hour job timeout. The root cause is not a PSES code change — it is a
windows-latestrunner-image refresh that broke in-box Windows PowerShell5.1's cross-process attach. This issue tracks the real fix; PR #2318 is a
stopgap (skip the test on in-box WinPS + a 30-minute
timeout-minutesbackstop).
Root cause: runner-image refresh
20260608→20260614Comparing the last-green and first-red
mainruns:win25-vs2026/20260608.135.20260614.141.Same image family, same runner agent (
2.335.1), same-PreviewPowerShell.The only thing that moved at the boundary is the weekly OS-servicing patch in
the image. That refresh broke in-box Windows PowerShell 5.1's cross-process
Debug-Runspace/Enter-PSHostProcessattach — exactly the path this testexercises. The precise servicing delta (likely a .NET Framework or Windows
named-pipe/IPC update) is still unidentified and is the main open question
here.
Symptoms
(
TestE2EPowerShell). PowerShell Core (TestE2EPwsh) and the preview passthe same attach test; macOS and Linux pass in ~5 minutes.
test until the job is killed.
[SkippableFact(Timeout = 15000)]never fires: the wedge blocksin a way xUnit's cooperative timeout cannot abort, so it is reported as a
"Long Running Test" climbing past 20+ minutes.
What we ruled out
fingered Match strong-name identity when resolving PSES dependencies #2303, but that was confounded: Match strong-name identity when resolving PSES dependencies #2303 was the first merge onto the
new image, so the image bump and the code change moved together. Two
independent proofs exonerate it:
PsesLoadContext.cs(the file Match strong-name identity when resolving PSES dependencies #2303 touched) is<Compile Remove>'d fornet462and uses the Core-onlyAssemblyLoadContext. In-box WinPS 5.1loads
bin/Desktop/(net462), so Match strong-name identity when resolving PSES dependencies #2303's code is not even compiled intothe hanging configuration.
still hung on the new image (killed by the 30-minute cap).
-PreviewPowerShell. The preview pwsh suite passes; it is thein-box Windows PowerShell suite that hangs. (An earlier draft of this issue
hypothesized the preview — that is disproven.)
ReadScriptLogLineAsync. The test wedges on the attach handshakebefore it reaches that helper. (PR Skip attach E2E test on in-box Windows PowerShell (20260614 image regression); cap CI job #2318 still hardens that EOF/poll spin as
general hygiene, but it is not the cause.)
Mitigation (PR #2318)
CanAttachScriptWithPathMappingson in-box Windows PowerShell(
IsWindowsPowerShell, covering the WinPS and WinPS-CLM suites) so thewindows-latestleg completes; Core / preview / macOS / Linux keep fullcoverage of the attach path.
timeout-minutes: 30on the matrix test job as a permanent backstop.Next steps toward a real fix
20260614servicing delta (.NET Framework / WindowsIPC) that changed in-box WinPS 5.1 attach behavior.
where the attach handshake stalls under the new image.
RunWithAttachableProcesskeysoff
RunspaceBase.AvailabilityChangedvia reflection) and theDebug-Runspacehandshake for an OS-version-sensitive race.Skip.Iffrom Skip attach E2E test on in-box Windows PowerShell (20260614 image regression); cap CI job #2318; thetimeout-minutesbackstopcan stay.
References