Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Linker][Tests] HttpClientTests fails with System.Net.Http.HttpRequestException: The SSL connection could not be established #104682

Closed
mdh1418 opened this issue Jul 10, 2024 · 3 comments · Fixed by #104606

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jul 10, 2024

The dotnet-linker-tests pipeline osx-x64 runtime release lane has been failing frequently since job #20240709.4 with a failure stemming from HttpClient.GetAsync(string)

  Unhandled exception. System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
   ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
     at System.Net.Security.SslStream.ProcessTlsFrame(Int32)
     at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean, Byte[], CancellationToken)
     at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions, HttpRequestMessage, Boolean, Stream, CancellationToken)
     --- End of inner exception stack trace ---
     at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions, HttpRequestMessage, Boolean, Stream, CancellationToken)
     at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage, Boolean, CancellationToken)
     at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage, Boolean, CancellationToken)
     at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem)
     at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken)
     at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
     at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
     at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage, HttpCompletionOption, CancellationTokenSource, Boolean, CancellationTokenSource, CancellationToken)
     at Program.Main(String[]) in /_/artifacts/bin/trimmingTests/projects/System.Net.Http.TrimmingTests/HttpClientTest/osx-x64/HttpClientTest.cs:line 20
     at Program.<Main>(String[])
  /var/folders/0f/b0mzpg5d31z074x3z5lzkdxc0000gn/T/MSBuildTemprunner/tmp4c45bac47fd9439fb89baa06a58ce333.exec.cmd: line 2: 52950 Abort trap: 6           /Users/runner/work/1/s/artifacts/bin/trimmingTests/projects/System.Net.Http.TrimmingTests/HttpClientTest/osx-x64/bin/Release/net9.0/osx-x64/publish/project
/Users/runner/work/1/s/eng/testing/linker/trimmingTests.targets(168,5): error : Error: [Failed Test]: /Users/runner/work/1/s/src/libraries/System.Net.Http/tests/TrimmingTests/HttpClientTest.cs. The Command /Users/runner/work/1/s/artifacts/bin/trimmingTests/projects/System.Net.Http.TrimmingTests/HttpClientTest/osx-x64/bin/Release/net9.0/osx-x64/publish/project return a non-success exit code 134. [/Users/runner/work/1/s/src/libraries/System.Net.Http/tests/TrimmingTests/System.Net.Http.TrimmingTests.proj]
##[error]eng/testing/linker/trimmingTests.targets(168,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /Users/runner/work/1/s/src/libraries/System.Net.Http/tests/TrimmingTests/HttpClientTest.cs. The Command /Users/runner/work/1/s/artifacts/bin/trimmingTests/projects/System.Net.Http.TrimmingTests/HttpClientTest/osx-x64/bin/Release/net9.0/osx-x64/publish/project return a non-success exit code 134.

At a glance, it seems to be an authentication issue, similar to #104605 where both hit
SslStream.ForceAuthenticationAsync -> SslStream.ProcessTlsFrame

Given that #103419 changed ProcessTlsFrame, it seems more likely those changes are the culprit, as suspected in #104605

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 10, 2024
Copy link
Contributor

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

@mdh1418 mdh1418 added test-failure and removed area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Jul 10, 2024
@wfurt wfurt added this to the 9.0.0 milestone Jul 10, 2024
Copy link
Contributor

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

@rzikm
Copy link
Member

rzikm commented Jul 10, 2024

Should be fixed by #104606

@github-actions github-actions bot locked and limited conversation to collaborators Aug 10, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants