Skip to content

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

Closed
@mdh1418

Description

@mdh1418

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions