Skip to content
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

[5.0.1] Hang on infinite timeout and managed SNI #1798

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

JRahnama
Copy link
Member

@JRahnama JRahnama commented Oct 7, 2022

Backporting #1742, which fixes #1733.

@cheenamalhotra
Copy link
Member

Can you link or describe the issue with a repro?

@JRahnama
Copy link
Member Author

JRahnama commented Oct 7, 2022

Can you link or describe the issue with a repro?

The regression introduced in #1578. The issue was first reported at #1733

Basically, when you set the time out to 0 it hangs forever.

AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseManagedNetworkingOnWindows", true);

var sw = Stopwatch.StartNew();
using var connection = new SqlConnection("Server=.;Database=master;Integrated Security=false;User ID=sa;Password=SomePassword;Pooling=true;Max Pool Size=1024;TrustServerCertificate=true;Timeout=0");
await connection.OpenAsync();

using var cmd = connection.CreateCommand();
cmd.CommandText = "SELECT 1";
await cmd.ExecuteNonQueryAsync();
Console.WriteLine($"Connection established successfully in {sw.ElapsedMilliseconds}ms. Press any key to continue...");
Console.ReadKey();

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Base: 65.47% // Head: 71.43% // Increases project coverage by +5.96% 🎉

Coverage data is based on head (a568e2f) compared to base (914caf5).
Patch coverage: 80.55% of modified lines in pull request are covered.

Additional details and impacted files
@@                Coverage Diff                @@
##           5.0-servicing    #1798      +/-   ##
=================================================
+ Coverage          65.47%   71.43%   +5.96%     
=================================================
  Files                293      293              
  Lines              61385    61379       -6     
=================================================
+ Hits               40189    43848    +3659     
+ Misses             21196    17531    -3665     
Flag Coverage Δ
addons 92.38% <ø> (+92.38%) ⬆️
netcore 74.98% <75.00%> (+5.79%) ⬆️
netfx 69.31% <100.00%> (+5.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...t/netcore/src/Microsoft/Data/SqlClient/SNI/SSRP.cs 49.24% <33.33%> (-3.36%) ⬇️
...e/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs 63.49% <50.00%> (+0.27%) ⬆️
...core/src/Microsoft/Data/SqlClient/SNI/SNICommon.cs 69.35% <100.00%> (+2.11%) ⬆️
...core/src/Microsoft/Data/SqlClient/SqlDataReader.cs 72.84% <100.00%> (+1.47%) ⬆️
...c/Microsoft/Data/SqlClient/TdsParserStateObject.cs 81.57% <100.00%> (-0.08%) ⬇️
...etfx/src/Microsoft/Data/SqlClient/SqlDataReader.cs 68.48% <100.00%> (+1.40%) ⬆️
...c/Microsoft/Data/SqlClient/TdsParserStateObject.cs 81.94% <100.00%> (+0.36%) ⬆️
...osoft/Data/SqlClient/SqlConnectionStringBuilder.cs 88.60% <100.00%> (+0.01%) ⬆️
...re/src/Microsoft/Data/SqlClient/SNI/SNINpHandle.cs 68.85% <0.00%> (-9.84%) ⬇️
.../Microsoft/Data/SqlClient/SNI/SNIMarsConnection.cs 76.72% <0.00%> (-0.63%) ⬇️
... and 61 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JRahnama JRahnama added this to the 5.0.1 milestone Oct 7, 2022
@JRahnama JRahnama merged commit 25f2d0b into dotnet:5.0-servicing Oct 7, 2022
@cheenamalhotra
Copy link
Member

cheenamalhotra commented Oct 7, 2022

Thanks for bringing this in ❤️

@JRahnama JRahnama deleted the 5.0-servicing branch October 31, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants