-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
NRE in System.Text.RegularExpresssions on ARM64 #78340
Comments
@anmalkov is the host machine you're running on ARM64, or are you using Docker's built in qemu ARM64 emulation?
This one is tracked by NuGet/Home#12227. |
I don't see anything in the MSBuild-layer calls to So I'm going to rename + reroute this to the regex folks in |
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. |
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsSteps to reproduce
Expected result:A solution should be built and container image should be created Actual result:dotnet restore command fails with:
DebianIf you try to do the same but with the base image with tag
.NET 7 on Linux amd64Everything works well if I use the base images with the tag "7.0" which is targeted amd64. So, it is an ARM issue. .NET 6 on ARMIf you run the same on .NET6 everything works perfectly with Ubuntu and Debian base images for ARM64v8.
|
I'm building the image on Windows 11, so, on emulation. However, I want to run the container on ARM64 |
So 7.x will not be usable on arm64 devices and we need to wait for 8.0?! |
We run a bazillion regex tests on ARM64, and to my knowledge we've never seen such an NRE. It's far from "not usable". Do you have a standalone repro with just regex that shows the problem you're hitting? |
You're absolutely right about it being far from "not usable", perhaps I was a bit overdramatic in my choice of words. It actually doesn't happen directly on ARM64 but rather under QEMU emulation of ARM64 (on Ubuntu over x64 in our case) which should be a common production build practice building the project on a non-ARM64 CI server. I don't have a standalone example that reproduces it but I can certainly try to get one together if it helps. |
Thanks. @richlander, @AndyAyersMS, do we support / test QEMU emulation of ARM64 on .NET 7? I'm struggling at the moment to see how this could be an issue specific to regex. |
I don't believe running under QEMU is officially supported, but it would be nice if it worked. My guess is that this indicates a problem in QEMU. IIRC there is some kind of verbose mode where QEMU can give you more details when it hits something it does not expect. @RobertHenry6bev ran into something like this (though he was emulating x64, not arm64) -- maybe he can suggest how to diagnose these cases. |
same issue:
|
We are facing the same issue, too on Amazon Linux x86_x64 |
So neither of you are using QEMU? |
Correct. The NullReferenceException happens as well locally, when I am building with Docker Desktop on Windows on my x86_x64 machine, using --platform linux/arm64 with |
Targeting arm64 while running on x86/x64 hardware requires emulation. Is this ever happening without emulation? |
Looks like this issue is reproducible as reported from multiple persons and a Nullreference Exception in Regex1_Scan. This is a programming mistake in Msbuild as null check missing and should be easy to fix, right? |
All confirmed cases are using emulated arm64
No. |
@RobertHenry6bev do you have any suggestions folks can try to gather more info here, per suggestion above? |
@jkotas what is the support status of .NET in QEMU -- and if not supported, how well is it known to work? |
Not supported. Documented here: https://github.com/dotnet/core/blob/main/release-notes/7.0/supported-os.md#qemu It is known to be unusable for anything real. |
OK, I'm going to close this as it's a QEMU issue. If anyone is encountering this but not in fact emulating arm64 please open a new issue. |
Steps to reproduce
Expected result:
A solution should be built and container image should be created
Actual result:
dotnet restore command fails with:
Debian
If you try to do the same but with the base image with tag
7.0-bullseye-slim-arm64v8
which is based on Debian, the dotnet restore command also fails with:.NET 7 on Linux amd64
Everything works well if I use the base images with the tag "7.0" which is targeted amd64. So, it is an ARM issue.
.NET 6 on ARM
If you run the same on .NET6 everything works perfectly with Ubuntu and Debian base images for ARM64v8.
The text was updated successfully, but these errors were encountered: