Skip to content

[Broken Build]: Linux build with ipv6 connectivity #95228

@ya-mouse

Description

@ya-mouse

Issue Description

On a system having ipv6 connectivity, the build is failing with a lot of Connection reset by peer messages:

$ ./build.sh
...
  Restored /home/mouse/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.23463.1/tools/Tools.proj (in 1.16 min).
  Determining projects to restore...
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/system.threading.timer/index.json'.
  An error occurred while sending the request.
    Unable to read data from the transport connection: Connection reset by peer.
    Connection reset by peer
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/system.security.cryptography.primitives/index.json'.
...

However, I can download individual packages via ipv6:

wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.json/7.0.3/system.text.json.7.0.3.nupkg
--2023-11-25 16:22:51--  https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.json/7.0.3/system.text.json.7.0.3.nupkg
Resolving pkgs.dev.azure.com (pkgs.dev.azure.com)... 2620:1ec:21::20, 13.107.42.20
Connecting to pkgs.dev.azure.com (pkgs.dev.azure.com)|2620:1ec:21::20|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://p2ovsblobprodcus312.vsblob.vsassets.io/b-b55de4ed4b5a4215a8e40a0a5f71e7d8/078804D398BAF5B006EBD157302B95899EB13E0C504861FCF943C85E887A291A00.blob?sv=2019-07-07&sr=b&si=1&sig=t0zFKQDxcCJ55KHfvhMWPlzx2d4lnqvC8uMPPTa4uWg%3D&spr=https&se=2023-11-26T10%3A03%3A39Z&rscl=x-e2eid-b06be6ab-dc3f4ff6-ae7ba0ed-ded7bbbf-session-b06be6ab-dc3f4ff6-ae7ba0ed-ded7bbbf&rscd=attachment%3B%20filename%3D%22system.text.json.7.0.3.nupkg%22&P1=1700936571&P2=2&P3=2&P4=zspUl9cI%2bQ3dWjHCSi6uoYgi26mnshprCDdcfjiD3GE%3d [following]
--2023-11-25 16:22:51--  https://p2ovsblobprodcus312.vsblob.vsassets.io/b-b55de4ed4b5a4215a8e40a0a5f71e7d8/078804D398BAF5B006EBD157302B95899EB13E0C504861FCF943C85E887A291A00.blob?sv=2019-07-07&sr=b&si=1&sig=t0zFKQDxcCJ55KHfvhMWPlzx2d4lnqvC8uMPPTa4uWg%3D&spr=https&se=2023-11-26T10%3A03%3A39Z&rscl=x-e2eid-b06be6ab-dc3f4ff6-ae7ba0ed-ded7bbbf-session-b06be6ab-dc3f4ff6-ae7ba0ed-ded7bbbf&rscd=attachment%3B%20filename%3D%22system.text.json.7.0.3.nupkg%22&P1=1700936571&P2=2&P3=2&P4=zspUl9cI%2bQ3dWjHCSi6uoYgi26mnshprCDdcfjiD3GE%3d
Resolving p2ovsblobprodcus312.vsblob.vsassets.io (p2ovsblobprodcus312.vsblob.vsassets.io)... 2620:1ec:a92::175, 13.107.6.175
Connecting to p2ovsblobprodcus312.vsblob.vsassets.io (p2ovsblobprodcus312.vsblob.vsassets.io)|2620:1ec:a92::175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1734391 (1.7M) [application/octet-stream]
Saving to: ‘system.text.json.7.0.3.nupkg’

system.text.json.7.0.3.nupkg          100%[=========================================================================>]   1.65M   591KB/s    in 2.9s    

2023-11-25 16:22:54 (591 KB/s) - ‘system.text.json.7.0.3.nupkg’ saved [1734391/1734391]

If I change in /etc/gai.conf the preference to ipv4, then build.sh works without issues.

#
#    For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96  100
$ ./build.sh
...
  Restored /home/mouse/RPM/msbuild/src/Package/MSBuild.VSSetup.Arm64/MSBuild.VSSetup.Arm64.csproj (in 4.02 sec).
  Restored /home/mouse/RPM/msbuild/src/Deprecated/Engine/Microsoft.Build.Engine.csproj (in 5.8 sec).
  Restored /home/mouse/RPM/msbuild/src/Package/Localization/Localization.csproj (in 4.92 sec).
...
Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:01:34.26

Steps to Reproduce

  1. Have a system with IPv6 internet connectivity
  2. Try to run ./build.sh

Expected Behavior

Successful build

Actual Behavior

Build failed on downloading dependencies

Ask us questions

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions