Skip to content

Windows CI hang: in-box Windows PowerShell attach E2E test wedges after the 20260614 runner image #2323

@andyleejordan

Description

@andyleejordan

Summary

The Windows leg of CI (CI Tests workflow) hangs on the E2E debugger-attach
test CanAttachScriptWithPathMappings and rides GitHub Actions' default
6-hour job timeout. The root cause is not a PSES code change — it is a
windows-latest runner-image refresh that broke in-box Windows PowerShell
5.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-minutes
backstop).

Root cause: runner-image refresh 2026060820260614

Comparing the last-green and first-red main runs:

Same image family, same runner agent (2.335.1), same -Preview PowerShell.
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-PSHostProcess attach — exactly the path this test
exercises. 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

  • The hang is specifically the in-box Windows PowerShell E2E suite
    (TestE2EPowerShell). PowerShell Core (TestE2EPwsh) and the preview pass
    the same attach test; macOS and Linux pass in ~5 minutes.
  • The test wedges on the attach handshake and the run sits on that single
    test until the job is killed.
  • Its xUnit [SkippableFact(Timeout = 15000)] never fires: the wedge blocks
    in 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

Mitigation (PR #2318)

  • Skip CanAttachScriptWithPathMappings on in-box Windows PowerShell
    (IsWindowsPowerShell, covering the WinPS and WinPS-CLM suites) so the
    windows-latest leg completes; Core / preview / macOS / Linux keep full
    coverage of the attach path.
  • timeout-minutes: 30 on the matrix test job as a permanent backstop.

Next steps toward a real fix

  • Identify the precise 20260614 servicing delta (.NET Framework / Windows
    IPC) that changed in-box WinPS 5.1 attach behavior.
  • Capture a hung Windows run's process/runspace state or DAP transcript to see
    where the attach handshake stalls under the new image.
  • Investigate the harness's readiness logic (RunWithAttachableProcess keys
    off RunspaceBase.AvailabilityChanged via reflection) and the
    Debug-Runspace handshake for an OS-version-sensitive race.
  • Once fixed, remove the Skip.If from Skip attach E2E test on in-box Windows PowerShell (20260614 image regression); cap CI job #2318; the timeout-minutes backstop
    can stay.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions