FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[release/9.0-staging] [DNS] Ignore ObjectDisposedException on CancellationToken Callback by github-actions[bot] · Pull Request #115840 · dotnet/runtime · GitHub

Repository navigation

[release/9.0-staging] [DNS] Ignore ObjectDisposedException on CancellationToken Callback - #115840

Merged
liveans merged 4 commits into
release/9.0-stagingfrom
backport/pr-115765-to-release/9.0-staging
May 27, 2025
Merged

liveans merged 4 commits into
release/9.0-stagingfrom
backport/pr-115765-to-release/9.0-staging

Conversation

github-actions Bot commented May 21, 2025 •
edited by liveans
Loading

Copy link
Copy Markdown
Contributor

Backport of #115765 to release/9.0-staging

/cc @liveans

Customer Impact

Reported by 2 customers: Customer application crashes due to unhandled ObjectDisposedException when they call DNS APIs (e.g. Dns.GetHostAddress) and then start cancellation of the request (e.g. when the DNS response takes long time due to network environment).

Technical details: There’s a race condition between the DNS request completion and the CancellationToken-registered callback in our code.
We're currently checking whether the DNS request has completed before initiating the cancellation process, but it's possible for the DNS request to complete right after the check. That can lead to the ObjectDisposedException, because we assume the DNS request is still valid, while it was completed in the meantime.

Regression

Yes, introduced in #63904 (part of .NET 7.0).

Testing

Verified on targeted stress test - without the change in fails 3x in 24h. With the fix 30 h & ~70h without a crash.

Risk

Low, fix is targeted to a specific case.

liveans requested review from antonfirsov and karelz May 21, 2025 15:07
liveans added the Servicing-consider Issue for next servicing release review label May 21, 2025
karelz added this to the 9.0.x milestone May 22, 2025
karelz added area-System.Net and removed Servicing-consider Issue for next servicing release review labels May 22, 2025

Copy link
Copy Markdown
Contributor

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

karelz added the Servicing-consider Issue for next servicing release review label May 26, 2025

liveans commented May 27, 2025

Copy link
Copy Markdown
Contributor

Approved by @SteveMCarroll via email on 05/27.

liveans added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 27, 2025
liveans merged commit 55a7a99 into release/9.0-staging May 27, 2025
jkotas deleted the backport/pr-115765-to-release/9.0-staging branch May 31, 2025 07:14
github-actions Bot locked and limited conversation to collaborators Jun 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL