dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.63k stars 1.04k forks source link

Previous arm64 solutions build stop working #15389

Open valeria-tejada-incontact opened 3 years ago

valeria-tejada-incontact commented 3 years ago

Describe the Bug

On our current solutions, we use dotnet build for arm64 architecture using sdk:3.1.402-bionic-arm64v8 image, this used to work properly until December 20th, after that date we experienced a return code 1.

Steps to Reproduce

  1. Create a base solution using netcore 3.1
  2. Add docker support
  3. Insert the following docker code: `FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-bionic-arm64v8 AS base WORKDIR /app EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1.402-bionic-arm64v8 AS devBase WORKDIR /src

FROM devBase AS build COPY . . RUN dotnet build "src/Test.sln" -c Release -o /app

FROM build AS publish RUN dotnet publish "src/Test.csproj" -c Release -o /app

FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "Test.dll"]`

  1. Run docker command => docker build -f ./Dockerfile -t test .

Other Information

Usually execute this command take a few minutes but with the issue, it gets stuck around 30 min.

Output of docker version

Docker version 19.03.13, build 4484c46d9d

Output of docker info

`Step 1/14: FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-bionic-arm64v8 AS base 3.1.8-bionic-arm64v8: Pulling from dotnet/core/runtime c9ca07cb7eb0: Pull complete Digest: sha256:3cae85d41d0c2e73d04208d06989ca063f0479ac990c8a27c8485efda90f3955 Status: Downloaded newer image for mcr.microsoft.com/dotnet/core/runtime:3.1.8-bionic-arm64v8 ---> 2ca3cdd191f8 Step 2/14 : WORKDIR /app ---> Running in fe58a5b5c075 Removing intermediate container fe58a5b5c075 ---> 8a3b2d7cf50c Step 3/14 : EXPOSE 80 ---> Running in b0af7c98523c Removing intermediate container b0af7c98523c ---> 5def6c0843a9 Step 4/14 : FROM mcr.microsoft.com/dotnet/core/sdk:3.1.402-bionic-arm64v8 AS devBase 3.1.402-bionic-arm64v8: Pulling from dotnet/core/sdk 3aa6ae443a21: Pull complete Digest: sha256:46b85c71c3ca2820588681b729ebca2214de6f0d00cb8bf5f15b2faabde2e3f5 Status: Downloaded newer image for mcr.microsoft.com/dotnet/core/sdk:3.1.402-bionic-arm64v8 ---> 52d1ae94fea9 Step 5/14 : WORKDIR /src ---> Running in f3710b863c1e Removing intermediate container f3710b863c1e ---> ad904e47f38d Step 6/14 : FROM devBase AS build ---> ad904e47f38d Step 7/14 : COPY . . ---> b22d3c30380e Step 8/14 : RUN dotnet build "src/Test.sln" -c Release -o /app ---> Running in c45d0e620b12 Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore... Restored /src/Test/Test.csproj (in 9.52 sec).

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:37:32.32 The command '/bin/sh -c dotnet build "src/Test.sln" -c Release -o /app' returned a non-zero code: 1`

dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dsplaisted commented 3 years ago

Marking for team triage. Not sure who should look into this, it sounds like a build hang on ARM64.

marcpopMSFT commented 3 years ago

@tommcdon is there someone available with an arm64 machine who can do an initial look for us?

tommcdon commented 3 years ago

@hoyosjs can point you to a machine, and might be able to help repo

hoyosjs commented 3 years ago

@marcpopMSFT I've sent you the credentials. However I couldn't repro the issue:

Test repro output ``` ubuntu@diag-pi2:~/test-sdk15389$ sudo docker build -f ./Dockerfile -t test . Sending build context to Docker daemon 7.168kB Step 1/14 : FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-bionic-arm64v8 AS base ---> 2ca3cdd191f8 Step 2/14 : WORKDIR /app ---> Using cache ---> 55663f04dd69 Step 3/14 : EXPOSE 80 ---> Using cache ---> 273ac4b908b9 Step 4/14 : FROM mcr.microsoft.com/dotnet/core/sdk:3.1.402-bionic-arm64v8 AS devBase ---> 52d1ae94fea9 Step 5/14 : WORKDIR /src ---> Using cache ---> d212431f6b55 Step 6/14 : FROM devBase AS build ---> d212431f6b55 Step 7/14 : COPY . . ---> 56a53b3cff5c Step 8/14 : RUN dotnet build "src/Test.sln" -c Release -o /app ---> Running in 68f995780012 Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... Restored /src/src/Test.csproj (in 1.23 sec). Test -> /app/Test.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:15.64 Removing intermediate container 68f995780012 ---> 18d1726334f0 Step 9/14 : FROM build AS publish ---> 18d1726334f0 Step 10/14 : RUN dotnet publish "src/Test.csproj" -c Release -o /app ---> Running in 416b922fe4ef Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... All projects are up-to-date for restore. Test -> /src/src/bin/Release/netcoreapp3.1/Test.dll Test -> /app/ Removing intermediate container 416b922fe4ef ---> d8b59005a3a0 Step 11/14 : FROM base AS final ---> 273ac4b908b9 Step 12/14 : WORKDIR /app ---> Running in 682d97e6a4e2 Removing intermediate container 682d97e6a4e2 ---> c72d7a4cd60c Step 13/14 : COPY --from=publish /app . ---> 978d345834c2 Step 14/14 : ENTRYPOINT ["dotnet", "Test.dll"] ---> Running in e6d9b36e0fd7 Removing intermediate container e6d9b36e0fd7 ---> 984d2fa1b4a5 Successfully built 984d2fa1b4a5 Successfully tagged test:latest ```

@valeria-tejada-incontact, quick questions that might help us find a way to narrow this: