runtime: ClientAndServer_OneOrBothUseDefault_Ok failed in CI with ObjectDisposedException
Tests:
- System.Net.Security.Tests.ApmSslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok
- System.Net.Security.Tests.SyncSslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok
Hits:
- dotnet/corefx#41936 - System.Net.Security.Tests.AsyncSslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok(clientProtocols: Tls | Tls11 | Tls12, serverProtocols: null) failing in CI with ObjectDisposedException
Configuration: netcoreapp-Windows_NT-Release-x64-Windows.81.Amd64.Open
System.Net.Security.Tests.ApmSslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok(clientProtocols: Tls11, serverProtocols: Ssl2 | Default | Tls11 | Tls12)
System.ObjectDisposedException : Safe handle has been closed.\r\nObject name: 'SafeHandle'.
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) in /_/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeHandle.cs:line 158
at System.Net.Security.SafeCredentialReference..ctor(SafeFreeCredentials target) in /_/src/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs:line 354
at System.Net.Security.SafeCredentialReference.CreateReference(SafeFreeCredentials target) in /_/src/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs:line 340
at System.Net.Security.SslSessionsCache.CacheCredential(SafeFreeCredentials creds, Byte[] thumbPrint, SslProtocols sslProtocols, Boolean isServer, EncryptionPolicy encryptionPolicy) in /_/src/System.Net.Security/src/System/Net/Security/SslSessionsCache.cs:line 201
at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) in /_/src/System.Net.Security/src/System/Net/Security/SecureChannel.cs:line 846
at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) in /_/src/System.Net.Security/src/System/Net/Security/SecureChannel.cs:line 738
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 446
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 662
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 617
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 796
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslStream.<ThrowIfExceptional>g__ThrowExceptional|141_0(ExceptionDispatchInfo e) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 844
at System.Net.Security.SslStream.ThrowIfExceptional() in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 845
at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 439
at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 410
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 241
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) in /_/src/System.Private.CoreLib/shared/System/Threading/Tasks/FutureFactory.cs:line 514
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 83
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 111
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 71
at System.Net.Security.Tests.SslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok(Nullable`1 clientProtocols, Nullable`1 serverProtocols) in /_/src/System.Net.Security/tests/FunctionalTests/SslStreamSystemDefaultsTest.cs:line 63
--- End of stack trace from previous location where exception was thrown ---
cc @davidsh, @wfurt, @scalablecory, @eiriktsarpalis, @karelz
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (10 by maintainers)
I was able to reproduce this locally on my W11 VM (~ 250 runs) I will take a look.