Skip to content

[release/11.0] Swallow ObjectDisposedException when restoring blocking mode after connect async - #135929

Merged
svick merged 1 commit into
release/11.0from
backport/pr-135857-to-release/11.0
Oct 19, 2026
Merged

svick merged 1 commit into
release/11.0from
backport/pr-135857-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #135857 to release/11.0

Fixes #135681

/cc @rzikm

Customer Impact

In certain scenarios attempts to restore blocking mode on a socket may cause unhandled exception, which leads to crashing the application process.

We have seen this sporadically in CI, but it was also reported by customer using 11.0 RC1 as #135681

Regression

New in 11.0, Introduced by #124200

Testing

failure was regularly hit on CI, occurences disappeared in main after merging the fix.

Risk

Low, the fix is localized and no side-effects are expected.

…nnect async (#135857)

Concurrent Dispose with ConnectAsync may cause us to attempt to use the
already disposed safe handle, since resetting the blocking mode is only
a best-effort optimization, we can ignore ODEs from the concurrent
Dispose.

Fixes #126183
@azure-pipelines

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@rzikm rzikm added the Servicing-consider Issue for next servicing release review label Oct 19, 2026
@rzikm

rzikm commented Oct 19, 2026

Copy link
Copy Markdown
Member

/ba-g build errors are unrelated to this change, Linux build/tests pass

@rzikm rzikm added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 19, 2026
@rzikm

rzikm commented Oct 19, 2026

Copy link
Copy Markdown
Member

Approved by Jeff Schwartz over email

@svick
svick merged commit e6533be into release/11.0 Oct 19, 2026
102 of 114 checks passed
@svick
svick deleted the backport/pr-135857-to-release/11.0 branch October 19, 2026 15:21
@rbhanda rbhanda added this to the 11.0.0 milestone Oct 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET 11 RC1: process crash from unhandled ObjectDisposedException in SetHandleBlocking after ConnectAsync (Linux)

5 participants