Skip to content

Cancel mapper requests before waiting for host shutdown - #65492

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/content-mapper-close
Nov 14, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/content-mapper-close

Conversation

@jakebailey

Copy link
Copy Markdown
Member

A pending mapper RPC holds the lifecycle read lock while waiting for the host context. Closing the host must cancel that context before waiting for readers, otherwise an unresponsive mapper prevents Close from completing.

Caught in an audit.

A pending mapper RPC holds the lifecycle read lock while waiting for the
host context. Closing the host must cancel that context before waiting
for readers, otherwise an unresponsive mapper prevents Close from
completing.
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the content-mapper shutdown change.

No open issues 🎉

What changed in this PR

Fixes a content-mapper shutdown deadlock by cancelling pending requests before waiting for the lifecycle lock, allowing host shutdown to complete when a mapper is unresponsive.

Changes:

  • Moves context cancellation ahead of lifecycle-lock acquisition in Close.
  • Adds deterministic regression tests for blocked initialize, open-project, transform, and close-project requests.
File Description
tsc/​internal/​contentmapper/​hostimpl.go Cancels pending mapper requests before waiting for shutdown access.
tsc/​internal/​contentmapper/​host_test.go Generalizes the blocking mapper helper and tests shutdown with pending requests.

Review effort: Balanced

@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 14, 2026
Merged via the queue into microsoft:main with commit 6bdcb54 Nov 14, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the compiler-fixes/content-mapper-close branch November 14, 2026 00:46
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants