Closed Cee123 closed 2 years ago
Hello
I read this issue and it sounded the same as the one I experienced on Cotton 2 https://github.com/devmiyax/yabause/issues/849 .
I ran Fighting Vipers on yabasanshiro stand alone on emulec odroid n2+ . I get the black screen. When attaching GDB, it pops up the same call stack. It didn't go ahead because of YabWaitEventQueue line value = queue->buffer[queue->out] (yabause/src/thr-linux.cpp:235) is waiting at the FUTEX
(gdb) bt
at ../sysdeps/nptl/futex-internal.h:183
cond=0x28ae7068) at pthread_cond_wait.c:508
mutex=mutex@entry=0x28ae7008) at pthread_cond_wait.c:638
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/thr-linux.cpp:235
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/yabause.c:791
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/yabause.c:588
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/retro_arena/main.cpp:652
I think the issue is a deadlock because of the futex
I see the trhead 69 is also having a futex on same procedure. This time is called from yabause/src/vdp2.cpp:515
(gdb) where
at ../sysdeps/nptl/futex-internal.h:183
cond=0x28cbb718) at pthread_cond_wait.c:508
mutex=mutex@entry=0x28cbb6b8) at pthread_cond_wait.c:638
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/thr-linux.cpp:235
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/vdp2.cpp:515
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/vdp2.cpp:500
at pthread_create.c:463
at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
(gdb)
(gdb) info threads
Id Target Id Frame
1 Thread 0x7fa6852010 (LWP 5519) "yabasanshiro" futex_wait_cancelable (
private=0, expected=0, futex_word=0x28ae7090)
at ../sysdeps/nptl/futex-internal.h:183
2 Thread 0x7fa38c4130 (LWP 5523) "SDLHotplugALSA" 0x0000007fa3ef7d8c in GI_clock_nanosleep (clock_id=
at ../sysdeps/nptl/futex-internal.h:183 183 ../sysdeps/nptl/futex-internal.h: No such file or directory.
Reading further it seems that the lock is done in thread 70 on /yabause/src/vidogl.c:3536 YabThreadLock(g_rotate_mtx); (same procedure appears on coton 2 issue https://github.com/devmiyax/yabause/issues/849
(gdb) bt
at /home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/yabasanshiroSA-f6f41dd6485c638ab661f3acd2951c9522f34450/yabause/src/vidogl.c:3536
(gdb) x /3d 0x7f745976f0 0x7f745976f0: 2 0 6283 (gdb)
Hello on branch 1.9.0 it already works!!! Thx
Hello on branch 1.9.0 it already works!!! Thx
Ah wow, really? Thanks for letting me know. I don't know why I wasn't notified of your earlier responses to this bug/issue. I had actually posted a couple of issues here but received no response or acknowledgment from the official developer, so I had just forgotten about them.
@Kelvfimer @Cee123 Actually pi4-1-9-0 branch increases compatibility, but it's 20% slower than the pi4 branch. I'm investigating it.
The game Fighting Vipers no longer works on the latest Yaba Sanshiro and loads to a black screen. Tried Dynared and Interpreter. Makes no difference.