Skip to content

SIGABRT on Apple M1 (rosetta) #45222

Description

@haraldsteinlechner

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:

Thread 1 Crashed:
0   ???                           	0x00007ffe95cce9bc ???
1   libsystem_kernel.dylib        	0x00007fff20390502 __pthread_kill + 10
2   libsystem_c.dylib             	0x00007fff20311720 abort + 120
3   libcoreclr.dylib              	0x0000000108cc1b99 MachExceptionInfo::RestoreState(unsigned int) + 297
4   libcoreclr.dylib              	0x0000000108cc141b SEHExceptionThread(void*) + 571
5   libsystem_pthread.dylib       	0x00007fff203be950 _pthread_start + 224
6   libsystem_pthread.dylib       	0x00007fff203ba47b thread_start + 15

I'm pretty sure the problem is in the runtime for those reasons:

  • it does not happen on other architectures
  • when digging deeper it seems the problem is very similar to: Support .NET on Apple Silicon with Rosetta 2 emulation #44897 (known issue 2)
  • the precondition here:
    This means: no printf, no TRACE, no PAL allocation, no ExitProcess,
    captured my attention in combination with the following statement from the previous issue: "Rosetta 2 emulation crashes with a fatal failure when calling with thread_get_state x86_FLOAT_STATE64. This is because the emulator does not emulate AVX support, but the function should simply return an error."

unfortunately I have no easy to share minimal repro.

Configuration

  • 5.0.100
  • Mac mini M1
  • System Version: macOS 11.0 (20A2411)
  • Kernel Version: Darwin 20.1.0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions