weixin_39587246
weixin_39587246
2021-01-11 10:24

Tests failed: System.Net.Http.Functional.Tests.ManagedHandler_HttpClientHandler_SslProtocols_Test / GetAsync_*SSLVersion_Succeeds

Regression caused by dotnet/corefx#26135 ()

Types of failures

Affected tests: * GetAsync_AllowedSSLVersion_Succeeds * GetAsync_SupportedSSLVersion_Succeeds

GetAsync_AllowedSSLVersion_Succeeds - The client and server cannot communicate, because they do not possess a common algorithm

Build 20180105.02:


System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception.
---- System.ComponentModel.Win32Exception : The client and server cannot communicate, because they do not possess a common algorithm
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 975
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 802
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 792
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 961
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 916
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 864
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 673
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 594
at System.Net.Security.SslStream.BeginAuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, Object asyncState) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 242
at System.Net.Security.SslStream.BeginAuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 219
at System.Net.Security.SslStream.<>c.<authenticateasserverasync>b__47_1(X509Certificate arg1, Boolean arg2, SslProtocols arg3, AsyncCallback callback, Object state) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 404
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) in E:\A\_work\1734\s\src\mscorlib\src\System\Threading\Tasks\FutureFactory.cs:line 1218
at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 405
at System.Net.Test.Common.LoopbackServer.<acceptsocketasync>d__11.MoveNext() in E:\A\_work\640\s\corefx\src\Common\tests\System\Net\Http\LoopbackServer.cs:line 164
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<>c__DisplayClass4_1.<<getasync_allowedsslversion_succeeds>b__0>d.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.SslProtocols.cs:line 115
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.<createserverasync>b__0(Task t) in E:\A\_work\640\s\corefx\src\Common\tests\System\Net\Http\LoopbackServer.cs:line 67
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() in E:\A\_work\1734\s\src\mscorlib\src\System\Threading\Tasks\TaskContinuation.cs:line 59
at System.Threading.Tasks.Task.<>c.<.cctor>b__278_1(Object obj) in E:\A\_work\1734\s\src\mscorlib\src\System\Threading\Tasks\Task.cs:line 2480
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in E:\A\_work\1734\s\src\mscorlib\shared\System\Threading\ExecutionContext.cs:line 151
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) in E:\A\_work\1734\s\src\mscorlib\src\System\Threading\Tasks\Task.cs:line 2440
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<getasync_allowedsslversion_succeeds>d__4.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.SslProtocols.cs:line 113
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
</getasync_allowedsslversion_succeeds></.cctor></createserverasync></getasync_allowedsslversion_succeeds></acceptsocketasync></authenticateasserverasync>

GetAsync_SupportedSSLVersion_Succeeds - The function requested is not supported

Build 20180105.02


