Skip to content

[release/11.0] Remove racy BackgroundWorker cancellation assertion - #138102

Merged
lewing merged 1 commit into
release/11.0from
backport/pr-136427-to-release/11.0
Nov 23, 2026
Merged

lewing merged 1 commit into
release/11.0from
backport/pr-136427-to-release/11.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #136427 to release/11.0

/cc @lewing @copilot

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

`TestCancelAsync` could fail when it read `IsBusy` and
`CancellationPending` during worker completion, even though cancellation
had been observed.

- **Change:** Remove the unreliable main-thread state check; retain the
worker-side cancellation check.

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #133328

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jkotas <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@lewing lewing added test-bug Problem in test source code (most likely) Servicing-approved Approved for servicing release labels Nov 23, 2026
@lewing
lewing enabled auto-merge (squash) November 23, 2026 04:11
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@lewing

lewing commented Nov 23, 2026

Copy link
Copy Markdown
Member

/ba-g failures are not related

@lewing
lewing merged commit 3f6ef28 into release/11.0 Nov 23, 2026
102 of 106 checks passed
@lewing
lewing deleted the backport/pr-136427-to-release/11.0 branch November 23, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure Servicing-approved Approved for servicing release test-bug Problem in test source code (most likely)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants