Skip to content

Android socket tests failing with IPv6 connectivity issues #127422

Closed

Description

@github-actions

Note

This content was generated by GitHub Copilot.

Description

Multiple socket tests are failing on Android Helix machines in the runtime-extra-platforms pipeline. The failures appear to be infrastructure/environment-related rather than code regressions.

Failing Tests

  1. System.Net.Sockets.Tests.DualModeConnectToDnsEndPoint.DualModeConnect_DnsEndPointToHost_Helper(listenOn: ::1, dualModeServer: False)

    • Error: SocketException: Connection refused [::ffff:10.64.33.238]:34855
  2. System.Net.Sockets.Tests.DualModeConnectAsync.DualModeConnectAsync_DnsEndPointToHost_Helper(listenOn: ::1, dualModeServer: False)

    • Error: SocketException: Connection refused
  3. System.Net.Sockets.Tests.SocketBlockingModeTransitionTests.ConnectAsync_WithBuffer_Succeeds

    • Error: Assert.False() Failure (expected blocking mode behavior not met)
  4. System.Net.Sockets.Tests.SocketAsyncEventArgsTest.Connect_Parallel_FailsOver(preferIPv6: True)

    • Error: Assert.NotNull() Failure: Value is null

Analysis

These failures appear to be infrastructure issues:

  • IPv6 connectivity problems: Tests listening on ::1 (IPv6 loopback) fail with "Connection refused", suggesting IPv6 is not properly configured on the Android emulators
  • Dual-stack socket behavior: Tests expecting dual-mode sockets to work correctly are failing, consistent with IPv6 configuration issues
  • Intermittent blocking mode transitions: Suggests timing or thread synchronization issues in the test environment

Failure Details

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313

Job: android-arm64 Release AllSubsets_Mono

Helix Work Item:

Log excerpt:

04-25 00:09:05.266  DOTNET  : [FAIL] System.Net.Sockets.Tests.DualModeConnectToDnsEndPoint.DualModeConnect_DnsEndPointToHost_Helper(listenOn: ::1, dualModeServer: False)
04-25 00:09:05.266  DOTNET  : System.Net.Sockets.SocketException : Connection refused [::ffff:10.64.33.238]:34855

Recommendations

  1. Skip IPv6-specific tests on Android if IPv6 is not reliably available on Helix machines
  2. Investigate Android emulator IPv6 configuration in Helix provisioning
  3. Consider adding ActiveIssue attributes to the affected tests to track the infrastructure limitation

Related

  • Similar iOS socket issues may exist (needs verification)

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

  • #126805 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Mobile Platform Failure Scanner · ● 4.1M · ◷

Activity

  1. dotnet-policy-service commented on Apr 25, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  2. dotnet-policy-service commented on Apr 25, 2026

    @dotnet-policy-service
    Contributor

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

  3. dotnet-policy-service commented on Apr 25, 2026

    @dotnet-policy-service
    Contributor

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

  4. dotnet-policy-service commented on Apr 25, 2026

    @dotnet-policy-service
    Contributor

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

  5. dotnet-policy-service commented on Apr 25, 2026

    @dotnet-policy-service
    Contributor

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

  6. github-actions commented on Apr 26, 2026

    @github-actions
    ContributorAuthor

    Note

    This content was generated by GitHub Copilot.

    Latest Occurrence

    The socket failures continue to reproduce in build #1396313 (2026-04-25).

    Android Helix Job

    Additional affected platforms: iossimulator-arm64, iossimulator-x64, tvos-arm64, maccatalyst-arm64, maccatalyst-x64 (all Mono and CoreCLR).

    Additional Failure: NameResolution Tests

    The System.Net.NameResolution.Functional.Tests workitem also failed with multiple tests failing on localhost resolution:

    Sample failure:

    System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
    Assert.All() Failure: 5 out of 6 items in the collection did not pass.
    Error: Not a loopback address: 10.64.32.211
    

    Tests affected:

    • DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs
    • DnsGetHostEntry_LocalhostSubdomain_ReturnsLoopback (multiple variants)
    • DnsGetHostAddresses_LocalhostSubdomain_ReturnsLoopback (multiple variants)

    Root cause: Android DNS resolution for localhost returns the machine's network IP (10.64.32.211) instead of loopback addresses (127.0.0.1 / ::1), causing assertions to fail.

    Recommendation: Skip these tests on Android with [SkipOnPlatform(TestPlatforms.Android, "Android DNS does not resolve localhost to loopback addresses")].


    Generated by Mobile Platform Failure Scanner

    Generated by Mobile Platform Failure Scanner · ● 1.6M · ◷

  7. removed
    untriaged
    on Apr 29, 2026
  8. locked and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions