Skip to content

[release/9.0-staging] Bugfix InvalidOperationException/IndexOutOfRangeException in HttpListener.EndGetContext - #110695

Merged
rokonec merged 3 commits into
release/9.0-stagingfrom
backport/pr-107804-to-release/9.0-staging
Jan 10, 2025
Merged

[release/9.0-staging] Bugfix InvalidOperationException/IndexOutOfRangeException in HttpListener.EndGetContext #110695
rokonec merged 3 commits into
release/9.0-stagingfrom
backport/pr-107804-to-release/9.0-staging

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

Backport of #107804 to release/9.0-staging
Fixes#107025

/cc @rokonec@pjannesen

Customer Impact

Reported by customer in #107025. Affects their admin access to services - causes reliability problem.

Regression

From .NET Framework

Testing

Note: The problem is intermittent and hard to reproduce.
Manual testing has been performed - customer validated with private patch prior to submitting .NET 10 PR - see #107025 (comment)

Risk

Low - these simple changes do not add or modify complex logic

@ghostghost added the area-System.Net label Dec 13, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@karelzkarelz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like we could have used DisconnectResults directly, there was no need to put it into a variable - that is a cosmetic change.
The real meaningful change is protecting the dictionary from unlocked access - which happened in 2 places.

@rokonecrokonec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would would work even without using local variable disconnectResults however using it will not harm anything and could have slightly better runtime performance by not calling DisconnectResults getter multiple time.

Changes looks safe and correct to me.

@karelz

Copy link
Copy Markdown
Member

It is worth fixing in servicing to unblock customers. Marking as such.

@karelzkarelz added the Servicing-consider Issue for next servicing release review label Dec 19, 2024
@pjannesen

Copy link
Copy Markdown
Contributor

I think it would would work even without using local variable disconnectResults however using it will not harm anything and could have slightly better runtime performance by not calling DisconnectResults getter multiple time.

The reason behind the local variable is that the getter results in a Volatile.Read. Which makes it more expensive.

@karelz

Copy link
Copy Markdown
Member

Approved by .NET Shiproom (@SteveMCarroll) over email on 1/8. Marking Servicing-approved.

@karelzkarelz added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 10, 2025
@rokonec

Copy link
Copy Markdown
Member

/ba-g failing flaky tests most probably unrelated to changes of this PR

@rokonec
rokonec merged commit 56501c9 into release/9.0-stagingJan 10, 2025
@rokonec
rokonec deleted the backport/pr-107804-to-release/9.0-staging branch January 10, 2025 19:14
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Feb 10, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.NetServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@karelz@pjannesen@rokonec@MihaZupan@liveans