Skip to content

Intermittent SIGILL on build, restore and/or publishΒ #45885

Open
@ksitarek

Description

Hi All,

Describe the bug

Repro repo: https://github.com/ksitarek/sigill_dotnet_docker (plain console app with hello world)

Intermittent Illegal Instruction on various commands such as dotnet restore, dotnet build, dotnet publish when ran on official docker sdk image.

Seem to be working outside of docker (aka plain build via Rider).

To Reproduce

  1. Clone repo https://github.com/ksitarek/sigill_dotnet_docker
  2. Attempt DOCKER_BUILDKIT=0 docker build . --no-cache (might require couple of tries, as sometimes it "just works")

Exceptions (if any)

Illegal instruction

Further technical details

  • Happens regularly on Apple M4 Max
  • Does not happen on Apple M2
❯ DOCKER_BUILDKIT=0 docker build . --no-cache
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
            environment-variable.

Sending build context to Docker daemon  9.216kB
Step 1/18 : FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
 ---> 4fb8b01c8a0d
Step 2/18 : USER $APP_UID
 ---> Running in 4c226e3d8f88
 ---> Removed intermediate container 4c226e3d8f88
 ---> d2d42b51fb96
Step 3/18 : WORKDIR /app
 ---> Running in 911b3e8c95c1
 ---> Removed intermediate container 911b3e8c95c1
 ---> faf61b2ce781
Step 4/18 : FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
 ---> 3fcf6f1e809c
Step 5/18 : ARG BUILD_CONFIGURATION=Release
 ---> Running in 0b2927713c0c
 ---> Removed intermediate container 0b2927713c0c
 ---> 1b95917bc1bd
Step 6/18 : WORKDIR /src
 ---> Running in 2e3304a49655
 ---> Removed intermediate container 2e3304a49655
 ---> 89c273297771
Step 7/18 : COPY ["ConsoleApp1/ConsoleApp1.csproj", "ConsoleApp1/"]
 ---> de94c9a92034
Step 8/18 : RUN dotnet restore "ConsoleApp1/ConsoleApp1.csproj"
 ---> Running in ecafd1770e36
  Determining projects to restore...
  Restored /src/ConsoleApp1/ConsoleApp1.csproj (in 26 ms).
 ---> Removed intermediate container ecafd1770e36
 ---> b90d6820a3d0
Step 9/18 : COPY . .
 ---> fbef895cd601
Step 10/18 : WORKDIR "/src/ConsoleApp1"
 ---> Running in 080297ca64c3
 ---> Removed intermediate container 080297ca64c3
 ---> 90eccb1786f0
Step 11/18 : RUN dotnet build "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/build
 ---> Running in 2d569a8b64c4
  Determining projects to restore...
  All projects are up-to-date for restore.
Illegal instruction
The command '/bin/sh -c dotnet build "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/build' returned a non-zero code: 132

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions