Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
ace5fe4
handle socket exceptions gracefully and forward
Wraith2 Apr 6, 2019
81fe624
[master] Update dependencies from dotnet/arcade (#36656)
dotnet-maestro[bot] Apr 7, 2019
66dc458
Update dependencies from https://github.com/dotnet/corefx build 20190…
dotnet-maestro[bot] Apr 7, 2019
e5fddbc
Moved Interop Locations For System.IO.Compression.Brotli (#36614)
eanova Apr 7, 2019
2190a0f
Plumb CancellationToken through Socket.Receive/SendAsync (#36516)
stephentoub Apr 7, 2019
1d63519
[master] Update dependencies from dotnet/coreclr (#36596)
dotnet-maestro[bot] Apr 8, 2019
268812e
Add test for MemoryStream's buffer after Capacity reset (#36580)
stephentoub Apr 8, 2019
87fdc75
Add support for trailing commas within Utf8JsonReader (#36690)
ahsonkhan Apr 8, 2019
7bc5200
Removing the explicit MicrosoftNetCompilersToolsetVersion definition …
tannergooding Apr 8, 2019
c653c89
Disable System.Drawing test (#36700)
stephentoub Apr 8, 2019
6ca1675
Implement Serialization Guard - CoreFX portion
morganbr Apr 8, 2019
37867bd
add Alpine ARM64 queue (#36548)
wfurt Apr 8, 2019
090f99d
Revert "Disable for coreclr#23583" (#36564)
sdmaclea Apr 8, 2019
978d003
[master] Update dependencies from dotnet/arcade (#36670)
dotnet-maestro[bot] Apr 8, 2019
47d17e3
Add more Decimal constructor tests (#36668)
hughbe Apr 8, 2019
9924aa7
Update APICompat Baselines (#36578)
wtgodbe Apr 8, 2019
52206f1
Changes required to use newGenfacadeModel (#36126)
Anipik Apr 8, 2019
7b320a0
Update coding-style.md (#36695)
miloszkukla Apr 8, 2019
5023c24
Updating all types in System.Numerics.Vectors, minus Vector<T>, to us…
tannergooding Apr 9, 2019
02d4a83
Change charsets to explicitly unicode in System.Drawing.Common (#36718)
jkoritzinsky Apr 9, 2019
b181583
Use common .tools dir for global tools (#36597)
ViktorHofer Apr 9, 2019
1cff273
[master] Update dependencies from dotnet/standard (#36673)
dotnet-maestro[bot] Apr 9, 2019
168ac4c
Update dependencies from https://github.com/dotnet/coreclr build 2019…
dotnet-maestro[bot] Apr 9, 2019
663af00
Add initial nullability annotations guidance (#36711)
stephentoub Apr 9, 2019
e65153e
Add more misc type converters tests (#36655)
hughbe Apr 9, 2019
3f7071d
Add more ArrayConverter tests and cleanup code (#36654)
hughbe Apr 9, 2019
f9c9710
Add test for string.Concat(object) that ToString returns null (#36436)
safern Apr 9, 2019
e3ec42f
Fix deserialize cache test (#36646)
steveharter Apr 9, 2019
b9bd354
change SqlEnvChangePool to be simpler and safe
Wraith2 Apr 9, 2019
7388539
address feedback
Wraith2 Apr 9, 2019
f27d235
spelling feedback
Wraith2 Apr 9, 2019
538cf16
remove pool
Wraith2 Apr 9, 2019
4e66b9a
Update the JIT to recognize the IsSupported property for all HWIntrin…
tannergooding Apr 5, 2019
93564bf
Whitespace (dotnet/coreclr#23772)
sdmaclea Apr 5, 2019
cda6580
Match PtrToStringUTF8 to the other PtrToString* families. (#23731)
jkoritzinsky Apr 6, 2019
d8b0c41
Remove remaining devdocs and cleanup ComponentModel code (#23175)
hughbe Apr 7, 2019
59a1ed6
Fix two new nullable warnings with latest compiler
stephentoub Apr 7, 2019
6c027ae
Improve RuntimeHelpers.GetSubArray (dotnet/coreclr#23829)
stephentoub Apr 9, 2019
5bfb3d6
Copy json dependency to test out dir (#36738)
ViktorHofer Apr 9, 2019
e9d1a10
Removed netcoreappaot configuration from corefx (#36739)
Anipik Apr 9, 2019
9fb5661
Don't build UTF8String.Experimental in release/3.0
wtgodbe Apr 9, 2019
b67328f
Fix build breaks and undo package filtering
ericstj Apr 9, 2019
401436a
Fix official builds failing due to LinuxNoTest matrix being empty (#3…
safern Apr 9, 2019
fdc1371
Update CoreRT for changes in shared partition
jkotas Apr 5, 2019
5b6a71f
Condition Utf8String package build on IsPrerelease flag
GrabYourPitchforks Apr 10, 2019
cea252e
Expose new EventCounter APIs (dotnet/coreclr#23808)
sywhang Apr 10, 2019
7ec7192
[master] Update dependencies from dotnet/core-setup (#36671)
dotnet-maestro[bot] Apr 10, 2019
c9da58c
[master] Update dependencies from dotnet/corefx (#36696)
dotnet-maestro[bot] Apr 10, 2019
dd6984a
Update dependencies from https://github.com/dotnet/coreclr build 2019…
dotnet-maestro[bot] Apr 10, 2019
ffd0ae6
Fix docs on System.Text.Json.JsonElement.GetString
Zenexer Apr 10, 2019
99943e1
Address PR feedback for nullability docs
stephentoub Apr 10, 2019
3773daa
Fix outerloop linux build missing container resource (#36773)
safern Apr 10, 2019
dc63fa0
Add Win10 19H1 platform detection (#36767)
GrabYourPitchforks Apr 10, 2019
1ae46a2
Removed FEATURE_NOTIFYPROPERTYCHANGED checks (#36774)
AlanParr Apr 10, 2019
4672a7b
Add ref asms and unit tests for string.GetPinnableReference (#36777)
GrabYourPitchforks Apr 11, 2019
1c881ce
SocketAsyncEngine.Unix: use ConcurrentDictionary to get rid of lock f…
tmds Apr 11, 2019
ef2ee12
Run IBCMerge on Linux build (#36763)
MichalStrehovsky Apr 11, 2019
e4dbfa4
Remove NativeMethods from System.IO.Ports (#36740)
hughbe Apr 11, 2019
0d9f64e
Update dependencies from https://github.com/dotnet/core-setup build 2…
dotnet-maestro[bot] Apr 11, 2019
8c060b7
Update dependencies from https://github.com/dotnet/corefx build 20190…
dotnet-maestro[bot] Apr 11, 2019
9e3ac32
[master] Update dependencies from dotnet/standard (#36762)
dotnet-maestro[bot] Apr 11, 2019
8e84331
Revert "Run IBCMerge on Linux build (#36763)" (#36791)
MichalStrehovsky Apr 11, 2019
8067265
Fix -allconfigurations build on linux (#36780)
ericstj Apr 11, 2019
7b73456
System.Linq.Expressions: Skip tests if DebuggerTypeProxy attribute is…
akoeplinger Apr 11, 2019
d26c6cd
Remove NETSTandard Test Suite (#36784)
ViktorHofer Apr 11, 2019
d6e36e4
HTTP/2 Request Cancellation (#35118)
rmkerr Apr 11, 2019
af562e8
Merge pull request #36735 from Wraith2/sqlfix-envchangepool
AfsanehR-zz Apr 11, 2019
2cae2db
[master] Update dependencies from dotnet/coreclr (#36788)
dotnet-maestro[bot] Apr 11, 2019
ce62a08
Fixes race in NamespaceCache (#36699)
MarcoRossignoli Apr 11, 2019
288ce93
Improve HttpClient POST tests stability (#36801)
davidsh Apr 12, 2019
137c4c1
Tweaking some APIs according to user feedback. (dotnet/coreclr#23857)
tannergooding Apr 10, 2019
31b6e6d
Update Range.GetOffsetAndLength (dotnet/coreclr#23855)
tarekgh Apr 10, 2019
187330e
Make GC.GetGCMemoryInfo public (dotnet/coreclr#23779)
luhenry Apr 10, 2019
94f4a0d
Move TimerQueue.TickCount Windows implementation to shared CoreLib (#…
filipnavara Apr 10, 2019
8776610
Move AssemblyName to shared (dotnet/coreclr#23737)
EgorBo Apr 10, 2019
d04c3c3
Contextual reflection (dotnet/coreclr#23740)
sdmaclea Apr 11, 2019
c6741f7
Disable nullability-related warnings
jkotas Apr 10, 2019
2cd5d08
Remove octet string wrapping from EnvelopedCms
vcsjones Apr 12, 2019
599955a
Update Version comparison operator tests (#36799)
stephentoub Apr 12, 2019
6d519e5
Fix Version's comparer operators to allow null (dotnet/coreclr#23898)
stephentoub Apr 12, 2019
fe5c12a
Improve platform detection for [Default]OSGroup (#36766)
am11 Apr 12, 2019
f843b9c
Get more information about a flaky test (#36810)
davidfowl Apr 12, 2019
46f57de
remove copy of Interop.GetCurrentThreadId.cs (#36807)
krwq Apr 12, 2019
6322a40
Update zlib-intel to v1.2.11.1_jtkv6.3 (#36795)
ericstj Apr 12, 2019
a4c96fb
Fix Assembly.LoadFromPartialName(string) (dotnet/coreclr#23912)
sdmaclea Apr 12, 2019
f4b1514
Add optimized UTF-8 validation and transcoding logic - Hook it up thr…
GrabYourPitchforks Mar 26, 2019
741275c
Hook up new UTF-8 logic through UTF8Encoding - Add vectorized UTF-16 …
GrabYourPitchforks Apr 3, 2019
a9b3eb6
Improve perf of "is ASCII?" inner loop in UTF-8 validation.
GrabYourPitchforks Apr 3, 2019
ecd6a3e
Remove SSE41.X64 optimization from AsciiUtility RyuJIT now handles th…
GrabYourPitchforks Apr 3, 2019
8936954
Clarify that vector read is unaligned
GrabYourPitchforks Apr 8, 2019
541a7f5
Simplify vectorized logic; remove unnecessary adjustment
GrabYourPitchforks Apr 8, 2019
2742172
PR feedback: GetElement(0) -> Sse2.StoreLow
GrabYourPitchforks Apr 9, 2019
5749844
PR feedback - Simplify CountNumberOfLeadingAsciiBytesFrom24BitInteger…
GrabYourPitchforks Apr 9, 2019
12f5322
PR feedback: Enable SSE2 in Utf16Utility code
GrabYourPitchforks Apr 10, 2019
68b15a9
Expand masks in Utf8Utility, fix const in fallback path
GrabYourPitchforks Apr 10, 2019
cc64aff
Fix incorrect Debug.Assert statements
GrabYourPitchforks Apr 10, 2019
22382cd
Add comments tracking JIT workarounds.
GrabYourPitchforks Apr 10, 2019
3ff7e2c
Rename DWORD -> UInt32 throughout API surface
GrabYourPitchforks Apr 10, 2019
3e6cefd
Re-flow Utf8Utility.Helpers
GrabYourPitchforks Apr 10, 2019
87e0533
PR feedback: Fix typos
GrabYourPitchforks Apr 11, 2019
4a75bd0
PR feedback: CountNumberOfLeadingAsciiBytesFrom24BitInteger
GrabYourPitchforks Apr 11, 2019
ba016fa
PR feedback: Remove redundant endianess checks
GrabYourPitchforks Apr 11, 2019
aaa33f8
PR feedback: Validate nint definitions
GrabYourPitchforks Apr 11, 2019
8d5771a
PR feedback: Clarify charIsNonAscii vector usage
GrabYourPitchforks Apr 11, 2019
7281061
PR feedback: document tempUtf8CodeUnitCountAdjustment usage
GrabYourPitchforks Apr 11, 2019
a828645
Fix compilation failure in Utf16Utility
GrabYourPitchforks Apr 11, 2019
6b4af6a
PR feedback: Clarify 3-byte sequence processing
GrabYourPitchforks Apr 11, 2019
c986ec9
Add missing check to 3-byte processing logic
GrabYourPitchforks Apr 11, 2019
29bda78
Clarify comment in 3-byte processing
GrabYourPitchforks Apr 11, 2019
6eeed98
This should fix the flaky test (#36826)
davidfowl Apr 12, 2019
c1730e5
embed generated files into pdbs (#36825)
Anipik Apr 12, 2019
00e9390
Improve WebClient upload tests stability (#36828)
davidsh Apr 13, 2019
cd020c1
Add JsonElement.Clone to make a long-term persistable copy
bartonjs Apr 13, 2019
07f443b
CipherSuitePolicy implementation (#36775)
krwq Apr 13, 2019
cc01ec9
Add support for generic interface-based collections in JsonSerializer…
layomia Apr 13, 2019
e2ab05d
Port ErrObject and CreateProjectError (#36808)
cston Apr 13, 2019
c74f240
Improve performance of Memory<T>.Span property getter (#23750)
GrabYourPitchforks Apr 5, 2019
1d8cf4d
Revert optimization (dotnet/coreclr#23759)
grant-d Apr 5, 2019
7345dd7
Don't null out references in Stream/BinaryReader/Writer (#23725)
stephentoub Apr 5, 2019
a7e2585
making shared folder same , small nit picks
Anipik Apr 12, 2019
3262460
overwrite -> overwriteFiles (#36831)
mairaw Apr 13, 2019
1a83ff9
Fix TypeInfoTests.GenericParameterConstraints() test (#36832)
akoeplinger Apr 13, 2019
f2a5dfa
[master] Update dependencies from dotnet/arcade (#36812)
dotnet-maestro[bot] Apr 13, 2019
2aa2518
Read system proxy information on macOS (#36177)
filipnavara Apr 13, 2019
8a22438
Allow cookies with spaces in the name (#36566)
PaitoAnderson Apr 13, 2019
cce7870
Fix encoding of Digest authentication headers (#36627)
filipnavara Apr 13, 2019
09ed648
Update dependencies from dotnet/corefx (dotnet/coreclr#23893)
dotnet-maestro[bot] Apr 12, 2019
f5e2679
Fix LsaOpenPolicy interop definition
hughbe Apr 13, 2019
c3981ca
address feedback from 36775 (#36839)
krwq Apr 13, 2019
4c3d4a0
[master] Update dependencies from dotnet/coreclr (#36816)
dotnet-maestro[bot] Apr 13, 2019
613400d
Delete COMPlus_FinalizeOnShutdown (dotnet/coreclr#23595)
jkotas Apr 13, 2019
2062437
Move DateTime Windows implementation to shared CoreLib (#23888)
filipnavara Apr 13, 2019
4fa6319
Delete outdated comment
jkotas Apr 13, 2019
b06250e
JsonSerializerOptions API update and ignore property features (#36776)
steveharter Apr 13, 2019
e7fd166
Fix bad null check in pal_dsa.c
omajid Apr 8, 2019
3e2be47
Contextual reflection (#36845)
sdmaclea Apr 14, 2019
5ae3c56
Add Assembly.LoadWithPartialName cases (#36803)
sdmaclea Apr 14, 2019
954abcd
EnterContextualReflection handle null (dotnet/coreclr#23953)
sdmaclea Apr 13, 2019
52d4723
Improve HttpClient POST with REDIRECT tests (#36848)
davidsh Apr 14, 2019
62c4161
Delete unused AssemblyName._hashForControl and related code (#23972)
jkotas Apr 14, 2019
ebbfe1b
Update BuildTools, CoreClr to preview4-03913-01, preview5-27612-73, r…
dotnet-maestro-bot Apr 14, 2019
f277935
Move GCMemoryInfo to shared partition
jkotas Apr 13, 2019
1154e6c
Fix AssemblyName regression
jkotas Apr 13, 2019
1f07615
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Apr 14, 2019
92e8eb4
[master] Update dependencies from dotnet/core-setup (#36813)
dotnet-maestro[bot] Apr 14, 2019
a280216
[master] Update dependencies from dotnet/standard (#36815)
dotnet-maestro[bot] Apr 14, 2019
0aa6ccc
Remove myget feeds (#36797)
safern Apr 14, 2019
822da31
Fix build (#36862)
krwq Apr 14, 2019
b5a8985
Update dependencies from https://github.com/dotnet/coreclr build 2019…
dotnet-maestro[bot] Apr 14, 2019
68920bb
Implement IEquatable to Memory and ReadOnlyMemory (#36497)
Gnbrkm41 Apr 14, 2019
7336f57
Remove IgnoredTypes entries for the System.Runtime.Intrinsics.Arm.Arm…
tannergooding Apr 15, 2019
f389a14
Cleanup SocketOptionNameTest (#36864)
davidsh Apr 15, 2019
88b6ebe
SocketPal.Unix: replace DangerousGetHandle with SafeHandle marshallin…
tmds Apr 15, 2019
9a2cd88
Remove old method names from Rune (dotnet/coreclr#23938)
GrabYourPitchforks Apr 15, 2019
5928486
Remove unused offset calculation (dotnet/coreclr#23793)
razfriman Apr 15, 2019
2f14413
improve entropy (dotnet/coreclr#23591)
MarcoRossignoli Apr 15, 2019
81e0e2c
Update ProjectNTfs, ProjectNTfsTestILC to beta-27612-00, beta-27612-0…
dotnet-maestro-bot Apr 15, 2019
8c77bfb
Update dependencies from https://github.com/dotnet/core-setup build 2…
dotnet-maestro[bot] Apr 15, 2019
36596d7
[master] Update dependencies from dotnet/corefx (#36814)
dotnet-maestro[bot] Apr 15, 2019
ff1ff5e
Update dependencies from https://github.com/dotnet/standard build 201…
dotnet-maestro[bot] Apr 15, 2019
4d37ea9
Update dependencies from https://github.com/dotnet/coreclr build 2019…
dotnet-maestro[bot] Apr 15, 2019
25c1020
Add more number converter tests (#36653)
hughbe Apr 15, 2019
10d7d6f
Restore internal tools using .net core restore (#36840)
safern Apr 15, 2019
679dba7
Add guard for runtimes that support large arrays (#36883)
filipnavara Apr 15, 2019
d601d2e
Remove myget publish entirely (#36886)
safern Apr 15, 2019
6bfaf41
Json deserializer collection perf improvements by avoiding boxing (#3…
steveharter Apr 15, 2019
03ae543
Close the socket if bind() fails (#36769)
omajid Apr 15, 2019
f78e988
Remove null coalescing assignment operator to avoid build-from-source…
steveharter Apr 15, 2019
4e3b46c
add test for lower casing header name logic (#36708)
wfurt Apr 15, 2019
2041a42
Remove redundant UnderlyingSystemType calls (dotnet/coreclr#24000)
jkotas Apr 15, 2019
1141460
Add "partial" to MarshalAsAttribute (dotnet/coreclr#24014)
EgorBo Apr 15, 2019
ec652c1
Fold ResourceSet::CommonInit into constructor (dotnet/coreclr#23993)
jkotas Apr 16, 2019
2191763
Ref Assembly and Units for Span.Trim (#35576)
grant-d Apr 16, 2019
071e698
Fix incorrect bit match pattern in UTF-16 validation (dotnet/coreclr#…
GrabYourPitchforks Apr 16, 2019
339f951
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-maestro[bot] Apr 16, 2019
66bcc2d
Upgrade dotnet SDK to 3.0-preview3 (#36859)
ViktorHofer Apr 16, 2019
e2ecd2c
Update SDK requirement in windows-instructions
ViktorHofer Apr 16, 2019
8d79b61
Remove devdocs from System.Runtime.InteropServices code (#36669)
hughbe Apr 16, 2019
53f9e9e
React to RunTests CLI changes & Manual darc update (#36915)
ViktorHofer Apr 16, 2019
7ed0c53
support HTTP/2 without TLS (#36753)
wfurt Apr 16, 2019
97b5d17
Move EventSource to shared CoreLib partition (dotnet/coreclr#23925)
filipnavara Apr 16, 2019
00279f8
Move EventSource to shared CoreLib partition
filipnavara Apr 14, 2019
c3c0efd
Update owners (#36936)
carlossanlop Apr 16, 2019
18e1fab
add tests for invalid HTTP headers (#36898)
wfurt Apr 16, 2019
39cc915
Fix VB.Core SLN configurations (#36934)
ericstj Apr 16, 2019
0c9684c
Fix ClientWebSocket close handshake when using proxy (#36928)
davidsh Apr 17, 2019
ec1247f
[master] Update dependencies from arcade build 20190416.2 (#36943)
safern Apr 17, 2019
e5d2b52
Update testdata versions (#36938)
ViktorHofer Apr 17, 2019
f80cf8c
fix tests with http/2 (#36945)
wfurt Apr 17, 2019
f9f88bd
Run IBCMerge on Linux build (#36924)
MichalStrehovsky Apr 17, 2019
dbbabfb
adding default encoder as png when we are not able to find encoder (#…
Anipik Apr 17, 2019
18cd561
Disable asserting HttpListener web socket test (#36964)
stephentoub Apr 17, 2019
fa25b86
Regenerating the System.Runtime.Intrinsics reference source (#36965)
tannergooding Apr 17, 2019
681eee7
Changing Math.Max, Math.Min, Math.MaxMagnitude, and Math.MinMagnitude…
tannergooding Apr 17, 2019
1e3385e
Update the types consumers of Index and Range (dotnet/coreclr#24036)
tarekgh Apr 17, 2019
fbc748b
Use NativeLibrary.[Try]Load for netcoreapp3 (#36944)
am11 Apr 17, 2019
3ac254f
Update to add Json.NET (#36972)
steveharter Apr 17, 2019
bc8c222
Add Json serializer property name related features (#36940)
steveharter Apr 17, 2019
818355a
[master] Update dependencies from dotnet/coreclr (#36922)
dotnet-maestro[bot] Apr 17, 2019
d5a5f3c
Manually updating dependencies in order to get the new coreclr packag…
joperezr Apr 18, 2019
dcd8090
Fix SDK downgrading Platforms package (#36981)
ericstj Apr 18, 2019
60aee35
Add extra tests for UTF-16 validation of random 8-char data (#36903)
GrabYourPitchforks Apr 18, 2019
65f07a9
Improve System.Native build experience for new platforms (#36926)
am11 Apr 18, 2019
1824535
Fix ClientWebSocket closing handshake logic (#36975)
davidsh Apr 18, 2019
315fd00
Fix SocketsHttpHandler streams to do sync I/O in sync methods (#36946)
stephentoub Apr 18, 2019
1f9b84a
Re-design Utf8JsonWriter as a regular class rather than a ref struct.…
ahsonkhan Apr 18, 2019
82eedbf
handle bad Expires better (#36908)
wfurt Apr 18, 2019
74dda69
Update dependencies from https://github.com/dotnet/standard build 201…
dotnet-maestro[bot] Apr 18, 2019
c286ca0
Update dependencies from https://github.com/dotnet/coreclr build 2019…
dotnet-maestro[bot] Apr 18, 2019
bbb20b5
Update dependencies from https://github.com/dotnet/core-setup build 2…
dotnet-maestro[bot] Apr 18, 2019
0fd3b7e
Update dependencies from https://github.com/dotnet/corefx build 20190…
dotnet-maestro[bot] Apr 18, 2019
90d98b9
Handle concurrent dispose and WriteAsync calls (#36988)
davidfowl Apr 18, 2019
58048cc
handle socket exceptions gracefully and forward
Wraith2 Apr 6, 2019
9f21211
Merge branch 'sqlfix-33930' of https://github.com/Wraith2/corefx into…
Wraith2 Apr 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public SNIMarsConnection(SNIHandle lowerHandle)
_lowerHandle.SetAsyncCallbacks(HandleReceiveComplete, HandleSendComplete);
}

public SNIMarsHandle CreateMarsSession(object callbackObject, bool async)
public SNIMarsHandle CreateMarsSession(TdsParserStateObject callbackObject, bool async)
{
lock (this)
{
Expand Down Expand Up @@ -126,12 +126,12 @@ public uint CheckConnection()
/// <summary>
/// Process a receive error
/// </summary>
public void HandleReceiveError(SNIPacket packet)
public void HandleReceiveError(SNIPacket packet, uint sniErrorCode)
{
Debug.Assert(Monitor.IsEntered(this), "HandleReceiveError was called without being locked.");
foreach (SNIMarsHandle handle in _sessions.Values)
{
handle.HandleReceiveError(packet);
handle.HandleReceiveError(packet, sniErrorCode);
}
packet?.Dispose();
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
{
lock (this)
{
HandleReceiveError(packet);
HandleReceiveError(packet, sniErrorCode);
return;
}
}
Expand Down Expand Up @@ -192,7 +192,7 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
return;
}

HandleReceiveError(packet);
HandleReceiveError(packet, sniErrorCode);
return;
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
return;
}

HandleReceiveError(packet);
HandleReceiveError(packet, sniErrorCode);
return;
}
}
Expand All @@ -234,7 +234,7 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
if (!_sessions.ContainsKey(_currentHeader.sessionId))
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.SMUX_PROV, 0, SNICommon.InvalidParameterError, string.Empty);
HandleReceiveError(packet);
HandleReceiveError(packet, sniErrorCode);
_lowerHandle.Dispose();
_lowerHandle = null;
return;
Expand Down Expand Up @@ -280,7 +280,7 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
return;
}

HandleReceiveError(packet);
HandleReceiveError(packet, sniErrorCode);
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class SNIMarsHandle : SNIHandle
private readonly uint _status = TdsEnums.SNI_UNINITIALIZED;
private readonly Queue<SNIPacket> _receivedPacketQueue = new Queue<SNIPacket>();
private readonly Queue<SNIMarsQueuedPacket> _sendPacketQueue = new Queue<SNIMarsQueuedPacket>();
private readonly object _callbackObject;
private readonly TdsParserStateObject _callbackObject;
private readonly Guid _connectionId = Guid.NewGuid();
private readonly ushort _sessionId;
private readonly ManualResetEventSlim _packetEvent = new ManualResetEventSlim(false);
Expand Down Expand Up @@ -78,7 +78,7 @@ public override void Dispose()
/// <param name="sessionId">MARS session ID</param>
/// <param name="callbackObject">Callback object</param>
/// <param name="async">true if connection is asynchronous</param>
public SNIMarsHandle(SNIMarsConnection connection, ushort sessionId, object callbackObject, bool async)
public SNIMarsHandle(SNIMarsConnection connection, ushort sessionId, TdsParserStateObject callbackObject, bool async)
{
_sessionId = sessionId;
_connection = connection;
Expand Down Expand Up @@ -295,15 +295,23 @@ public override uint ReceiveAsync(ref SNIPacket packet)
/// <summary>
/// Handle receive error
/// </summary>
public void HandleReceiveError(SNIPacket packet)
public void HandleReceiveError(SNIPacket packet, uint sniErrorCode)
{
lock (_receivedPacketQueue)
{
_connectionError = SNILoadHandle.SingletonInstance.LastError;
_packetEvent.Set();
}

((TdsParserStateObject)_callbackObject).ReadAsyncCallback(PacketHandle.FromManagedPacket(packet), 1);
if (sniErrorCode == TdsEnums.SNI_WSAECONNRESET)
{
TdsParser parser = _callbackObject.Parser;
parser.State = TdsParserState.Broken;
parser.Connection.BreakConnection();
}
else
{
_callbackObject.ReadAsyncCallback(PacketHandle.FromManagedPacket(packet), sniErrorCode);
}
}

/// <summary>
Expand All @@ -317,7 +325,7 @@ public void HandleSendComplete(SNIPacket packet, uint sniErrorCode)
{
Debug.Assert(_callbackObject != null);

((TdsParserStateObject)_callbackObject).WriteAsyncCallback(PacketHandle.FromManagedPacket(packet), sniErrorCode);
_callbackObject.WriteAsyncCallback(PacketHandle.FromManagedPacket(packet), sniErrorCode);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Buffers;
using System.IO;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -18,31 +19,39 @@ internal partial class SNIPacket
/// <param name="callback">Completion callback</param>
public void ReadFromStreamAsync(Stream stream, SNIAsyncCallback callback)
{
// Treat local function as a static and pass all params otherwise as async will allocate
async Task ReadFromStreamAsync(SNIPacket packet, SNIAsyncCallback cb, ValueTask<int> valueTask)
static async Task ReadFromStreamAsync(SNIPacket packet, SNIAsyncCallback cb, ValueTask<int> valueTask)
{
bool error = false;
uint errorCode = TdsEnums.SNI_SUCCESS;
try
{
packet._length = await valueTask.ConfigureAwait(false);
if (packet._length == 0)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, 0, SNICommon.ConnTerminatedError, string.Empty);
error = true;
errorCode = TdsEnums.SNI_WSAECONNRESET;
}
}
catch (IOException ioException) when (
ioException?.InnerException is SocketException socketException &&
socketException!=null &&
socketException.SocketErrorCode==SocketError.OperationAborted
)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, SNICommon.InternalExceptionError, socketException);
errorCode = TdsEnums.SNI_WSAECONNRESET;
}
catch (Exception ex)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, SNICommon.InternalExceptionError, ex);
error = true;
errorCode = TdsEnums.SNI_ERROR;
}

if (error)
if (errorCode != TdsEnums.SNI_SUCCESS)
{
packet.Release();
}

cb(packet, error ? TdsEnums.SNI_ERROR : TdsEnums.SNI_SUCCESS);
cb(packet, errorCode);
}

ValueTask<int> vt = stream.ReadAsync(new Memory<byte>(_data, 0, _capacity), CancellationToken.None);
Expand Down Expand Up @@ -70,8 +79,7 @@ async Task ReadFromStreamAsync(SNIPacket packet, SNIAsyncCallback cb, ValueTask<
/// <param name="stream">Stream to write to</param>
public void WriteToStreamAsync(Stream stream, SNIAsyncCallback callback, SNIProviders provider, bool disposeAfterWriteAsync = false)
{
// Treat local function as a static and pass all params otherwise as async will allocate
async Task WriteToStreamAsync(SNIPacket packet, SNIAsyncCallback cb, SNIProviders providers, bool disposeAfter, ValueTask valueTask)
static async Task WriteToStreamAsync(SNIPacket packet, SNIAsyncCallback cb, SNIProviders providers, bool disposeAfter, ValueTask valueTask)
{
uint status = TdsEnums.SNI_SUCCESS;
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Buffers;
using System.IO;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -18,31 +19,39 @@ internal partial class SNIPacket
/// <param name="callback">Completion callback</param>
public void ReadFromStreamAsync(Stream stream, SNIAsyncCallback callback)
{
// Treat local function as a static and pass all params otherwise as async will allocate
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you retain the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can but it's no longer needed since a static can't refer to outer locals, sure you want to keep it?

async Task ReadFromStreamAsync(SNIPacket packet, SNIAsyncCallback cb, Task<int> task)
static async Task ReadFromStreamAsync(SNIPacket packet, SNIAsyncCallback cb, Task<int> task)
{
bool error = false;
uint errorCode = TdsEnums.SNI_SUCCESS;
try
{
packet._length = await task.ConfigureAwait(false);
if (packet._length == 0)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, 0, SNICommon.ConnTerminatedError, string.Empty);
error = true;
errorCode = TdsEnums.SNI_WSAECONNRESET;
}
}
catch (IOException ioException) when (
ioException?.InnerException is SocketException socketException &&
socketException != null &&
socketException.SocketErrorCode == SocketError.OperationAborted
)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, SNICommon.InternalExceptionError, socketException);
errorCode = TdsEnums.SNI_WSAECONNRESET;
}
catch (Exception ex)
{
SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.TCP_PROV, SNICommon.InternalExceptionError, ex);
error = true;
errorCode = TdsEnums.SNI_ERROR;
}

if (error)
if (errorCode != TdsEnums.SNI_SUCCESS)
{
packet.Release();
}

cb(packet, error ? TdsEnums.SNI_ERROR : TdsEnums.SNI_SUCCESS);
cb(packet, errorCode);
}

Task<int> t = stream.ReadAsync(_data, 0, _capacity, CancellationToken.None);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public enum FedAuthLibrary : byte
public const uint SNI_SUCCESS_IO_PENDING = 997; // Overlapped I/O operation is in progress.

// Windows Sockets Error Codes
public const short SNI_WSAECONNRESET = 10054; // An existing connection was forcibly closed by the remote host.
public const uint SNI_WSAECONNRESET = 10054; // An existing connection was forcibly closed by the remote host.

// SNI internal errors (shouldn't overlap with Win32 / socket errors)
public const uint SNI_QUEUE_FULL = 1048576; // Packet queue is full
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,7 @@ public void ReadAsyncCallback(IntPtr key, PacketHandle packet, uint error)

// The mars physical connection can get a callback
// with a packet but no result after the connection is closed.
if (source == null && _parser._pMarsPhysicalConObj == this)
Copy link
Contributor

@saurabh500 saurabh500 Apr 19, 2019

Choose a reason for hiding this comment

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

This condition removal doesn't seem right. This shouldn't be done in Native SNI. In native SNI, all callbacks happen on the same thread and this differentiation of the physical connection object is the only way to differentiate if the callback corresponds to this object.

Also why is this correct for Managed SNI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I've introduced the close method on disconnection the physical connection will now be nulled, so checking if it's the current instance doesn't help. This catches the case where the socket is closed while the socket wait is in progress which causes a 0 packet receive.

The socket in the native version is handled in the sni lib and the same condition doesn't occur there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Because I've introduced the close method on disconnection the physical connection will now be nulled

What close method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In SNIMarsHadle.HandleReceiveError,

if (sniErrorCode == TdsEnums.SNI_WSAECONNRESET)
{
    TdsParser parser = _callbackObject.Parser;
    parser.State = TdsParserState.Broken;
    parser.Connection.BreakConnection();
}

BreakConnection dooms closes and does a ton of other stuff one of which is nulling the state object. Since the only two values that object can have are null and this and if it's either null or this and the source tcs is null it's not going to work the check on the state object seemed redundant.

Copy link
Contributor

Choose a reason for hiding this comment

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

The BreakConnection, only impacts breaking the connection for Managed SNI, this code would never run for Native SNI, and in that case the removal of this check can have unpredictable impact when Native SNI is being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Then I'm going to have to put that back in and do some debugging and tracing to repo the problem it fixes and see if there's another way to detect it strictly in the managed side. I think if i'd seen one I would have used it so this might be tricky.

if (source == null)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override void CreateSessionHandle(TdsParserStateObject physicalConnect
_sessionHandle = managedSNIObject.CreateMarsSession(this, async);
}

internal SNIMarsHandle CreateMarsSession(object callbackObject, bool async)
internal SNIMarsHandle CreateMarsSession(TdsParserStateObject callbackObject, bool async)
{
return _marsConnection.CreateMarsSession(callbackObject, async);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public static class ConnectionPoolTest
private static readonly string _tcpMarsConnStr = (new SqlConnectionStringBuilder(DataTestUtility.TcpConnStr) { MultipleActiveResultSets = true, Pooling = true }).ConnectionString;


[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)]: */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void ConnectionPool_NonMars()
{
RunDataTestForSingleConnString(_tcpConnStr);
}

[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void ConnectionPool_Mars()
{
RunDataTestForSingleConnString(_tcpMarsConnStr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PoolBlockPeriodTest
private const int ConnectionTimeout = 15;
private const int CompareMargin = 2;

[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[InlineData("Azure with Default Policy must Disable blocking (*.database.windows.net)", new object[] { AzureEndpointSample })]
[InlineData("Azure with Default Policy must Disable blocking (*.database.chinacloudapi.cn)", new object[] { AzureChinaEnpointSample })]
[InlineData("Azure with Default Policy must Disable blocking (*.database.usgovcloudapi.net)", new object[] { AzureUSGovernmentEndpointSample })]
Expand All @@ -45,7 +45,7 @@ public void TestAzureBlockingPeriod(string description, object[] Params)
PoolBlockingPeriodAzureTest(connString, policy);
}

[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[InlineData("NonAzure with Default Policy must Enable blocking", new object[] { NonExistentServer })]
[InlineData("NonAzure with Auto Policy must Enable Blocking", new object[] { NonExistentServer, PoolBlockingPeriod.Auto })]
[InlineData("NonAzure with Always Policy must Enable Blocking", new object[] { NonExistentServer, PoolBlockingPeriod.AlwaysBlock })]
Expand All @@ -66,7 +66,7 @@ public void TestNonAzureBlockingPeriod(string description, object[] Params)
PoolBlockingPeriodNonAzureTest(connString, policy);
}

[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[InlineData("Test policy with Auto (lowercase)", "auto")]
[InlineData("Test policy with Auto (PascalCase)", "Auto")]
[InlineData("Test policy with Always (lowercase)", "alwaysblock")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ private static void RunAllTestsForSingleServer(string connectionString, bool usi
// These tests fail with named pipes, since they try to do DNS lookups on named pipe paths.
if (!usingNamePipes)
{
//if (DataTestUtility.IsUsingNativeSNI()) /* [ActiveIssue(33930)] */
//{
// TimeoutDuringReadAsyncWithClosedReaderTest(connectionString);
//}
if (DataTestUtility.IsUsingNativeSNI())
{
TimeoutDuringReadAsyncWithClosedReaderTest(connectionString);
}
NonFatalTimeoutDuringRead(connectionString);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void NamedPipesMARSTest()
}

#if DEBUG
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void MARSAsyncTimeoutTest()
{
using (SqlConnection connection = new SqlConnection(_connStr))
Expand Down Expand Up @@ -73,7 +73,7 @@ public static void MARSAsyncTimeoutTest()
}
}

[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void MARSSyncTimeoutTest()
{
using (SqlConnection connection = new SqlConnection(_connStr))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace System.Data.SqlClient.ManualTesting.Tests
public static class SqlCredentialTest
{

[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void CreateSqlConnectionWithCredential()
{
var user = "u" + Guid.NewGuid().ToString().Replace("-", "");
Expand Down Expand Up @@ -49,7 +49,7 @@ public static void CreateSqlConnectionWithCredential()
}
}

[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void SqlConnectionChangePasswordPlaintext()
{
var user = "u" + Guid.NewGuid().ToString().Replace("-", "");
Expand Down Expand Up @@ -82,7 +82,7 @@ public static void SqlConnectionChangePasswordPlaintext()
}
}

[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility),nameof(DataTestUtility.AreConnStringsSetup))]
public static void SqlConnectionChangePasswordSecureString()
{
var user = "u" + Guid.NewGuid().ToString().Replace("-", "");
Expand Down Expand Up @@ -122,7 +122,7 @@ public static void SqlConnectionChangePasswordSecureString()
}
}

[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), /* [ActiveIssue(33930)] */ nameof(DataTestUtility.IsUsingNativeSNI))]
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
public static void OldCredentialsShouldFail()
{
String user = "u" + Guid.NewGuid().ToString().Replace("-", "");
Expand Down