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

Crypto and Networking tests failing on Linux Mariner when running on Mono. #57506

Closed
Tracked by #64488
safern opened this issue Aug 16, 2021 · 5 comments · Fixed by #90199
Closed
Tracked by #64488

Crypto and Networking tests failing on Linux Mariner when running on Mono. #57506

safern opened this issue Aug 16, 2021 · 5 comments · Fixed by #90199
Labels
area-System.Security runtime-mono specific to the Mono runtime
Milestone

Comments

@safern
Copy link
Member

safern commented Aug 16, 2021

There are a bunch of tests failing when running on Mono in Linux Mariner.

It seems like all these tests share this common call: Internal.Cryptography.Pal.ChainPal.BuildChain which then calls into openssl. The weird thing is that it only happens with Mono.

Some examples:

System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True)
System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1528,0): at System.Net.Tests.HttpWebRequestTest.Headers_GetResponseHeaders_ContainsExpectedValue(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1242,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        /_/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs(552,0): at System.Net.WebRequest.<>c.<GetResponseAsync>b__68_2(IAsyncResult iar)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs(507,0): at System.Threading.Tasks.TaskFactory`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1534,0): at System.Net.Tests.HttpWebRequestTest.<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(21,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.<WaitWithCancellationAsync>d__1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(547,0): at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1180,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1238,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1538,0): at System.Net.Tests.HttpWebRequestTest.<>c.<<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_1>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(64,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
    System.Net.Tests.HttpWebRequestTest_Sync.SimpleScenario_UsePOSTVerb_Success(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1668,0): at System.Net.Tests.HttpWebRequestTest.SimpleScenario_UsePOSTVerb_Success(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1028,0): at System.Net.HttpWebRequest.GetResponse()
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(36,0): at System.Net.Tests.HttpWebRequestTest_Sync.<>c__DisplayClass1_0.<GetResponseAsync>b__0()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs(503,0): at System.Threading.Tasks.Task`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].InnerInvoke()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2369,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2331,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1678,0): at System.Net.Tests.HttpWebRequestTest.<SimpleScenario_UsePOSTVerb_Success>b__129_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(29,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellation(CancellationToken cancellationToken)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(35,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellationAsync(Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs(64,0): at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs(562,0): at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs(65,0): at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(492,0): at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1176,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1024,0): at System.Net.HttpWebRequest.GetResponse()
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid [FAIL]
      System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(277,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.RunChain(X509Chain chain, X509Certificate2 cert, Boolean expectSuccess, String msg)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(428,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateAndTestChain(AsymmetricAlgorithm rootPrivKey, AsymmetricAlgorithm intermed1PrivKey, AsymmetricAlgorithm intermed2PrivKey, AsymmetricAlgorithm leafPubKey)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(59,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs(370,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

cc: @akoeplinger @steveisok @bartonjs

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Aug 16, 2021
@ghost
Copy link

ghost commented Aug 16, 2021

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

Issue Details

There are a bunch of tests failing when running on Mono in Linux Mariner.

It seems like all these tests share this common call: Internal.Cryptography.Pal.ChainPal.BuildChain which then calls into openssl. The weird thing is that it only happens with Mono.

Some examples:

System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True)
System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1528,0): at System.Net.Tests.HttpWebRequestTest.Headers_GetResponseHeaders_ContainsExpectedValue(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1242,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        /_/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs(552,0): at System.Net.WebRequest.<>c.<GetResponseAsync>b__68_2(IAsyncResult iar)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs(507,0): at System.Threading.Tasks.TaskFactory`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1534,0): at System.Net.Tests.HttpWebRequestTest.<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(21,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.<WaitWithCancellationAsync>d__1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(547,0): at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1180,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1238,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1538,0): at System.Net.Tests.HttpWebRequestTest.<>c.<<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_1>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(64,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
    System.Net.Tests.HttpWebRequestTest_Sync.SimpleScenario_UsePOSTVerb_Success(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1668,0): at System.Net.Tests.HttpWebRequestTest.SimpleScenario_UsePOSTVerb_Success(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1028,0): at System.Net.HttpWebRequest.GetResponse()
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(36,0): at System.Net.Tests.HttpWebRequestTest_Sync.<>c__DisplayClass1_0.<GetResponseAsync>b__0()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs(503,0): at System.Threading.Tasks.Task`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].InnerInvoke()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2369,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2331,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1678,0): at System.Net.Tests.HttpWebRequestTest.<SimpleScenario_UsePOSTVerb_Success>b__129_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(29,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellation(CancellationToken cancellationToken)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(35,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellationAsync(Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs(64,0): at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs(562,0): at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs(65,0): at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(492,0): at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1176,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1024,0): at System.Net.HttpWebRequest.GetResponse()
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid [FAIL]
      System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(277,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.RunChain(X509Chain chain, X509Certificate2 cert, Boolean expectSuccess, String msg)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(428,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateAndTestChain(AsymmetricAlgorithm rootPrivKey, AsymmetricAlgorithm intermed1PrivKey, AsymmetricAlgorithm intermed2PrivKey, AsymmetricAlgorithm leafPubKey)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(59,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs(370,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

cc: @akoeplinger @steveisok @bartonjs

Author: safern
Assignees: -
Labels:

area-System.Net.Http, untriaged

Milestone: -

@ManickaP ManickaP added the runtime-mono specific to the Mono runtime label Aug 16, 2021
@akoeplinger akoeplinger added this to the 7.0.0 milestone Aug 16, 2021
@akoeplinger akoeplinger removed the untriaged New issue has not been triaged by the area owner label Aug 16, 2021
@wfurt
Copy link
Member

wfurt commented Aug 16, 2021

related to #56478 ? That one is Mono only as well.

@ghost
Copy link

ghost commented Aug 16, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

There are a bunch of tests failing when running on Mono in Linux Mariner.

It seems like all these tests share this common call: Internal.Cryptography.Pal.ChainPal.BuildChain which then calls into openssl. The weird thing is that it only happens with Mono.

Some examples:

System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True)
System.Net.Tests.HttpWebRequestTest_Async.Headers_GetResponseHeaders_ContainsExpectedValue(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1528,0): at System.Net.Tests.HttpWebRequestTest.Headers_GetResponseHeaders_ContainsExpectedValue(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1242,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        /_/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs(552,0): at System.Net.WebRequest.<>c.<GetResponseAsync>b__68_2(IAsyncResult iar)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs(507,0): at System.Threading.Tasks.TaskFactory`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1534,0): at System.Net.Tests.HttpWebRequestTest.<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(21,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.<WaitWithCancellationAsync>d__1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(547,0): at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1180,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1238,0): at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1538,0): at System.Net.Tests.HttpWebRequestTest.<>c.<<Headers_GetResponseHeaders_ContainsExpectedValue>b__119_1>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(64,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
    System.Net.Tests.HttpWebRequestTest_Sync.SimpleScenario_UsePOSTVerb_Success(useSsl: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (The SSL connection could not be established, see inner exception.)) (One or more errors occurred. (Error occurred during a cryptographic operation.))
      ---- System.AggregateException : One or more errors occurred. (The SSL connection could not be established, see inner exception.)
      -------- System.Net.WebException : The SSL connection could not be established, see inner exception.
      ------------ System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: Connection reset by peer.
      -------------------- System.Net.Sockets.SocketException : Connection reset by peer
      ---- System.AggregateException : One or more errors occurred. (Error occurred during a cryptographic operation.)
      -------- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(89,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(117,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1668,0): at System.Net.Tests.HttpWebRequestTest.SimpleScenario_UsePOSTVerb_Success(Boolean useSsl)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1028,0): at System.Net.HttpWebRequest.GetResponse()
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(36,0): at System.Net.Tests.HttpWebRequestTest_Sync.<>c__DisplayClass1_0.<GetResponseAsync>b__0()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs(503,0): at System.Threading.Tasks.Task`1[[System.Net.WebResponse, System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].InnerInvoke()
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2369,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2331,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
        --- End of stack trace from previous location ---
        /_/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs(1678,0): at System.Net.Tests.HttpWebRequestTest.<SimpleScenario_UsePOSTVerb_Success>b__129_0(Uri uri)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(72,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(92,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1389,0): at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1455,0): at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(453,0): at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(29,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellation(CancellationToken cancellationToken)
        /_/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs(35,0): at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellationAsync(Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(547,0): at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(958,0): at System.Net.Http.HttpConnectionPool.SendUsingHttp11Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1003,0): at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1008,0): at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(1027,0): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs(64,0): at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs(15,0): at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs(562,0): at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs(65,0): at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(492,0): at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1176,0): at System.Net.HttpWebRequest.SendRequest(Boolean async)
        /_/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs(1024,0): at System.Net.HttpWebRequest.GetResponse()
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1370,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs(1267,0): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(1099,0): at System.Net.Security.SslStream.<<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0>d`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(462,0): at System.Net.Security.SslStream.<ReceiveBlobAsync>d__174`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(381,0): at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__173`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs(68,0): at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs(42,0): at System.Net.Security.SslStreamCertificateContext.Create(X509Certificate2 target, X509Certificate2Collection additionalCertificates, Boolean offline, SslCertificateTrust trust)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs(66,0): at System.Net.Security.SslAuthenticationOptions..ctor(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(166,0): at System.Net.Security.SslStream.CreateAuthenticationOptions(SslServerAuthenticationOptions sslServerAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(419,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.cs(408,0): at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(474,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(153,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(1066,0): at System.Net.Test.Common.LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content)
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid
System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid [FAIL]
      System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(216,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.<LoadMachineStores>g__ProcessFile|25_1(FileInfo file, <>c__DisplayClass25_0& )
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(141,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.LoadMachineStores(DirectoryInfo rootStorePath, FileInfo rootStoreFile)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(109,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetCollections()
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs(70,0): at Internal.Cryptography.Pal.CachedSystemStoreProvider.GetNativeCollections(SafeX509StackHandle& root, SafeX509StackHandle& intermediate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs(103,0): at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.InitiateChain(SafeX509Handle leafHandle, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan remainingDownloadTime)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs(74,0): at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, X509Certificate2Collection customTrustStore, X509ChainTrustMode trustMode, DateTime verificationTime, TimeSpan timeout, Boolean disableAia)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(134,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate, Boolean throwOnException)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs(107,0): at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(277,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.RunChain(X509Chain chain, X509Certificate2 cert, Boolean expectSuccess, String msg)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(428,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateAndTestChain(AsymmetricAlgorithm rootPrivKey, AsymmetricAlgorithm intermed1PrivKey, AsymmetricAlgorithm intermed2PrivKey, AsymmetricAlgorithm leafPubKey)
        /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestChainTests.cs(59,0): at System.Security.Cryptography.X509Certificates.Tests.CertificateCreation.CertificateRequestChainTests.CreateChain_Hybrid()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs(370,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

cc: @akoeplinger @steveisok @bartonjs

Author: safern
Assignees: -
Labels:

area-System.Net.Http, area-System.Security, runtime-mono

Milestone: 7.0.0

@bartonjs
Copy link
Member

bartonjs commented Aug 5, 2022

https://helix.dot.net/ only talks about mariner.2, but

- (Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
says mariner.1 (and there's no pipeline using mariner.2 that I see) so I'm not entirely sure the right way to go about clearing the ActiveIssue label here. But, having said that.

root [ /projects/runtime ]# ./dotnet.sh build /t:Test /p:RuntimeFlavor=mono /p:OuterLoop=true  src/libraries/System.Security.Cryptography.X509Certificates/tests/
MSBuild version 17.3.0-preview-22306-01+1c045cf58 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  Microsoft.Interop.SourceGeneration -> /projects/runtime/artifacts/bin/Microsoft.Interop.SourceGeneration/Debug/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
  LibraryImportGenerator -> /projects/runtime/artifacts/bin/LibraryImportGenerator/Debug/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.dll
  TestUtilities -> /projects/runtime/artifacts/bin/TestUtilities/Debug/net6.0/TestUtilities.dll
  System.Runtime -> /projects/runtime/artifacts/bin/System.Runtime/ref/Debug/net7.0/System.Runtime.dll
  System.Collections -> /projects/runtime/artifacts/bin/System.Collections/ref/Debug/net7.0/System.Collections.dll
  System.Runtime.Numerics -> /projects/runtime/artifacts/bin/System.Runtime.Numerics/ref/Debug/net7.0/System.Runtime.Numerics.dll
  System.Formats.Asn1 -> /projects/runtime/artifacts/bin/System.Formats.Asn1/ref/Debug/net7.0/System.Formats.Asn1.dll
  System.Formats.Asn1 -> /projects/runtime/artifacts/bin/System.Formats.Asn1/Debug/net7.0/System.Formats.Asn1.dll
  System.Security.Cryptography.Pkcs -> /projects/runtime/artifacts/bin/System.Security.Cryptography.Pkcs/ref/Debug/net7.0/System.Security.Cryptography.Pkcs.dll
  System.Security.Cryptography.Pkcs -> /projects/runtime/artifacts/bin/System.Security.Cryptography.Pkcs/Debug/net7.0/System.Security.Cryptography.Pkcs.dll
  System.Security.Cryptography.X509Certificates.Tests -> /projects/runtime/artifacts/bin/System.Security.Cryptography.X509Certificates.Tests/Debug/net7.0-unix/System.Security.Cryptography.X509Certificates.Tests.dll
  ----- start Fri Aug 5 06:15:01 PM UTC 2022 =============== To repro directly: =====================================================
  pushd /projects/runtime/artifacts/bin/System.Security.Cryptography.X509Certificates.Tests/Debug/net7.0-unix
  /projects/runtime/artifacts/bin/testhost/net7.0-Linux-Debug-x64/dotnet exec --runtimeconfig System.Security.Cryptography.X509Certificates.Tests.runtimeconfig.json --depsfile System.Security.Cryptography.X509Certificates.Tests.deps.json xunit.console.dll System.Security.Cryptography.X509Certificates.Tests.dll -xml testResults.xml -nologo -notrait category=failing
  popd
  ===========================================================================================================
  /projects/runtime/artifacts/bin/System.Security.Cryptography.X509Certificates.Tests/Debug/net7.0-unix /projects/runtime/src/libraries/System.Security.Cryptography.X509Certificates/tests
    Discovering: System.Security.Cryptography.X509Certificates.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Security.Cryptography.X509Certificates.Tests (found 832 of 879 test cases)
    Starting:    System.Security.Cryptography.X509Certificates.Tests (parallel test collections = on, max threads = 8)
      System.Security.Cryptography.X509Certificates.Tests.X509StoreTests.X509Store_MachineStoreLoadSkipsInvalidFiles [SKIP]
        Condition(s) not met: "NotRunningAsRootAndRemoteExecutorSupported"
      System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.VerifyCrlCache [SKIP]
        Condition(s) not met: "RunManualTests"
    Finished:    System.Security.Cryptography.X509Certificates.Tests
  === TEST EXECUTION SUMMARY ===
     System.Security.Cryptography.X509Certificates.Tests  Total: 1832, Errors: 0, Failed: 0, Skipped: 2, Time: 114.176s
  /projects/runtime/src/libraries/System.Security.Cryptography.X509Certificates/tests
  ----- end Fri Aug 5 06:16:57 PM UTC 2022 ----- exit code 0 ----------------------------------------------------------
  exit code 0 means Exited Successfully
# ./dotnet.sh build /t:Test /p:RuntimeFlavor=mono /p:OuterLoop=true  src/libraries/System.Net.Security/tests/FunctionalTests/
MSBuild version 17.3.0-preview-22306-01+1c045cf58 for .NET
  Determining projects to restore...
  Restored /projects/runtime/src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj (in 286 ms).
  Restored /projects/runtime/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj (in 286 ms).
  Restored /projects/runtime/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj (in 286 ms).
  Restored /projects/runtime/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj (in 2.53 sec).
  5 of 9 projects are up-to-date for restore.
  Microsoft.Interop.SourceGeneration -> /projects/runtime/artifacts/bin/Microsoft.Interop.SourceGeneration/Debug/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
  LibraryImportGenerator -> /projects/runtime/artifacts/bin/LibraryImportGenerator/Debug/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.dll
  TestUtilities -> /projects/runtime/artifacts/bin/TestUtilities/Debug/net6.0/TestUtilities.dll
  System.Runtime -> /projects/runtime/artifacts/bin/System.Runtime/ref/Debug/net7.0/System.Runtime.dll
  System.Security.Claims -> /projects/runtime/artifacts/bin/System.Security.Claims/ref/Debug/net7.0/System.Security.Claims.dll
  System.Security.Principal.Windows -> /projects/runtime/artifacts/bin/System.Security.Principal.Windows/ref/Debug/net7.0/System.Security.Principal.Windows.dll
  System.Security.Principal.Windows -> /projects/runtime/artifacts/bin/System.Security.Principal.Windows/Debug/net7.0/System.Security.Principal.Windows.dll
  StreamConformanceTests -> /projects/runtime/artifacts/bin/StreamConformanceTests/Debug/net7.0/StreamConformanceTests.dll
  System.Net.Security.Tests -> /projects/runtime/artifacts/bin/System.Net.Security.Tests/Debug/net7.0-unix/System.Net.Security.Tests.dll
  ----- start Fri Aug 5 06:20:51 PM UTC 2022 =============== To repro directly: =====================================================
  pushd /projects/runtime/artifacts/bin/System.Net.Security.Tests/Debug/net7.0-unix
  /projects/runtime/artifacts/bin/testhost/net7.0-Linux-Debug-x64/dotnet exec --runtimeconfig System.Net.Security.Tests.runtimeconfig.json --depsfile System.Net.Security.Tests.deps.json xunit.console.dll System.Net.Security.Tests.dll -xml testResults.xml -nologo -notrait category=failing
  popd
  ===========================================================================================================
  /projects/runtime/artifacts/bin/System.Net.Security.Tests/Debug/net7.0-unix /projects/runtime/src/libraries/System.Net.Security/tests/FunctionalTests
    Discovering: System.Net.Security.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Net.Security.Tests (found 322 of 487 test cases)
    Starting:    System.Net.Security.Tests (parallel test collections = on, max threads = 8)
      System.Net.Security.Tests.NegotiateStreamKerberosTest.NegotiateStream_ClientAuthenticationRemote_Fails [SKIP]
        Condition(s) not met: "IsServerAndDomainAvailable"
      System.Net.Security.Tests.NegotiateStreamKerberosTest.NegotiateStream_ClientAuthenticationRemote_Success [SKIP]
        Condition(s) not met: "IsServerAndDomainAvailable"
      System.Net.Security.Tests.NegotiateStreamKerberosTest.NegotiateStream_ServerAuthenticationRemote_Success [SKIP]
        Condition(s) not met: "IsClientAvailable"
      System.Net.Security.Tests.SslStreamEKUTest.SslStream_SelfSignedClientEKUClientAuth_Ok [SKIP]
        Condition(s) not met: "IsRootCertificateInstalled"
      System.Net.Security.Tests.SslStreamEKUTest.SslStream_ServerEKUClientAuth_Fails [SKIP]
        Condition(s) not met: "IsRootCertificateInstalled"
      System.Net.Security.Tests.SslStreamEKUTest.SslStream_ClientEKUServerAuth_Fails [SKIP]
        Condition(s) not met: "IsRootCertificateInstalled"
      System.Net.Security.Tests.SslStreamEKUTest.SslStream_NoEKUServerAuth_Ok [SKIP]
        Condition(s) not met: "IsRootCertificateInstalled"
      System.Net.Security.Tests.SslStreamEKUTest.SslStream_NoEKUClientAuth_Ok [SKIP]
        Condition(s) not met: "IsRootCertificateInstalled"
      System.Net.Security.Tests.SslStreamCertificateTrustTest.SslStream_SendCertificateTrust_ThrowsOnUnsupportedPlatform [SKIP]
        Condition(s) not met: "DoesNotSupportSendingCustomCANamesInTls"
      System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_ClientCertificate_SendsChain [SKIP]
        chain cannot be built 1
    Finished:    System.Net.Security.Tests
  === TEST EXECUTION SUMMARY ===
     System.Net.Security.Tests  Total: 4853, Errors: 0, Failed: 0, Skipped: 10, Time: 16.989s
  /projects/runtime/src/libraries/System.Net.Security/tests/FunctionalTests
  ----- end Fri Aug 5 06:21:10 PM UTC 2022 ----- exit code 0 ----------------------------------------------------------
  exit code 0 means Exited Successfully

# cat /etc/os-release
NAME="Common Base Linux Mariner"
VERSION="2.0.20220731"
ID=mariner
VERSION_ID="2.0"
PRETTY_NAME="CBL-Mariner/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/cbl-mariner"
BUG_REPORT_URL="https://aka.ms/cbl-mariner"
SUPPORT_URL="https://aka.ms/cbl-mariner"

That was with re-enabling all of the disabled tests:

diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/AssemblyInfo.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/AssemblyInfo.cs
index 68b152e1c3b..9adf9f8c835 100644
--- a/src/libraries/System.Net.Security/tests/FunctionalTests/AssemblyInfo.cs
+++ b/src/libraries/System.Net.Security/tests/FunctionalTests/AssemblyInfo.cs
@@ -5,5 +5,4 @@
 using Xunit;

 [assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
-[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
-[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]
\ No newline at end of file
+[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on Browser")]
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/AssemblyInfo.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/AssemblyInfo.cs
index d338fa7711a..4eb4b982016 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/AssemblyInfo.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/AssemblyInfo.cs
@@ -5,4 +5,3 @@
 using System;
 using Xunit;

-[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/57810", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs
index 614ae070496..bf0b9e230a1 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs
@@ -11,7 +11,6 @@

 namespace System.Security.Cryptography.X509Certificates.Tests
 {
-    [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
     public static class ChainTests
     {
         private static bool TrustsMicrosoftDotComRoot
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
index df5c022b9fc..73c00e0dd43 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
@@ -886,7 +886,6 @@ public static void X509CertificateCollectionCopyTo()
         }

         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNonZeroLowerBoundArraySupported))]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
         public static void X509ChainElementCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeException()
         {
             using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes))
@@ -1302,7 +1301,6 @@ public static void X509Certificate2CollectionGetHashCode()
         }

         [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
         public static void X509ChainElementCollection_IndexerVsEnumerator()
         {
             using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes))
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs
index c90b43d5243..489298ea58e 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs
@@ -12,7 +12,6 @@

 namespace System.Security.Cryptography.X509Certificates.Tests
 {
-    [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
     public static class DynamicChainTests
     {
         private static X509Extension BasicConstraintsCA => new X509BasicConstraintsExtension(
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs
index 4abcce87bc5..a734da8b711 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs
@@ -231,7 +231,6 @@ public static void FindByValidThumbprint_ValidOnly(bool validOnly)
         }

         [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
         [SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "Root certificate store is not accessible")]
         public static void FindByValidThumbprint_RootCert()
         {
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs
index 89882f4de5a..88cf0c20b8c 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs
@@ -8,7 +8,6 @@

 namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests
 {
-    [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
     [SkipOnPlatform(TestPlatforms.Android, "Android does not support AIA fetching")]
     public static class AiaTests
     {
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs
index c63d118117b..a10c0f48a44 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs
@@ -426,7 +426,6 @@ public static void OpenMachineRootStore_Permissions(OpenFlags permissions, bool
         }

         [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))]
         [SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "Root certificate store is not accessible")]
         public static void MachineRootStore_NonEmpty()
         {

So whatever the crashes were, they're gone now... at least on current mariner.2

@wfurt
Copy link
Member

wfurt commented Aug 5, 2022

(Mariner.1.0.Amd64.Open) is container. https://helix.dot.net/ only shows full OSes e.g queues. In the example above,
we run the container on top of Ubuntu 16 -> that should be loooooong dead.

I think not would be OK to remove the active issue if we run on Mariner.2.
And we should probably update the test queue to run on current version(s)

lewing added a commit to lewing/runtime that referenced this issue Aug 15, 2022
lewing added a commit that referenced this issue Aug 15, 2022
* Remove active issues for  #57506

* Remove AssemblyInfo.cs references
@ghost ghost locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Security runtime-mono specific to the Mono runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants