-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0-staging] remove extra assert from WinHttp handler #112861
base: release/8.0-staging
Are you sure you want to change the base?
[release/8.0-staging] remove extra assert from WinHttp handler #112861
Conversation
Tagging subscribers to this area: @dotnet/ncl |
This heavily impacts our test runs in 8.0.x. The fix is already in 9 and 10, with minimal change - we should take it to unblock WinHTTP test runs in 8.0.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM, though I am not 100% sure if the csproj changes (I never serviced OOB package)
@@ -4,8 +4,8 @@ | |||
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
<IsPackable>true</IsPackable> | |||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlossanlop is this the right way to do it? I made the changes based on this: 09784cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct.
@carlossanlop could you please help me make sure I'm doing the versioning correctly here: #112861 (comment) This is not an urgent fix, so it's ok if we slipped the deadline. I'll ping the tactics once I have the above mentioned comment resolved. |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g infrastructure issue dotnet/dnceng#5144 |
Backport of #93984 to release/8.0-staging
Fixes #93099
Fixes #104891
Fixes #112700
/cc @ManickaP @wfurt
Customer Impact
Discovered in our CI, the issue is fixed since .NET 9. The problem is that from a certain Windows version, we strongly suspect WinHTTP switched to TLS 1.3 by default and hit new code paths, which ends up in
NullReferenceException
, making most/all our WinHTTP tests to crash.Technical details: We see that our callback from WinHTTP is sometimes called twice. Therefore, we changed code to detect such situation by checking argument
RequestHandle
for NULL. Technically, the change just swapsassert
forif not null
.Regression
No (at least not in our code).
Testing
CI run confirmed that
WinHttpHandler
tests do not crash.Risk
Low. Firstly, this fix is out in 9.0 and 10.0. Secondly, it's very small change replacing
assert
withif not null
.