Skip to content

SocketException 'Connection reset by peer' causing test failures on android_arm64 and android_x64 #122493

@matouskozak

Description

@matouskozak

Note: This issue was automatically generated by AI-Test-Triage. Please review and triage accordingly.

Build Information

Build: 20251211.4, 20251214.1, 20251216.1, 20251216.2

Build error leg or test failing: System.Net.Sockets.Tests.WorkItemExecution

Affected CI jobs: android_arm64_Release_NativeAOT, android_x64_Release_NativeAOT

Causing Commit Range Information

Commit range: Flaky/Intermittent (no stable transition found)

Summary

  • Test failures caused by System.Net.Sockets.SocketException 'Connection reset by peer' during socket connect
  • Failures occur in System.Net.Sockets.Tests suite on android_arm64_Release_NativeAOT and android_x64_Release_NativeAOT jobs
  • Single test failures with connection reset errors observed in multi-connect and argument validation tests
  • Test processes exit with code 1 indicating failure; one instance includes process killed by OS signal 9
  • No infrastructure timeouts or crashes reported; failures linked to socket connection resets on Android platforms

Failure Statistics

Note: These statistics are based on the configured time range and do not contain full test history.

  • Occurrence Count: 5
  • First Failure: 2025-12-11 21:00:00 UTC
  • Last Failure: 2025-12-16 21:00:00 UTC

Work Items

Work Item Console Log Build Job Name
System.Net.Sockets.Tests
View Extract
12-11 14:58:53.992 25858 25882 I DOTNET  : [FAIL] System.Net.Sockets.Tests.ConnectSyncForceNonBlocking.MultiConnect_LingerState_Preserved(dnsConnect: True)
12-11 14:58:53.992 25858 25882 I DOTNET : System.Net.Sockets.SocketException : Connection reset by peer [::ffff:127.0.0.1]:38615
12-11 14:58:53.992 25858 25882 I DOTNET : at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) + 0x238
12-11 14:58:53.992 25858 25882 I DOTNET : at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) + 0x150
12-11 14:58:53.992 25858 25882 I DOTNET : at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) + 0x114
...
12-11 14:59:01.904 1040 1040 I Zygote : Process 25858 exited due to signal 9 (Killed)
12-11 14:59:01.810 25858 25882 I DOTNET : Tests run: 2279, Errors: 0, Failures: 1, Skipped: 28. Time: 13.1907361s
12-11 14:59:01.811 25858 25877 I DOTNET : MonoRunner finished, return-code=1
Full Log
20251211.4 android_arm64_Release_NativeAOT
System.Net.Sockets.Tests
View Extract

12-11 23:16:37.136 3931 3954 I DOTNET : [FAIL] System.Net.Sockets.Tests.ArgumentValidation.SelectPoll_InfiniteTimeSpan_Ok
12-11 23:16:37.136 3931 3954 I DOTNET : System.Net.Sockets.SocketException : Connection reset by peer 127.0.0.1:38893
12-11 23:16:37.136 3931 3954 I DOTNET : at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) + 0x1f6
12-11 23:16:37.136 3931 3954 I DOTNET : at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) + 0x149
12-11 23:16:37.136 3931 3954 I DOTNET : at System.Net.Sockets.Tests.ArgumentValidation.SelectPoll_InfiniteTimeSpan_Ok() + 0x10b
12-11 23:16:37.136 3931 3954 I DOTNET : at libSystem.Net.Sockets.Tests!<BaseAddress>+0x16209a3

12-11 23:17:26.235 3931 3954 I DOTNET : Tests run: 2279, Errors: 0, Failures: 1, Skipped: 28. Time: 54.1153283s
12-11 23:17:26.236 3931 3949 I DOTNET : MonoRunner finished, return-code=1

[23:17:29] fail: Non-success instrumentation exit code: 1, expected: 0
Full Log
20251211.4 android_x64_Release_NativeAOT
System.Net.Sockets.Tests
View Extract
12-14 02:55:59.926 25223 25254 I DOTNET  : [FAIL] System.Net.Sockets.Tests.ConnectTask.MultiConnect_MiscProperties_Preserved(dnsConnect: False)
12-14 02:55:59.926 25223 25254 I DOTNET : System.Net.Sockets.SocketException : Connection reset by peer
12-14 02:55:59.926 25223 25254 I DOTNET : at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) + 0x40
12-14 02:55:59.926 25223 25254 I DOTNET : at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) + 0x5c
12-14 02:55:59.926 25223 25254 I DOTNET : at System.Net.Sockets.Socket.<<ConnectAsync>g__Core|293_0>d.MoveNext() + 0x208
12-14 02:55:59.926 25223 25254 I DOTNET : --- End of stack trace from previous location ---
Full Log
20251214.1 android_arm64_Release_NativeAOT
System.Net.Sockets.Tests
View Extract
                 12-16 14:53:04.999  8860  8884 I DOTNET  : [FAIL] System.Net.Sockets.Tests.ConnectCancellableTask.Connect_ExposeHandle_FirstAttemptSucceeds(connectMode: "dns")
12-16 14:53:04.999 8860 8884 I DOTNET : System.Net.Sockets.SocketException : Connection reset by peer
12-16 14:53:04.999 8860 8884 I DOTNET : at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) + 0x40
12-16 14:53:04.999 8860 8884 I DOTNET : at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) + 0x5c
12-16 14:53:04.999 8860 8884 I DOTNET : at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) + 0x7c
12-16 14:53:04.999 8860 8884 I DOTNET : --- End of stack trace from previous location ---
Full Log
20251216.2 android_arm64_Release_NativeAOT
System.Net.Sockets.Tests
View Extract
                 12-16 02:57:23.136  6942  6969 I DOTNET  : [FAIL] System.Net.Sockets.Tests.ConnectSyncForceNonBlocking.MultiConnect_MiscProperties_Preserved(dnsConnect: True)
12-16 02:57:23.136 6942 6969 I DOTNET : System.Net.Sockets.SocketException : Connection reset by peer [::ffff:127.0.0.1]:42173
12-16 02:57:23.208 6942 6969 I DOTNET : at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) + 0x238
12-16 02:57:23.208 6942 6969 I DOTNET : at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) + 0x150
12-16 02:57:23.208 6942 6969 I DOTNET : at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) + 0x114
12-16 02:57:23.208 6942 6969 I DOTNET : --- End of stack trace from previous location ---
Full Log
20251216.1 android_arm64_Release_NativeAOT

Error Message

{
  "ErrorMessage": "System.Net.Sockets.SocketException : Connection reset by peer",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Report

Build Definition Test Pull Request
1241816 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1241708 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1241252 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1239671 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1239576 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1239235 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1239061 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1238469 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1237889 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1237300 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1237195 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1237105 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1236152 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1234598 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1233488 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1232841 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1231039 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 5 17

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions