-
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
SIGABRT on Apple M1 (rosetta) #45222
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. |
Oops, I read ARM64 not AMD64 |
/cc @janvorli Yes this looks like the known issue where Rosetta2 doesn't gracefully fall back AVX during emulation |
@haraldsteinlechner Testing/building is not trivial, but if you want to try to build and try our current patches the process would look like this.
|
thank you for the detailed explanation. the fixes at least for me look promising :) In fact I tried to naively hack out some portions suspect to failure on rosetta but even failed on compiling the x64 runtime on m1 (I'm not sure how naive this is ;)) - most likely due to missing knowledge of mac tooling as such. you have a different/real setup for cross-compiling right? As I have seen in the other issue, most tests now pass with #45226 Seems like this one was not necessary:janvorli@aee81ac . In that case my test still could be useful. If by any chance there is a build available I would of course come back. the cross compilation seems to hot for now :( |
@haraldsteinlechner My changes for activation injection via signal is still being tested and there are some issues we are hitting with it. Without this change, you can observe hangs in rare cases when GC needs to suspend a thread. If you don't experience hangs, you don't need to use that one in your experiments. |
Two tests deadlocked w/o janvorli@aee81ac
We don't have any cross compile support in the 5.0 branch. The master (6.0) branch can be cross compiled on either macos platform for the other. The trick is to use xcode 12.2 or greater. And add the architecture and |
|
now with 11.2 out I checked again and the problem changed - I have another segfault now:
on: System Version: macOS 11.2 (20D53) is this one familiar or known? @janvorli EDIT: the full crash dump is here: https://pastebin.com/nxrKLT2h |
@haraldsteinlechner I might have seen this in the past, but there is too little evidence. Does it crash like this consistently? And does it print anything to the console besides crashing? I've done quite a lot of testing on the macOS 11.2 beta 2 and the only issue I've hit was a very rare assert in Rosetta 2: "assertion failed: GPR thread_set_state is unsupported while in sa_tramp. (ThreadContextRegisterState.cpp:1250 thread_set_state_gpr_64)". |
yes it is 100% reproduceable, it just crashes without console output. there is little chance i can trim it down do a small example. how could i help in finding the problem? |
From the log you have provided, I can see that your application was running under the .NET Core 3.1.11 runtime:
Is that expected? |
I managed to switch to net5 app. Unfortunately same behaviour: https://pastebin.com/zR0nvQRp |
ok.. after digging deeper I found a segfault in our code (in the OpenGL implementation we hit an unimplemented feature). Still a mystery though why it looked like the crash dump previously posted. EDIT: to make this clear I cannot confirm Dotnet related crashes for now! Thanks for the good work also in the other issues. Will ping back. |
@haraldsteinlechner thank you for the details! |
after heavy testing we could not spot any problems - for me this could be closed. @krauthaufen |
Description
I'm not sure about the "should be" status of dotnet on new apple silicon. anyways, the problem I stumbled across might help in stabilising the support. The problem looks very similar to bullet point two in this issue: #44897
On Mac OS, with x64 emulation I get the following output on console:
RestoreState: 1335: thread_set_state(float) (os/kern) invalid argument
when looking at the dumps it looks as such: https://pastebin.com/tEj95DD4
the relevant part would be:
I'm pretty sure the problem is in the runtime for those reasons:
runtime/src/coreclr/src/pal/src/exception/machexception.cpp
Line 984 in fd094a9
unfortunately I have no easy to share minimal repro.
Configuration
Regression?
unknown
Other information
related issues:
if there is an easy fix I'm happy to try asap using my test setup.
thanks and cheers,
Harald
The text was updated successfully, but these errors were encountered: