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
Running any dotnet CLI command (e.g. dotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
musl docker containers (and qemu-arm
in general)
#5355
Comments
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. |
dotnet help
) hangs after installing .NET SDK 6/7/8/9 on arm32v7
docker containerdotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
docker containers
dotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
docker containersdotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
_musl_ docker containers (and qemu-arm
in general)
dotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
_musl_ docker containers (and qemu-arm
in general)dotnet help
) hangs on official .NET SDK 6/7/8/9 arm32v7
musl docker containers (and qemu-arm
in general)
[Triage] You are running .NET through QEMU emulation, which is not supported for any current version of .NET, so the behavior you're seeing is undefined - please see the official support documentation: |
@lbussell Is there any info somewhere about the issues that make QEMU a non-supported scenario? As I mentioned in the OP, it seems that only arm32v7 with musl doesn't work, while other combinations actually do work. |
@lauxjpn You can read more about it on the qemu repo: https://gitlab.com/qemu-project/qemu/-/issues/249. Also a search in the runtime repo for qemu will surely bring up lots of results. If you need to build arm32 or arm64 .NET containers using an amd64 machine, you can consult this blog post, this discussion post or the samples directory in this repo. Some of the content may be geared towards building amd64 containers using Apple Silicon, but the cross-compilation functionality goes both ways. If you need to run arm32/arm64 containers on your amd64 machine, we'd be interested in hearing more about your scenario. |
@lbussell Thanks. During my research, I already came across https://gitlab.com/qemu-project/qemu/-/issues/249, but it seems to describe a QEMU bug with the implementation of the
Cross-compiling for arm32v7 on x64/amd64 works fine. It's really just the runtime that is the issue.
I just want to run dotnet apps in an emulated arm32v7 environment, so that I don't have to use actual am32v7 hardware for testing all the time. |
I will defer to @jkotas for the actual details of why the runtime doesn't work on QEMU. |
Our experience has been that QEMU is too unstable to run .NET runtime. We tried to use QEMU to run .NET runtime tests at one point and found that QEMU is unsuitable. We (.NET team) do not have expertise and capacity to chase down all bugs in QEMU to make .NET runtime work well on it. BTW: We do support the Rosetta emulator on Apple and the x64 emulator that comes with Windows Arm64. These emulators are very stable, and they have official support channels, so we do not have a problem with declaring .NET runtime as supported on those. |
@jkotas Thanks for clarifying. I will take a look at what I can do about that. |
I am experiencing hangs (stuck forever, manually aborted by me after 8 hours) for all
dotnet
commands when targetingarm32v7
once the SDK is installed (not if only the runtime is installed though), for .NET 6, 7, 8 and 9:Tested with a docker host that is Windows 10 x64 (with WSL2 integration to Ubuntu) or an Ubuntu 22.04/23.10 VM (VirtualBox, with a Windows 10 x64 host). So these are environments that use qemu to emulate
arm32v7
.BTW, downloading and running the SDK in a custom build (buildroot) qemu busybox image targeting
arm32v7
(so without docker) works fine. I have not yet compared my custom buildroot options against those of https://github.com/docker-library/busybox.Here are results from
COREHOST_TRACE=1
:COREHOST_TRACE=1
output fordotnet help
in docker before it hangs: dotnet_trace_01.txtCOREHOST_TRACE=1
output fordotnet help
in custom working busybox qemu build (without docker): dotnet_trace_02.txtDifferences are the
HOST_RUNTIME_CONTRACT
and the following lines that are output in the working build in addition to the output of the non-working docker build (the docker build hangs before those lines):/cc @richlander
Originally posted by @lauxjpn in dotnet/runtime#100536 (comment)
I now also tried to run a HelloWord console app from a vanilla
arm32v7/alpine:3.18
, with a manually build dotnet runtime and the necessary package dependencies, and are getting the same issue. So this is not coupled to only the .NET SDK docker images, but is a general issue with thedotnet
executable onarm32v7
docker images (or at least alpine/musl based ones).Also, AOT compiled apps work just fine.
I now also tried this setup without docker, just with
qemu-arm
directly on an Ubuntu system, which also fails (whileqemu-aarch64
works). So this is not docker specific butqemu-arm
specific (or qemu specific). As in the docker scenario, it is only the musl based dotnet runtime that hangs (the non-musl based one works fine)./cc @lbussell
Output of
docker version
Output of
docker info
The text was updated successfully, but these errors were encountered: