Skip to content

repro: stress worktree mount diagnostics - #2120

Draft
Tyrie Vella (tyrielv) wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/fix-concurrent-worktree-flake
Draft

Tyrie Vella (tyrielv) wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/fix-concurrent-worktree-flake

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

ConcurrentWorktreeAddCommitRemove intermittently fails because a linked worktree exists, but its worktree-specific GVFS mount pipe is not running.

This PR is a repro and diagnostics branch. It does not fix the product path. It collects evidence to show why the worktree mount did not start. The first repro attempt ran the worktree tests alone on an idle runner and did not fail. The original failure happened while other fixtures ran in parallel.

Changes

  • Keep the worktree mount assertion strict. A missing worktree pipe still fails the test.
  • Add failure diagnostics for the worktree .git file, resolved worktree git dir, hook directory, .gvfs directory, and recent per-worktree mount logs.
  • Log every hook-side gvfs mount retry failure with exit code, stdout, and stderr.
  • Keep the normal sliced functional-test run, so each job has its usual parallel load.
  • Add every WorktreeTests case to every slice in the test runner.
  • Repeat ConcurrentWorktreeAddCommitRemove 10 times.

This is temporary. Remove the runner and repeat changes when this becomes the product fix.

Repurpose the draft PR as a focused repro for the concurrent worktree mount failure.

Keep the worktree mount assertion strict, but expand failure diagnostics to include worktree gitdir state, hook/log directories, and recent per-worktree mount logs.

Log every hook-side gvfs mount attempt failure, then run only WorktreeTests across repeated functional-test matrix jobs to improve repro chances.

Assisted-by: GitHub Copilot Auto

Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv Tyrie Vella (tyrielv) changed the title test: recover concurrent worktree mount flake repro: stress worktree mount diagnostics Sep 24, 2026
@tyrielv
Tyrie Vella (tyrielv) force-pushed the tyrielv/fix-concurrent-worktree-flake branch from bfea2b4 to b64a4a4 Compare September 24, 2026 22:41
Restore the normal sliced functional-test run so each job keeps its usual load. Add every WorktreeTests case to each slice, and repeat ConcurrentWorktreeAddCommitRemove 10 times, to raise the chance of reproducing the missing worktree mount.

Assisted-by: GitHub Copilot Auto

Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Worktree mount processes were seen to exit with code 0 before creating the named pipe, with an empty mount log. Write a tracer-independent bootstrap file recording process start, enlistment creation, mount lock result, return from Mount and process exit. Include recent bootstrap files in the worktree failure diagnostics.

Assisted-by: GitHub Copilot Auto

Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Failing worktree mount processes reach enlistment creation, then Invoke returns 1 and the process exits 0 without writing a log line or reaching Mount. Log the stage reached and any exception leaving Execute, and filter the failure diagnostics to the failing worktree.

Assisted-by: GitHub Copilot Auto

Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
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