rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

aarch64/llvm - Ping/pong test does not run (SPU Test v1.1.2)

Open kd-11 opened this issue 1 year ago • 4 comments

Looks like the terminator trap gets hit.

RPCS3: SPU[0x1000100] Thread (CellSpursKernel1) [0x03040]: SIG: Thread terminated due to fatal error: Could not find terminator for function! (object: 0x0)
(in file /root/rpcs3/rpcs3/Emu/CPU/Backends/AArch64JIT.cpp:416[:15], in function virtual void aarch64::GHC_frame_preservation_pass::run(llvm::IRBuilder<>*, llvm::Function&)) (errno=11=Resource temporarily unavailable)

Reported by @cipherxof

kd-11 avatar Aug 08 '24 10:08 kd-11

Ftr, this crash does not appear on the version of the spu test that I have:

SPU Test v1.2.1 by GalCiv
SPU Task Avalanche completed in 13112 ms (PS3: 2740 ms)
PPU/SPU Ping-Pong completed in 4646 ms (PS3: 3045 ms)
SPU MFC 64 Bits War completed in 4919 ms (PS3: 3370 ms)
PPU/SPU MFC 64 Bits War completed in 5621 ms (PS3: 4443 ms)
SPU Integer Perf completed in 3695 ms (PS3: 8666 ms)
SPU Float Perf completed in 1163 ms (PS3: 2379 ms)
SPU SpinLock completed in 83264 ms (PS3: 4409 ms)
PUTLLUC Perf completed in 15583 ms (PS3: 3853 ms)
PUTLLC Perf completed in 1995 ms (PS3: 3364 ms)
PUT Perf completed in 2880 ms (PS3: 4567 ms)
Large PUT Perf completed in 531 ms (PS3: 4423 ms)
SPU Reciprocal Accurate completed in 7099 ms (PS3: 6125 ms)
--Completed 12 tests in 144515 ms--

kd-11 avatar Aug 08 '24 10:08 kd-11

I can't reproduce on 1.1.2 either. I'll add some extra debugging information to the crash in case it is unique to the architecture. It could also be a one-off bug, platform support is still pretty lacking.

kd-11 avatar Aug 08 '24 11:08 kd-11

Here is the binary I used. I will admit, this was tested on a VPS running Debian. I had to jump through some hoops to get it to compile so there's a chance that that has something to do with the error.

I had to 7z the zip file so it would fit within github's filesize limit.

rpcs3.zip

cipherxof avatar Aug 09 '24 00:08 cipherxof

@cipherxof Did you make any code changes? I'm wondering if maybe your setup is trying to compile the branch patchpoint stubs. Those functions have no instructions and will always trigger the assert, but there are checks to ignore them. I can share a build with more debugging if that's not the case.

kd-11 avatar Aug 09 '24 22:08 kd-11

Ok, this is reproducible with SPU "giga" mode. It's not very high priority, I'll get back to this soon.

kd-11 avatar Aug 11 '24 22:08 kd-11

@kd-11 I did make a few code changes, yes. I ran into the following problem and the changes suggested in https://github.com/llvm/llvm-project/issues/61611#issuecomment-1896609190 solved it.

I also had some odd errors with curl/wolfssl, but I ended up just deleting some of the code to get it to compile ASAP.

I hindsight I probably had Giga SPU enabled so I guess that explains it.

cipherxof avatar Aug 11 '24 22:08 cipherxof

I found that it can trigger randomly in AAA titles as well. I know what causes it, I'm pushing a fix asap.

kd-11 avatar Aug 12 '24 01:08 kd-11

https://github.com/RPCS3/rpcs3/pull/15925 should fix this

kd-11 avatar Aug 12 '24 10:08 kd-11