RPCS3 Forums
Random segfaults when loading SPU cache - Printable Version

+- RPCS3 Forums (https://forums.rpcs3.net)
+-- Forum: Support & Issues (https://forums.rpcs3.net/forumdisplay.php?fid=17)
+--- Forum: Support (https://forums.rpcs3.net/forumdisplay.php?fid=18)
+--- Thread: Random segfaults when loading SPU cache (/showthread.php?tid=203630)



Random segfaults when loading SPU cache - FinishedFragment - 01-07-2022

This is a really weird issue. I am on Arch Linux and compile rpcs3 myself from git. Hardware is a ryzen 1600af, rx 570 OC version with 8 gb of vram, intel nvme ssd and 8 gb of ddr4 ram.
Sometimes it just segfaults when linking SPU modules. It does not matter which game I start, it happens with every game.

It mostly works, but sometimes the progress bar hangs and rpcs3 segfaults. The unfortunate part is that it appears to not write the reason for the crash to disk - it briefly appears in the log shown in the rpcs3 window but is lost forever since it is in-memory only when it stops hanging and crashes. I managed to grab a screenshot of the output of the log window, which contains:

Code:
S SPU: SPU Runtime: Built the interpreter.
F {RSX [0x0000000]} SIG: Thread terminated due to fatal error: Unknown context dma 0x0 (in file /path/to/built/rpcs/Emu/RSX/gcm_enums.cpp:1176, in function to_context_dma) (errno=2)
F {Progress Dialog Server} SIG: Thread terminated due to fatal error: Segfault reading location 00007f340ff59f70 at 00000000005f2cf8.
Emu Thread Name: 'Progress Dialog Server'.

U SPU TODO: [spu-0x19684-glibberish:0x19690] Unmatched spu_fi found
U SPU TODO: [spu-0x19690-glibberish:0x19690] Unmatched spu_fi found
U SPU TODO: [spu-0x195c0-glibberish:0x19690] Unmatched spu_fi found
S SPU: SPU Runtime: Built 6172 functions.

The important part of the log is not written to disk, so I only get an ordinary log without any errors. I suppose that is because it hangs and crashes rather ungracefully. My build does not yet include https://github.com/RPCS3/rpcs3/pull/11323 but to be honest, I do not know if it would help since it does not even get to load the game.

How would I even debug this? It usually helps to just try again or if it is really bad to remove ~/.cache/rpcs3, but this is temporary.