Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ksitarek opened this issue Jan 10, 2025 · 2 comments
Open

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

ksitarek opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@ksitarek
Copy link

ksitarek commented Jan 10, 2025

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
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jan 10, 2025
@ksitarek
Copy link
Author

ksitarek commented Jan 10, 2025

On another (much more complex project, but same setup with pretty much same Dockerfile) I was somehow able to catch following error:
/usr/share/dotnet/sdk/9.0.101/Roslyn/Microsoft.CSharp.Core.targets(89,5): error MSB6006: "csc.dll" exited with code 132.

This might be red herring, but 132 seem to match SIGILL.

@gingters
Copy link

One colleague of mine has this issue with his M4 too (building a project in docker). On my Apple M3 Max this does not happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants