-
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
arm64 skippage6.sh test fails to JIT code when page size > 4KB #42023
Comments
cc @dotnet/jit-contrib |
This test runs on Windows/Linux arm64 in CI; what is different about the macOS code? |
It looks like it is just a different immediate value that is causing the problem. Perhaps simply because I was running in debug mode? |
Actually, that seems very interesting/relevant, since the JIT stack probing code is based on page size. |
In the long term the stack probing should be done via helper call #13519 - JIT (or runtime) can pick the appropriate helper based on page size (here I presume helpers for 4K and 16K might be implemented slightly differently). |
Does this affect x64 with pages larger than 4kB also? |
There is a similar problem on x64 with larger pages. We've hit it when testing .NET running on the new Apple Silicon developer test device under Rosetta 2 emulation which emulates x64 on arm64. The page size was 16kB there. However, it turned out that the final versions of Apple Silicon that are now sold as Apple M1 have fixed the page size for the emulation to be 4kB again, so we didn't have to fix it. Does RHEL 8 on x64 support non-4kB normal page sizes too? |
I've used a couple of machines and they all had a page size of 64kB so I assume that is the value used when the kernel gets compiled for arm64 RHEL8.
Would this workaround be feasible also for 64kB pages (-> 16 touches)? @sandreenko are you, or someone else working on this? |
@echesakovMSFT is working on it |
@echesakovMSFT please prioritize this because this is a blocking issue on RHEL8. |
@JulieLeeMSFT Sure, I am actively working on #43250 that will close this issue |
The issue with the JIT asserting on Arm64 platforms with a page size larger than 4KB should be resolved by #47862. @sandreenko confirmed that the Pri1 tests pass with that change on Apple M1 (see his comment here) @tmds Can you please also verify this the tests pass with RHEL 8 on Arm64 on top of current master (bf9f899)? |
Thanks for fixing! I'll look at running these tests. It will take some time because the workflow is cumbersome since it involves a non-RHEL8 arm64 machine to not run into the issue while building tests, and then a RHEL8 arm64 machine to run the tests. I hope this fix will get rid of the For it to be usable for us, the fix needs to land in the SDK that we use in source-build to build dotnet/runtime and other .NET repos. Do you currently plan to backport this to .NET 5? |
It's unlikely. The issue you mentioned exhibits quite different symptoms.
I am not familiar with the source-build infrastructure. Can you please elaborate on what version of the SDK are you talking about? Is it 5.0 or 6.0?
I wasn't originally but if this blocks you in 5.0 I would propose a simpler (less risky) change (as in #45226) |
We didn't find many clues from running the priority1 tests. I'm keeping my fingers crossed.
source-build has branches for each .NET version. .NET 5.0 branch uses a 5.0 SDK. .NET 6.0 branch will use a 6.0 SDK.
#43349 blocks us. When we know what is needed to fix it, we can see if it makes sense to apply changes to 5.0, or delay till 6.0. |
I assume that you can use 6.0 SDK, and we don't need to make changes to .NET 5.0.
JanV couldn't repro the issue. Let's keep on eye on it and track |
We are seeing a lot of |
To build for 5.0, we need a 5.0 SDK.
Are these tests I can run? Is there an issue tracking this? We don't see |
@echesakovMSFT can make a simpler (less risky) change as he mentioned for .NET 5 (as in #45226). |
@JulieLeeMSFT @echesakovMSFT I'm fine waiting to make changes to 5.0 until we figured out all fixes needed to solve the |
@sdmaclea I guess you can use this .NET 6 fix to test Apple Silicon |
@JulieLeeMSFT As @echesakovMSFT said it is unlikely that this fixed #43349 or the equivalent issues we are seeing on Apple Silicon. I was just commenting that this is a common issue which we are likely going to invest in fixing for 6.0. I will certainly be testing this as we bring up CI for Apple Silicon.
I am not sure why #45226 wouldn't have fixed the issue already. I thought it was the only place the JIT asked about the stack size. |
@JulieLeeMSFT I ran the tests, and the
@sdmaclea the PR you reference was not merged. Is there an issue for the
@JulieLeeMSFT @echesakovMSFT We've discussed this internally, and we've changed our milestone for .NET on arm64 to .NET 6. |
@tmds thanks for the note. Will close this now. |
Cannot encode
15552
as an immediate (with #40435)./cc @sandreenko @JulieLeeMSFT
category:correctness
theme:prolog-epilog
skill-level:intermediate
cost:small
The text was updated successfully, but these errors were encountered: