Skip to content

Attach reliability test: a fresh process and its own session per attempt (Linux debug-inspection wedge) - #614

Merged
MelbourneDeveloper merged 1 commit into
mainfrom
fix/attach-reliability-test
Nov 19, 2026
Merged

MelbourneDeveloper merged 1 commit into
mainfrom
fix/attach-reliability-test

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Collaborator

TLDR

The 20-attach reliability test (added in #607) stops wedging Linux debug-inspection. Each attempt now attaches to its own fresh process and pauses the session that attach started.

Details

  • Failure (Compile item edits reload the owning compiler directly, not via the file watcher (Windows F# add-file hover) #613, Linux debug-inspection): attempt 2's stopDebuggee timed out after 45 s. The stuck session then failed every later suite in the chunk, 12 failures in all.
  • Mechanism, from the uploaded debugger trace:
    • Attempt 1 attached, paused and detached in 0.2 s.
    • Attempt 2's attach was accepted, but no pause was ever sent. startAttached returns vscode.debug.activeDebugSession, which still named attempt 1's ending session. pauseAttached polled threads on that dead session until its 60-second limit.
    • Meanwhile the fixture's 30-second wait ran out. The process exited (exited code 0 at +29 s), and the session never settled in time.
    • Separately, 20 attaches to ONE 30-second fixture cannot fit on a slow runner: the attaches took 15 s locally, but CI is slower.
  • Fix (test only, no product change):
    • Every attempt starts a fresh fixture process. After the detach the test asserts that process is still alive, then kills it.
    • The attempt's session comes from DebugSessionRecorder, by its start index, never from activeDebugSession.
    • New end-of-test assertions: exactly 20 sessions started, and every one ended.

How Do The Automated Tests Prove It Works?

  • debug-attach-reliability-e2e.test.ts at least 19 of 20 attaches pause a live process, and every detach leaves it running passes locally: 20/20 in 21 s, with every pause stop recorded and a clean session.
  • debug-attach-e2e.test.ts still passes (5 tests).
  • On this PR, Linux debug-inspection runs the test after the rest of the chunk, at CI speed.

…ime and pauses the session that attach started, instead of outliving the fixture's 30-second wait and pausing the previous attempt's ending session
@MelbourneDeveloper
MelbourneDeveloper enabled auto-merge (squash) November 19, 2026 21:18
@MelbourneDeveloper
MelbourneDeveloper merged commit 931af3e into main Nov 19, 2026
117 of 119 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the fix/attach-reliability-test branch November 19, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant