Project

General

Profile

Emulator Issues #12727

Mac builds crash when starting a game when using the ARM64 JIT recompiler

Added by friendsxix 24 days ago. Updated 16 days ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Tested with both Animal Crossing and The Legend of Zelda: Twilight Princess.

Game ID?

GZ2E01 and GAFE01.

MD5 Hash?

41deff9b1fd2831f48fbfa2dd1054e4d for Twilight Princess. Animal Crossing is trimmed, but both games crash in exactly the same way.

What's the problem? Describe what went wrong.

Dolphin crashes immediately when attempting to start a game. The crash does not occur when using either the interpreter or the cached interpreter. Interestingly, the last build to not crash is 5.0-14274 (the last build before support for ARM-based Macs was added). Later builds crash even when running through Rosetta 2. Perhaps this is an issue with the M1 Max specifically? I do not have an M1 Pro machine to test. I have tried nuking Dolphin's settings in ~/Library/Application Support between tests to no avail.

What steps will reproduce the problem?

1) Open ROM
2) Crash.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, tested on 5.0-15467.

Is the issue present in the latest stable version?

No, but the latest stable build crashes in Rosetta 2 when attempting to start a game due to a seemingly different error.

If the issue isn't present in the latest stable version, which is the first broken version?

5.0-14295

What are your PC specifications?

2021 Macbook Pro 16"
M1 Max with 32 GPU Cores
64 GB of RAM
macOS Monterey 12.0.1

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

dolphin.log appears to be empty. I have attached a copy of the crash log that macOS generated.

dolphincrash.log (41.3 KB) dolphincrash.log friendsxix, 11/08/2021 03:40 AM

History

#1 Updated by friendsxix 24 days ago

I am not entirely sure why I specifically called out the ARM64 JIT in the issue title, since it happens with the x86-64 JIT running through Rosetta 2 as well on builds following the introduction of ARM support on Mac.

#2 Updated by OatmealDome 24 days ago

Can't reproduce on an M1.

Seems like mmap in MemArena::CreateView is failing because of an EXC_GUARD exception of type GUARD_TYPE_VIRT_MEMORY. I've never seen such a thing before.

The XNU sources have this to say about that exception type (https://github.com/apple/darwin-xnu/blob/main/osfmk/vm/vm_map.c#L7653): "Right now, we do this when we find nothing mapped, or a gap in the mapping when a user address space deallocate was requested. We report the address of the first gap found."

My specs:
Mac mini (2020)
Apple M1
macOS Monterey 12.0.1

#3 Updated by Rrnd24 16 days ago

I have the same Problem on the latest dev & latest beta.

But it only happens if SIP is disabled or partially disabled.
If SIP is fully enabled (csrutil enable) Dolphin works fine.

Also available in: Atom PDF