System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
---- System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception.
-------- System.ComponentModel.Win32Exception : The function requested is not supported
at System.Net.Http.HttpConnectionHandler.<establishsslconnection>d__5.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\HttpConnectionHandler.cs:line 82
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnectionHandler.<createconnection>d__6.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\HttpConnectionHandler.cs:line 136
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnectionPool.<waitforcreatedconnectionasync>d__15.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\HttpConnectionPool.cs:line 226
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnectionHandler.<sendasyncwithawaitedconnection>d__4.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\HttpConnectionHandler.cs:line 42
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.CookieHandler.<sendasync>d__3.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\CookieHandler.cs:line 31
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.AuthenticateAndRedirectHandler.<sendasync>d__7.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\AuthenticateAndRedirectHandler.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpClient.<finishsendasyncbuffered>d__62.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\HttpClient.cs:line 488
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Test.Common.RemoteServerQuery.<run>d__0`1.MoveNext() in E:\A\_work\640\s\corefx\src\Common\tests\System\Net\RemoteServerQuery.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<getasync_supportedsslversion_succeeds>d__6.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.SslProtocols.cs:line 148
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 975
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 802
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 792
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 961
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 916
at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 1096
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 735
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslState.cs:line 708
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 194
at System.Net.Security.SslStream.<>c.<authenticateasclientasync>b__44_1(IAsyncResult iar) in E:\A\_work\640\s\corefx\src\System.Net.Security\src\System\Net\Security\SslStream.cs:line 381
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) in E:\A\_work\1734\s\src\mscorlib\src\System\Threading\Tasks\FutureFactory.cs:line 533
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnectionHandler.<establishsslconnection>d__5.MoveNext() in E:\A\_work\640\s\corefx\src\System.Net.Http\src\System\Net\Http\Managed\HttpConnectionHandler.cs:line 68
----- Inner Stack Trace -----
</establishsslconnection></authenticateasclientasync></getasync_supportedsslversion_succeeds></run></finishsendasyncbuffered></sendasync></sendasync></sendasyncwithawaitedconnection></waitforcreatedconnectionasync></createconnection></establishsslconnection>

GetAsync_AllowedSSLVersion_Succeeds


System.Net.Http.HttpRequestException : An error occurred while sending the request.
---- System.IO.IOException : The decryption operation failed, see inner exception.
-------- Interop+OpenSsl+SslException : Decrypt failed with OpenSSL error - SSL_ERROR_SSL.
------------ System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
at System.Net.Http.HttpConnection.<sendasync>d__38.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnection.cs:line 438
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnectionHandler.<sendasyncwithawaitedconnection>d__4.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionHandler.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.CookieHandler.<sendasync>d__3.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/CookieHandler.cs:line 31
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.AuthenticateAndRedirectHandler.<sendasync>d__7.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/AuthenticateAndRedirectHandler.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpClient.<finishsendasyncbuffered>d__62.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/HttpClient.cs:line 488
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<>c__DisplayClass4_1.<<getasync_allowedsslversion_succeeds>b__0>d.MoveNext() in /root/corefx-1266141/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs:line 115
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.<createserverasync>b__0(Task t) in /root/corefx-1266141/src/Common/tests/System/Net/Http/LoopbackServer.cs:line 68
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in /root/coreclr/src/mscorlib/shared/System/Threading/ExecutionContext.cs:line 151
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) in /root/coreclr/src/mscorlib/src/System/Threading/Tasks/Task.cs:line 2440
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<getasync_allowedsslversion_succeeds>d__4.MoveNext() in /root/corefx-1266141/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs:line 113
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
at System.Net.Security.SslStreamInternal.<readasyncinternal>d__32`1.MoveNext() in /root/corefx-1266141/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.cs:line 285
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnection.<fillasync>d__64.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnection.cs:line 958
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnection.<readnextlineasync>d__62.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnection.cs:line 867
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.HttpConnection.<sendasync>d__38.MoveNext() in /root/corefx-1266141/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnection.cs:line 313
----- Inner Stack Trace -----
at Interop.OpenSsl.Decrypt(SafeSslHandle context, Byte[] outBuffer, Int32 offset, Int32 count, SslErrorCode& errorCode) in /root/corefx-1266141/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs:line 269
at System.Net.Security.SslStreamPal.EncryptDecryptHelper(SafeDeleteContext securityContext, ReadOnlyMemory`1 input, Int32 offset, Int32 size, Boolean encrypt, Byte[]& output, Int32& resultSize) in /root/corefx-1266141/src/System.Net.Security/src/System/Net/Security/SslStreamPal.Unix.cs:line 207
----- Inner Stack Trace -----
</sendasync></readnextlineasync></fillasync></readasyncinternal></getasync_allowedsslversion_succeeds></createserverasync></getasync_allowedsslversion_succeeds></finishsendasyncbuffered></sendasync></sendasync></sendasyncwithawaitedconnection></sendasync>

History of failures

Day | Build | OS | Test name --- | --- | --- | --- 7/6-7/8 | many | Various Linux | 80x failed in each build (similar SSPI errors) - 480 failures 7/6-7/11 | many | Win7 | 4x & 4x failed in each build (same/similar SSPI errors) - 128 failures 7/11 | N/A | All | Tests were disabled in https://github.com/geoffkizer/corefx/commit/9c4af2973699aea35ce5c60c00f7dd14398e7a14#diff-fd4b6c323e531f0e41d566955e6fbffa 1/5 | 20180105.01 | Win7 | 4x GetAsync_AllowedSSLVersion_Succeeds &
4x GetAsync_SupportedSSLVersion_Succeeds
(both Win7-x86 and Win7-amd64) - link 1/5 | 20180105.02 | Win7 | 4x GetAsync_AllowedSSLVersion_Succeeds &
4x GetAsync_SupportedSSLVersion_Succeeds
(both Win7-x86 and Win7-amd64) - link 1/5 | 20180105.02 | RedHat73 | GetAsync_AllowedSSLVersion_Succeeds - link

该提问来源于开源项目:dotnet/runtime

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39587246 weixin_39587246 4月前

    Note: GetAsync_UnsupportedSSLVersion_Throws test was also disabled around the same time in July (see https://github.com/geoffkizer/corefx/commit/99aa82499ef8fe11e6049a6ba2a636eb8780a520#diff-fd4b6c323e531f0e41d566955e6fbffa and https://github.com/geoffkizer/corefx/commit/0b3134f7b9a2b2be73dcbfa0deca7a8da24d6621#diff-fd4b6c323e531f0e41d566955e6fbffa): That test had failures: * 7/6-7/8 on Win7 & Win8.1 -- 4x in each build (28 failures total) * 7/8-7/9 on Linux distros -- 6x in each build (18 failures total)

    点赞 评论 复制链接分享
  • weixin_39587246 weixin_39587246 4月前

    can you please disable the test again and mark this issue as disabled-test?

    点赞 评论 复制链接分享
  • weixin_39734048 weixin_39734048 4月前

    shall we disable it only for windows 7? It seems like other platforms are OK. Rest of the failures seems pretty old.

    点赞 评论 复制链接分享
  • weixin_39587246 weixin_39587246 4月前

    It failed also on RedHat73, let's disable it entirely. It needs more stabilization on Linux before we can re-enable it. do you think we should track understanding the failure for Beta?

    点赞 评论 复制链接分享
  • weixin_39918248 weixin_39918248 4月前

    On 700 runs on a Ubuntu 16.04.3 VM the local test that started to be "skipped" for the SocketsHttpHandler on PR dotnet/corefx#26197, had a single failure for CurlHandler but it is a known issue Decrypt failed with OpenSSL error - SSL_ERROR_SSL that also affects the SocketsHttpHandler (perhaps even more).

    The test GetAsync_SupportedSSLVersion_Succeeds, that goes against ssllabs.com, had a larger number of failures, but it affected CurlHandler even more (29 vs 19 failures) - which seemed a much higher rate of failure for this test in my VM than in CI.

    The Win7 failures are understood: SocketsHttpHandler uses the system default (TLS 1.0 in Win7) when the handler.SslProtocols is not explicitly set, WinHttpHandler has a different behavior in this regard. A change like this one shows how the tests can pass on Win7 for the managed handler. However, per conversation with the test GetAsync_AllowedSSLVersion_Succeeds should also be slightly changed since what makes sense is to always explicitly set the handler.SslProtocols, otherwise, we would need to keep track of the system default for the OS in which the test is running.

    We should postpone re-enabling both tests for SocketsHttpHandler until dotnet/runtime#24335 is fixed (we just recently disabled another test because of it).

    点赞 评论 复制链接分享
  • weixin_39681644 weixin_39681644 4月前

    , your PR dotnet/corefx#35605 closed this issue, but there's still a test disabled against it: https://github.com/dotnet/runtime/blob/26298bc6295be9cddfa185f9d1dc8e99a5c92278/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs#L157-L161

    点赞 评论 复制链接分享
  • weixin_39587246 weixin_39587246 4月前

    Original bug was fixed in 3.0 - marking as such.

    点赞 评论 复制链接分享
  • weixin_39587246 weixin_39587246 4月前

    I wonder why we didn't catch it in CI. Any idea?

    点赞 评论 复制链接分享