Skip to content

Failed USB connection via port 54050, error 61, in tvOS arm64 Release AllSubsets_Mono #82637

Closed

Description

@carlossanlop
[13:58:26] dbug: [TCP tunnel] Xamarin.Hosting: Failed to connect to port 54050 (8915) on device (error: 61)
[13:58:26] dbug: [TCP tunnel] Xamarin.Hosting: Attempting USB tunnel between the port 54050 on the device and the port 54050 (8915) on the mac: 61

It's a bit confusing, since there's a net.dot.System.Runtime.Tests.log output file that shows some succeeded System.Runtime test executions.

Anyway, the USB failure seems to be unique, so I'm adding the "known issue" json text to track it.
Edit. Removed the match string because the error message was matching un-related failures.

{
  "ErrorMessage": "",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Report

Summary

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

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=323893
Error message validated: Xamarin.Hosting: Failed to connect to port
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/28/2023 9:28:49 PM UTC

Activity

  1. added this to the 7.0.x milestone on Feb 24, 2023
  2. lewing commented on Feb 24, 2023

    @lewing
    Member
  3. steveisok commented on Feb 24, 2023

    @steveisok
    Member

    Might be better to keep this open since it's tagged with a known build error label. I don't think we need to have blocking clean ci attached to it.

  4. removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Feb 24, 2023
  5. carlossanlop commented on May 30, 2023

    @carlossanlop
    ContributorAuthor

    I originally logged this issue for tvOS, but I'm also seeing it in iOS arm64. Here is a fresh example:

    [22:47:19] dbug: [TCP tunnel] Xamarin.Hosting: Attempting USB tunnel between the port 52498 on the device and the port 52498 (4813) on the mac: 61
    [22:47:19] dbug: [TCP tunnel] Xamarin.Hosting: Failed to connect to port 52498 (4813) on device (error: 61)
    
  6. kotlarmilos commented on Jun 30, 2023

    @kotlarmilos
    Member

    https://helix.dot.net/api/jobs/4cbf9a6d-6389-43f9-9e2c-16540105525e/workitems?api-version=2019-06-17

    Both tests pass based on the logs, but one of them is unable to establish a connection via TCP, while the other establishes a connection every time. This failure seems to be permanent and could be a good starting point for identifying the issue.

    When I attempted to reproduce the error locally, I encountered the same issue. However, I have not opened any ports, which might be a possible cause. I assume that the CI machines have ports 49152-65535 (source https://support.apple.com/en-us/HT202944).

    I wonder if certain ports are busy or if there might be a firewall misconfiguration.

    @premun Any ideas why the error persists when running the functional test?

    /cc @akoeplinger @steveisok

  7. premun commented on Jun 30, 2023

    @premun
    Member

    @kotlarmilos if this was firewall misconfiguration, I think we should see the same set of machines failing. I don't think this is the case: https://dataexplorer.azure.com/clusters/engsrvprod/databases/engineeringdata?query=H4sIAAAAAAAAAx3MuwoCMRAF0N6vGLbabQI+ECy2EgsLBSvrMbmQoJmESaKr+PEu9odzTXo/VsSy+NLLQ0GHKdR9cqBxpN2KWBxdGhrOHEFBqO9SmcxybTi67cZwzg/Up0kZ0g3zUlqMrOEDsqlJ7Qe6venE1gf5HzNRiINSDrCetf4ANsm6/4QAAAA=

    Seems like this is not tied to specific machines?

    @premun Any ideas why the error persists when running the functional test?

    Do I understand it correctly that you have 100% repro with a specific app?

  8. kotlarmilos commented on Jun 30, 2023

    @kotlarmilos
    Member

    Host: osx-arm64
    Device: iPhone iOS 16.5.1
    Xcode: 14.3.1 (14E300c)

    1. Install xharness locally (I don't believe it has anything with the repro, that is just my local setup):
    # Using bash on Linux/MacOS
    curl -L https://aka.ms/get-xharness | bash -
    1. Download the bundle and place it in a test directory.
      tracing_eventpipe_tcp_issue.zip

    2. Run the following script from the local directory:

    ./xharness apple test --app "<LOCAL_DIRECTORY>/tracing_eventpipe_tcp_issue.app" --target "ios-device" --output-directory "<LOCAL_DIRECTORY>/output" --set-env=MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-buffersize/buffersize.dll --set-env=MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-buffersize --xcode /Applications/Xcode.app -v --launch-timeout 00:05:00

    The test should start executing and may fail (due to other reasons), but the TCP connection is not established. The app fails locally with

    fail: Application test run crashed
          TCP Tunnel Connection Failed to connect to TCP port
    
  9. 5 remaining items

  10. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Nov 15, 2023
  11. added this to the 7.0.x milestone on Nov 24, 2023
  12. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Nov 24, 2023
  13. modified the milestones: 7.0.x, 9.0.0 on May 14, 2024
  14. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Jun 24, 2024
  15. ivanpovazan commented on Jun 25, 2024

    @ivanpovazan
    Member

    @kotlarmilos and myself are looking into this.

  16. matouskozak commented on Aug 5, 2024

    @matouskozak
    Member

    Removing the Xamarin.Hosting: Failed to connect to port match string because it's too general and it's matching un-related failures. I'll keep the issue fyi: @ivanpovazan @kotlarmilos

  17. modified the milestones: 9.0.0, 10.0.0 on Aug 22, 2024
  18. removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Sep 11, 2024
  19. jeffschwMSFT commented on Sep 11, 2024

    @jeffschwMSFT
    Member

    removing 'blocking-clean-ci' as it has not failed in 30 days

    24-Hour Hit Count 7-Day Hit Count 1-Month Count
    0 0 0
  20. kotlarmilos commented on Jun 18, 2025

    @kotlarmilos
    Member

    Switched to file copy in dotnet/xharness#1416.

  21. locked and limited conversation to collaborators on Jul 19, 2025
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions