rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Regression] [macOS] [Arm] Several games do not boot on Arm after recent LLVM PR (#16620)

Open shinra-electric opened this issue 9 months ago • 6 comments

Quick summary

Nier Replicant [BLJM60223] no longer boots on Arm after #16620

Details

Tested with the following:

rpcs3-v0.0.34-17439 Arm: Working (I got this build from the Azure CI) rpcs3-v0.0.34-17443 Arm: Not working rpcs3-v0.0.34-17443 x86: Working

Build with regression

rpcs3-v0.0.34-17443

Attach two log files

Log from 17439 Arm (working): RPCS3.log.zip

Log from 17443 Arm (broken): RPCS3.log.zip

Attach capture files for visual issues

No response

System configuration

M1 Pro macOS 15.3

Other details

No response

shinra-electric avatar Feb 07 '25 23:02 shinra-electric

@shinra-electric Is it also broken if you completely wipe all rpcs3 caches?

kd-11 avatar Feb 08 '25 07:02 kd-11

Yes, I tried deleting the game cache and the firmware cache. No luck.

It freezes with this message in the TTY:

F {RSX [0x0001630]} SIG: Thread terminated due to fatal error: Verification failed (object: 0x0)
(in file /Users/runner/work/1/s/Utilities/mutex.cpp:89[:2], in function 'void shared_mutex::imp_lock(u32)') (errno=316=Unknown error: 316)

Also, if I close the window at this time the app will crash. Here is the system crash report if it helps:

nier_crash.txt

shinra-electric avatar Feb 08 '25 09:02 shinra-electric

Cannot reproduce on Linux arm64

Image

AniLeo avatar Feb 08 '25 19:02 AniLeo

@shinra-electric

Yes, I tried deleting the game cache and the firmware cache. No luck.

It freezes with this message in the TTY:

F {RSX [0x0001630]} SIG: Thread terminated due to fatal error: Verification failed (object: 0x0)
(in file /Users/runner/work/1/s/Utilities/mutex.cpp:89[:2], in function 'void shared_mutex::imp_lock(u32)') (errno=316=Unknown error: 316)

Also, if I close the window at this time the app will crash. Here is the system crash report if it helps:

nier_crash.txt

This looks more like heap corruption. Is this a self-compiled build? If so, try a clean build in case of linker errors: ninja clean && ninja

kd-11 avatar Feb 08 '25 21:02 kd-11

This looks more like heap corruption. Is this a self-compiled build? If so, try a clean build in case of linker errors: ninja clean && ninja

No, these are from official releases.

shinra-electric avatar Feb 08 '25 23:02 shinra-electric

Any chance this might get some love sometime soon?

JohnHDev avatar Apr 16 '25 10:04 JohnHDev

Seeing this with RPCS3 Version: 0.0.36-17909-2a50ac18 Alpha | HEAD

JoshHrach avatar May 06 '25 19:05 JoshHrach

Does being a patreon help prioritise issues? Coz I am if that helps, happy to verify that.

JohnHDev avatar May 10 '25 20:05 JohnHDev

Does being a patreon help prioritise issues? Coz I am if that helps, happy to verify that.

Not exactly, it's a resource shortage issue.

  1. We don't have many devs with access to both macos arm64 and have good knowledge of our llvm core. At this time I'm on my own on this while also working on all the RSX bugs when I have time to work on the emu.
  2. It depends on a developer willing to spend a considerable amount of time on this issue exclusively for a significant amount of time. It is the kind of bug that takes days to figure out if you're unlucky.
  3. The issue cannot be reproduced on linux arm64 which would have made things significantly easier. Reproducing on macos is not useful since that platform is so awful for development and I have a hard time dealing with lldb.

Since the only game listed here is just Nier Replicant, falling back to x86 while we schedule this is a good workaround. If there are more games someone should create a comprehensive list, it would be helpful if one of them started crashing on linux as well.

kd-11 avatar May 11 '25 10:05 kd-11

Thanks @kd-11 that makes sense. I’ll add my games here as they were on a linked ticket that was closed.

Infamous 2 Grand Theft Auto IV

Both stop at the same point during loading. Going back to the earlier arm build works however.

JohnHDev avatar May 11 '25 11:05 JohnHDev

Games I've tested that've failed: Infamous Infamous 2 Mirror's Edge

If this is related to #16620, I'm curious if macOS ARM tests with #16807 will show any improvements.

JoshHrach avatar May 12 '25 18:05 JoshHrach

I was setting up RPCS3 on a new Mac and discovered what was causing the crash for Nier Replicant.

It crashes when the Asynchronous Texture Streaming setting is enabled. This setting is recommended on the wiki, which is why I had it enabled.

Disabling it allows the game to boot.

Image

shinra-electric avatar Oct 17 '25 03:10 shinra-electric

Try https://github.com/RPCS3/rpcs3/pull/17596

kd-11 avatar Oct 18 '25 00:10 kd-11

Try #17596

That PR allows the game to boot:

Image

The framerate is terrible, but that may be unrelated.

When building locally I noticed something that may affect #17530, I'll add a comment over there.

shinra-electric avatar Oct 18 '25 04:10 shinra-electric

@shinra-electric Was performance always this bad? I could also enable async streaming without DMA passthrough which I don't think MVK supports anyway.

EDIT: I noticed in screenshots above that fps is much higher even with no async streaming, so that doesn't seem to be the cause here.

kd-11 avatar Oct 18 '25 11:10 kd-11

Fixed by https://github.com/RPCS3/rpcs3/pull/17596

kd-11 avatar Oct 18 '25 11:10 kd-11

This doesn't appear to fix running Infamous 2, it crashes earlier than before so might be unrelated to this fix. Also my Infamous 2 never had Async Texture Streaming on.

JohnHDev avatar Oct 21 '25 15:10 JohnHDev