-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 #112605
Comments
On another (much more complex project, but same setup with pretty much same Dockerfile) I was somehow able to catch following error: This might be red herring, but 132 seem to match SIGILL. |
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. |
I am not crazy after all. I am having massive issues on my M4 Pro with dotnet and docker. To the point where I have literally setup a I can pretty much reliable reproduce the issue, so if anyone has some insight what I need to enable to provide debug logs, core dumps whatever, let me know. I'm happy to help, I just have no idea what I need to do. |
I also can reproduce it most of the time. Is really rare that it works. Is exactly as described. The issue started a couple of weeks ago. In Mac M1 it works without problems. Mac M4 is the problem. |
having the same issue with m4, just getting Illegal instruction |
@rainersigwald do we have any known problems with MSBuild on m4 Macs, or should be bring the runtime folks in to consult on this one? |
Nothing that I know of, and I don't think MSBuild (or SDK) could easily cause this, I think JIT folks need to look. |
Something changed with |
Unfortunately, for me it failed on first try :( |
@jkotas do you have any guidance (or know who might!) for users who are experiencing problems on macOS m4 hardware? Are there dumps or something we can try to have them collect for investigation? |
Tagging subscribers to this area: @mangod9 |
Yes, crash dump would help. @mangod9 Anybody with M4 mac who can investigate on our side? |
Ok will check if we have any M4s. Could be an issue similar to #97186 which we havent been able to reproduce consistently. |
I have now gone back and used older @ksitarek I have cloned your repo. Keep in mind that 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. However even with that, It built successfully.10:03~/git/personal/sigill_dotnet_docker(alexaka1%) master 0$ 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 7.68kB
Step 1/18 : FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
9.0: Pulling from dotnet/runtime
Digest: sha256:da09ba013a4ceb463e17b77c821acdd81d17f26384227340a31690d3bf0044bc
Status: Downloaded newer image for mcr.microsoft.com/dotnet/runtime:9.0
---> da09ba013a4c
Step 2/18 : USER $APP_UID
---> Running in 7bf542adae4b
---> Removed intermediate container 7bf542adae4b
---> 1968b4f65ead
Step 3/18 : WORKDIR /app
---> Running in 94de479d0743
---> Removed intermediate container 94de479d0743
---> 15a74b37d1a2
Step 4/18 : FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
9.0: Pulling from dotnet/sdk
Digest: sha256:7f8e8b1514a2eeccb025f1e9dd554e191b21afa7f43f8321b7bd2009cdd59a1d
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:9.0
---> 7f8e8b1514a2
Step 5/18 : ARG BUILD_CONFIGURATION=Release
---> Running in 4edfffdc3ab5
---> Removed intermediate container 4edfffdc3ab5
---> 23cf38d39df6
Step 6/18 : WORKDIR /src
---> Running in cb8e75edf59d
---> Removed intermediate container cb8e75edf59d
---> dfa832797f95
Step 7/18 : COPY ["ConsoleApp1/ConsoleApp1.csproj", "ConsoleApp1/"]
---> fe5e83d77b10
Step 8/18 : RUN dotnet restore "ConsoleApp1/ConsoleApp1.csproj"
---> Running in 9f88da574f4d
Determining projects to restore...
Restored /src/ConsoleApp1/ConsoleApp1.csproj (in 30 ms).
---> Removed intermediate container 9f88da574f4d
---> baae3238a9cf
Step 9/18 : COPY . .
---> 7dc666e6a2ee
Step 10/18 : WORKDIR "/src/ConsoleApp1"
---> Running in 4240fc49465c
---> Removed intermediate container 4240fc49465c
---> f8f72dc3c6c7
Step 11/18 : RUN dotnet build "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/build
---> Running in f68f6f61daaf
Determining projects to restore...
All projects are up-to-date for restore.
ConsoleApp1 -> /app/build/ConsoleApp1.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.29
---> Removed intermediate container f68f6f61daaf
---> ef63b3d6c77b
Step 12/18 : FROM build AS publish
---> ef63b3d6c77b
Step 13/18 : ARG BUILD_CONFIGURATION=Release
---> Running in 95a56d8b3568
---> Removed intermediate container 95a56d8b3568
---> 6244878e585a
Step 14/18 : RUN dotnet publish "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
---> Running in af610f47c410
Determining projects to restore...
All projects are up-to-date for restore.
ConsoleApp1 -> /src/ConsoleApp1/bin/Release/net9.0/ConsoleApp1.dll
ConsoleApp1 -> /app/publish/
---> Removed intermediate container af610f47c410
---> f247518c8acd
Step 15/18 : FROM base AS final
---> 15a74b37d1a2
Step 16/18 : WORKDIR /app
---> Running in 9cc039a91434
---> Removed intermediate container 9cc039a91434
---> 079f13cbb0c2
Step 17/18 : COPY --from=publish /app/publish .
---> 75ddb932d1c0
Step 18/18 : ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
---> Running in 09f7cbf5f7b2
---> Removed intermediate container 09f7cbf5f7b2
---> e6b145539e39
Successfully built e6b145539e39
10:04~/git/personal/sigill_dotnet_docker(alexaka1%) master 0$ Using `sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617` also worked fineDEPRECATED: 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 7.68kB
Step 1/18 : FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
---> da09ba013a4c
Step 2/18 : USER $APP_UID
---> Running in 83df2537dad3
---> Removed intermediate container 83df2537dad3
---> f42287fa50a5
Step 3/18 : WORKDIR /app
---> Running in 33a97e99a251
---> Removed intermediate container 33a97e99a251
---> 8e3d3b53b7db
Step 4/18 : FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617 AS build
9.0: Pulling from dotnet/sdk
Digest: sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:9.0@sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617
---> 84fd557bebc6
Step 5/18 : ARG BUILD_CONFIGURATION=Release
---> Running in 6d62f9cbe4d9
---> Removed intermediate container 6d62f9cbe4d9
---> 248848a55ff0
Step 6/18 : WORKDIR /src
---> Running in f88c4fad6f64
---> Removed intermediate container f88c4fad6f64
---> d4e01eb750fa
Step 7/18 : COPY ["ConsoleApp1/ConsoleApp1.csproj", "ConsoleApp1/"]
---> 3710a0ad76a6
Step 8/18 : RUN dotnet restore "ConsoleApp1/ConsoleApp1.csproj"
---> Running in 022a1f64a88a
Determining projects to restore...
Restored /src/ConsoleApp1/ConsoleApp1.csproj (in 30 ms).
---> Removed intermediate container 022a1f64a88a
---> 4be25bc71ce4
Step 9/18 : COPY . .
---> 39e85ed18438
Step 10/18 : WORKDIR "/src/ConsoleApp1"
---> Running in 84e1c120b9cd
---> Removed intermediate container 84e1c120b9cd
---> 7af757585763
Step 11/18 : RUN dotnet build "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/build
---> Running in 41855929860f
Determining projects to restore...
All projects are up-to-date for restore.
ConsoleApp1 -> /app/build/ConsoleApp1.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.29
---> Removed intermediate container 41855929860f
---> 13dfdcf23b92
Step 12/18 : FROM build AS publish
---> 13dfdcf23b92
Step 13/18 : ARG BUILD_CONFIGURATION=Release
---> Running in 55ee8ad017b9
---> Removed intermediate container 55ee8ad017b9
---> 5a9919b1861c
Step 14/18 : RUN dotnet publish "ConsoleApp1.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
---> Running in a3bbd989562f
Determining projects to restore...
All projects are up-to-date for restore.
ConsoleApp1 -> /src/ConsoleApp1/bin/Release/net9.0/ConsoleApp1.dll
ConsoleApp1 -> /app/publish/
---> Removed intermediate container a3bbd989562f
---> dd3e687e3caf
Step 15/18 : FROM base AS final
---> 8e3d3b53b7db
Step 16/18 : WORKDIR /app
---> Running in e6a6fe224667
---> Removed intermediate container e6a6fe224667
---> c639890234a5
Step 17/18 : COPY --from=publish /app/publish .
---> 9db3b469ac09
Step 18/18 : ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
---> Running in b56266b2d0a1
---> Removed intermediate container b56266b2d0a1
---> d81528788f1c
Successfully built d81528788f1c Even with Buildkit it works.docker build --no-cache --progress=plain .
#0 building with "desktop-linux" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 768B done
#1 DONE 0.0s
#2 [internal] load metadata for mcr.microsoft.com/dotnet/runtime:9.0
#2 DONE 0.2s
#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:9.0@sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617
#3 DONE 0.2s
#4 [internal] load .dockerignore
#4 transferring context: 356B done
#4 DONE 0.0s
#5 [build 1/7] FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617
#5 resolve mcr.microsoft.com/dotnet/sdk:9.0@sha256:84fd557bebc64015e731aca1085b92c7619e49bdbe247e57392a43d92276f617 0.0s done
#5 DONE 0.0s
#6 [build 2/7] WORKDIR /src
#6 CACHED
#7 [internal] load build context
#7 transferring context: 159B done
#7 DONE 0.0s
#8 [build 3/7] COPY [ConsoleApp1/ConsoleApp1.csproj, ConsoleApp1/]
#8 DONE 0.0s
#9 [base 1/2] FROM mcr.microsoft.com/dotnet/runtime:9.0@sha256:da09ba013a4ceb463e17b77c821acdd81d17f26384227340a31690d3bf0044bc
#9 resolve mcr.microsoft.com/dotnet/runtime:9.0@sha256:da09ba013a4ceb463e17b77c821acdd81d17f26384227340a31690d3bf0044bc
#9 ...
#10 [build 4/7] RUN dotnet restore "ConsoleApp1/ConsoleApp1.csproj"
#10 ...
#9 [base 1/2] FROM mcr.microsoft.com/dotnet/runtime:9.0@sha256:da09ba013a4ceb463e17b77c821acdd81d17f26384227340a31690d3bf0044bc
#9 resolve mcr.microsoft.com/dotnet/runtime:9.0@sha256:da09ba013a4ceb463e17b77c821acdd81d17f26384227340a31690d3bf0044bc 0.1s done
#9 DONE 0.1s
#11 [base 2/2] WORKDIR /app
#11 CACHED
#12 [final 1/2] WORKDIR /app
#12 CACHED
#10 [build 4/7] RUN dotnet restore "ConsoleApp1/ConsoleApp1.csproj"
#10 0.335 Determining projects to restore...
#10 0.483 Restored /src/ConsoleApp1/ConsoleApp1.csproj (in 23 ms).
#10 DONE 0.5s
#13 [build 5/7] COPY . .
#13 DONE 0.0s
#14 [build 6/7] WORKDIR /src/ConsoleApp1
#14 DONE 0.0s
#15 [build 7/7] RUN dotnet build "ConsoleApp1.csproj" -c Release -o /app/build
#15 0.356 Determining projects to restore...
#15 0.503 All projects are up-to-date for restore.
#15 1.337 ConsoleApp1 -> /app/build/ConsoleApp1.dll
#15 1.341
#15 1.341 Build succeeded.
#15 1.341 0 Warning(s)
#15 1.341 0 Error(s)
#15 1.342
#15 1.342 Time Elapsed 00:00:01.13
#15 DONE 1.4s
#16 [publish 1/1] RUN dotnet publish "ConsoleApp1.csproj" -c Release -o /app/publish /p:UseAppHost=false
#16 0.347 Determining projects to restore...
#16 0.490 All projects are up-to-date for restore.
#16 0.664 ConsoleApp1 -> /src/ConsoleApp1/bin/Release/net9.0/ConsoleApp1.dll
#16 0.678 ConsoleApp1 -> /app/publish/
#16 DONE 0.7s
#17 [final 2/2] COPY --from=publish /app/publish .
#17 DONE 0.0s
#18 exporting to image
#18 exporting layers 0.0s done
#18 exporting manifest sha256:2560fdad6ff44dd19a6855fbf28df8673d9cf0f0c3728b4a7ca008e34d6da36f done
#18 exporting config sha256:71393d8d4f612d0f57fe66020a848a4120ddb287b0a2947a44191f1005631ac2 done
#18 exporting attestation manifest sha256:3fcc589a4aae55e98e27f0031e9c6fd5c12327b252984a0cf919095792f2b4c1 done
#18 exporting manifest list sha256:b121de2c3e6dc8ca3f2a08723c7dfa739d8cc04d637d01301c2a0eb32fbb9099 done
#18 naming to moby-dangling@sha256:b121de2c3e6dc8ca3f2a08723c7dfa739d8cc04d637d01301c2a0eb32fbb9099 done
#18 unpacking to moby-dangling@sha256:b121de2c3e6dc8ca3f2a08723c7dfa739d8cc04d637d01301c2a0eb32fbb9099 done
#18 DONE 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/l9t3f0cbj5wp5ovyc6kflq98g
10:12~/git/personal/sigill_dotnet_docker(alexaka1%) master 0$ |
I tried several times on new Docker version and haven't observed any issue, thanks for letting me know - I abandoned docker for my project due to these issues. I guess its time to get back using it and observe more. |
Although I would like to note to the maintainers, the issue only occurred with the |
so just to confirm, just updating the docker version made the issue no longer repro? It could still be a timing issue so getting a dump would certainly be useful. |
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
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
The text was updated successfully, but these errors were encountered: