Closed vanfanel closed 11 months ago
There doesn't seem to be anything interesting in this log. Flycast correctly initializes its vulkan renderer.
Can you get a stacktrace? What makes you think flycast is at fault here?
@flyinghead I can get a GDB backtrace (is it the same as an stacktrace? I believe so), here it is:
Thread 9 "retroarch_debug" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fdd1d6b56c0 (LWP 9118)]
bm_GetCode (addr=2684354560) at /root/src/libretro/flycast/core/hw/sh4/dyna/blockmanager.cpp:49
49 DynarecCodeEntryPtr rv = FPCA(addr);
(gdb) bt
#0 bm_GetCode (addr=2684354560) at /root/src/libretro/flycast/core/hw/sh4/dyna/blockmanager.cpp:49
#1 0x00007fdd5952ba66 in bm_GetCodeByVAddr (addr=2684354560)
at /root/src/libretro/flycast/core/hw/sh4/dyna/blockmanager.cpp:59
#2 0x00007fdd59543036 in SH4_TCB () at /root/src/libretro/flycast/core/hw/sh4/modules/mmu.h:112
#3 0xb7566d8b95e56dfa in ?? ()
#4 0x00007fdd1ceb5000 in ?? ()
#5 0x00007fff7bfd42e0 in ?? ()
#6 0x0000562a0f854fe0 in ?? ()
#7 0x00007fdd1d6b4cd7 in ?? ()
#8 0x00007fdd1d6b4880 in ?? ()
#9 0x00007fdd5afe5860 in ?? () from /root/.config/retroarch/cores/flycast_libretro_debug.so
#10 0x00007fdd5a1e2398 in X64Dynarec::mainloop (this=0x7fdd5c88b860 <instance>)
at /root/src/libretro/flycast/core/rec-x64/rec_x64.cpp:1339
#11 0x00007fdd5a043288 in recSh4_Run () at /root/src/libretro/flycast/core/hw/sh4/dyna/driver.cpp:112
#12 0x00007fdd58f61260 in Emulator::runInternal (this=0x7fdd5afe5860 <emu>)
at /root/src/libretro/flycast/core/emulator.cpp:691
#13 0x00007fdd58f61e92 in operator() (__closure=0x562a0f855018)
at /root/src/libretro/flycast/core/emulator.cpp:947
#14 0x00007fdd58f64354 in std::__invoke_impl<void, Emulator::start()::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/12/bits/invoke.h:61
#15 0x00007fdd58f64317 in std::__invoke<Emulator::start()::<lambda()> >(struct {...} &&) (__fn=...)
at /usr/include/c++/12/bits/invoke.h:96
#16 0x00007fdd58f642c4 in std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x562a0f855018) at /usr/include/c++/12/bits/std_thread.h:252
#17 0x00007fdd58f64298 in std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >::operator()(void)
--Type <RET> for more, q to quit, c to continue without paging--
(this=0x562a0f855018) at /usr/include/c++/12/bits/std_thread.h:259
#18 0x00007fdd58f6413d in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::operator()(void) const (this=0x7fdd1d6b4d60) at /usr/include/c++/12/future:1410
#19 0x00007fdd58f64064 in std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> &) (__f=...) at /usr/include/c++/12/bits/invoke.h:61
#20 0x00007fdd58f63ec4 in std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> &) (
__fn=...) at /usr/include/c++/12/bits/invoke.h:116
#21 0x00007fdd58f63d4f in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>(), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> >::_M_invoke(const std::_Any_data &) (__functor=...)
at /usr/include/c++/12/bits/std_function.h:291
#22 0x00007fdd58f66cc3 in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const (this=0x7fdd1d6b4d60)
at /usr/include/c++/12/bits/std_function.h:591
#23 0x00007fdd58f65adb in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__fut--Type <RET> for more, q to quit, c to continue without paging--
ure_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (this=0x562a0f854fe0,
__f=0x7fdd1d6b4d60, __did_set=0x7fdd1d6b4cd7) at /usr/include/c++/12/future:572
#24 0x00007fdd58f6e085 in std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (
__f=@0x7fdd1d6b4cf0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x7fdd58f65ab4 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>,
__t=@0x7fdd1d6b4ce8: 0x562a0f854fe0) at /usr/include/c++/12/bits/invoke.h:74
#25 0x00007fdd58f6a9dd in std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (
__fn=@0x7fdd1d6b4cf0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x7fdd58f65ab4 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>)
--Type <RET> for more, q to quit, c to continue without paging--
at /usr/include/c++/12/bits/invoke.h:96
#26 0x00007fdd58f66aaa in std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}::operator()() const (__closure=0x7fdd1d6b4c60)
at /usr/include/c++/12/mutex:852
#27 0x00007fdd58f6aa11 in std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::operator()() const (__closure=0x0)
at /usr/include/c++/12/mutex:788
#28 0x00007fdd58f6aa22 in std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::uniqu--Type <RET> for more, q to quit, c to continue without paging--
e_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::_FUN() ()
at /usr/include/c++/12/mutex:788
#29 0x00007fdd5d3cdea7 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#30 0x00007fdd58f5e0f6 in __gthread_once (__once=0x562a0f854ff8, __func=0x7fdd5d6d3200 <__once_proxy>)
at /usr/include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:700
#31 0x00007fdd58f66b1c in std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (__once=...,
__f=@0x7fdd1d6b4cf0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x7fdd58f65ab4 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>)
at /usr/include/c++/12/mutex:859
#32 0x00007fdd58f65905 in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) (this=0x562a0f854fe0,
__res=..., __ignore_failure=false) at /usr/include/c++/12/future:412
#33 0x00007fdd58f6396b in std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::_M_run(void) (this=0x562a0f854fe0) at /usr/include/c++/12/future:1749
#34 0x00007fdd58f64b2c in std::__invoke_impl<void, void (std::__future_base::_Async_state_impl<std::thread::_In--Type <RET> for more, q to quit, c to continue without paging--
voker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>*>(std::__invoke_memfun_deref, void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*&&)(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> * const), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> *&&) (
__f=@0x562a0f9974a0: (void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> * const)) 0x7fdd58f6390e <std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::_M_run(void)>,
__t=@0x562a0f997498: 0x562a0f854fe0) at /usr/include/c++/12/bits/invoke.h:74
#35 0x00007fdd58f64a8b in std::__invoke<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>*>(void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*&&)(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> * const)) (
__fn=@0x562a0f9974a0: (void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void> * const)) 0x7fdd58f6390e <std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::_M_run(void)>)
at /usr/include/c++/12/bits/invoke.h:96
#36 0x00007fdd58f649c5 in std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>*> >::_M_invoke<0, 1>(std::_Index_tuple<0, 1>) (this=0x562a0f997498) at /usr/include/c++/12/bits/std_thread.h:252
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00007fdd58f6490a in std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>*> >::operator()(void) (
this=0x562a0f997498) at /usr/include/c++/12/bits/std_thread.h:259
#38 0x00007fdd58f64506 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Emulator::start()::<lambda()> > >, void>*> > >::_M_run(void) (this=0x562a0f997490) at /usr/include/c++/12/bits/std_thread.h:210
#39 0x00007fdd5d6d44a3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#40 0x00007fdd5d3c9044 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#41 0x00007fdd5d44961c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
I had to build debug versions of both RetroArch and the Flycast core to get this, so I named them retroarch_debug and flycast_libretro_debug.so, respectively.
What makes me believe this is a Flycast issue is that no other cores do this, they all work fine from TTY on KMS/DRM.
This is an expected SIGSEGV. Flycast uses them a lot.
Try to put a breakpoint at common.cpp:69
and ignore SIGSEGV:
break common.cpp:69
handle SIGSEGV nostop noprint
run
@flyinghead After doing what you told me, the program is terminated without any warning, look at this gdb session:
root@DietPi:~# gdb
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) attach 1305
Attaching to process 1305
Reading symbols from /usr/local/bin/retroarch_debug...
Reading symbols from /lib/x86_64-linux-gnu/libasound.so.2...
(No debugging symbols found in /lib/x86_64-linux-gnu/libasound.so.2)
Reading symbols from /usr/local/lib64/libwayland-egl.so.1...
(No debugging symbols found in /usr/local/lib64/libwayland-egl.so.1)
Reading symbols from /usr/local/lib64/libwayland-client.so.0...
(No debugging symbols found in /usr/local/lib64/libwayland-client.so.0)
Reading symbols from /usr/local/lib64/libwayland-cursor.so.0...
(No debugging symbols found in /usr/local/lib64/libwayland-cursor.so.0)
Reading symbols from /lib/x86_64-linux-gnu/libxkbcommon.so.0...
(No debugging symbols found in /lib/x86_64-linux-gnu/libxkbcommon.so.0)
Reading symbols from /lib/x86_64-linux-gnu/libudev.so.1...
(No debugging symbols found in /lib/x86_64-linux-gnu/libudev.so.1)
Reading symbols from /usr/local/lib64/libgbm.so.1...
(No debugging symbols found in /usr/local/lib64/libgbm.so.1)
Reading symbols from /usr/local/lib64/libdrm.so.2...
Reading symbols from /usr/local/lib64/libGLESv2.so.2...
(No debugging symbols found in /usr/local/lib64/libGLESv2.so.2)
Reading symbols from /usr/local/lib64/libEGL.so.1...
(No debugging symbols found in /usr/local/lib64/libEGL.so.1)
Reading symbols from /lib/x86_64-linux-gnu/libstdc++.so.6...
(No debugging symbols found in /lib/x86_64-linux-gnu/libstdc++.so.6)
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...
(No debugging symbols found in /lib/x86_64-linux-gnu/libm.so.6)
Reading symbols from /lib/x86_64-linux-gnu/libgcc_s.so.1...
(No debugging symbols found in /lib/x86_64-linux-gnu/libgcc_s.so.1)
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...
(No debugging symbols found in /lib/x86_64-linux-gnu/libc.so.6)
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
Reading symbols from /lib/x86_64-linux-gnu/libffi.so.8...
(No debugging symbols found in /lib/x86_64-linux-gnu/libffi.so.8)
Reading symbols from /usr/local/lib64/libwayland-server.so.0...
(No debugging symbols found in /usr/local/lib64/libwayland-server.so.0)
Reading symbols from /lib/x86_64-linux-gnu/libexpat.so.1...
(No debugging symbols found in /lib/x86_64-linux-gnu/libexpat.so.1)
Reading symbols from /usr/local/lib64/libGLdispatch.so.0...
(No debugging symbols found in /usr/local/lib64/libGLdispatch.so.0)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f97ceb1709d in read () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) break common.cpp:69
No source file named common.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (common.cpp:69) pending.
(gdb) handle SIGSEGV nostop noprint
Signal Stop Print Pass to program Description
SIGSEGV No No Yes Segmentation fault
(gdb) c
Continuing.
[New Thread 0x7f97ce9256c0 (LWP 1324)]
[New Thread 0x7f97a07ff6c0 (LWP 1325)]
[New Thread 0x7f979fc476c0 (LWP 1326)]
[New Thread 0x7f979ce5b6c0 (LWP 1327)]
[New Thread 0x7f978ffff6c0 (LWP 1328)]
[New Thread 0x7f978f7fe6c0 (LWP 1329)]
[New Thread 0x7f978effd6c0 (LWP 1330)]
[New Thread 0x7f978e7fc6c0 (LWP 1331)]
[Thread 0x7f978e7fc6c0 (LWP 1331) exited]
[Thread 0x7f978effd6c0 (LWP 1330) exited]
[Thread 0x7f978f7fe6c0 (LWP 1329) exited]
[Thread 0x7f978ffff6c0 (LWP 1328) exited]
[Thread 0x7f979fc476c0 (LWP 1326) exited]
[Thread 0x7f97a07ff6c0 (LWP 1325) exited]
[Thread 0x7f97ce9256c0 (LWP 1324) exited]
[Thread 0x7f97cee2a780 (LWP 1305) exited]
[Thread 0x7f979ce5b6c0 (LWP 1327) exited]
[New process 1305]
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) bt
No stack.
Note that I have to launch RA/Flycast locally and debug over ssh, that's why there's that attach on my GDB session.
Yes, this is strange. Also the unexpected SIGSEGV should print out some error (that's what line 69 in common.cpp does). Also I don't see gdb reading flycast_libretro.so symbols. Are you running the debug version of the core?
I am sure I am using the debug version of the core: just take into account that it was launched locally, then GDB is attached to it. I have to do it like that because, if I run RetroArch over ssh, the issue does not happen.
This is over ssh:
root@DietPi:~# gdb --args retroarch_debug -L /root/.config/retroarch/cores/flycast_libretro_debug.so /root/Soulcalibur\ \(USA\).chd
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from retroarch_debug...
(gdb) r
Starting program: /usr/local/bin/retroarch_debug -L /root/.config/retroarch/cores/flycast_libretro_debug.so /root/Soulcalibur\ \(USA\).chd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
...but debuging it like that is not use because the issue won't manifest unless I launch RetroArch locally as I said.
We already discussed this problem in the past: https://github.com/flyinghead/flycast/issues/626
It's been reported by other users as well: https://github.com/flyinghead/flycast/issues/578
The conclusion is still the same: This is not a Flycast issue
@flyinghead Oh, sorry about that! I somehow recalled we had discussed this already, but couldn't find the issue thread because I wasn't sure. I thank you sincerely for being so patient, seeing that we already went through this in the past.
If it helps, it's the only core where it happens as I said, and also it does NOT happen if RetroArch is launched then the core is loaded from inside RetroArch.
Also should I take this to the RetroArch people again then?
@flyinghead I noticed that passing < /dev/null
at the end of the command line, the segfault does not happen an the flycast core works fine on the TTY!!
Does it give you any clues?
the same clue as in #578: this is not a Flycast issue
the same clue as in #578: this is not a Flycast issue
Then, is It a RetroArch issue?
I'd like to add to this thread that while appending < /dev/null
does indeed allow retroarch -L flycast
to boot from KMS (thank you!!), it does not need any of that when running off a Wayland display - either from a terminal or a RetroArch frontend.
If it helps, I noticed I also had to assign input_auto_game_focus = "0"
in its Flycast.cfg
to avoid starting up from using Input Auto Focus ON as it will hang miserably using the controller hotkey exit until I press Ctrl/C.
Core was built on Pi5 using: cmake -DLIBRETRO=ON -DUSE_OPENGL=OFF ..
Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.
Platform / OS / Hardware: GNU/Linux x86_64 or aarch64
Github hash: cb91ad3ae0c1291485892bf3a9663a2fd303ce83
Hardware: Any hardware from modern i5 1235U to Raspberry Pi 4. The same issue happens all hardware where I have tried.
Description of the Issue
Flycast core segfaults when launched from the command line on KMS/DRM like this:
retroarch -L .config/retroarch/cores/flycast_libretro.so dreamcast/Soulcalibur.chd
Using full absolute path, same problem happens:
retroarch -L /root/.config/retroarch/cores/flycast_libretro.so /root/dreamcast/Soulcalibur.chd
(Works fine when launched from the command line on Wayland, and also works fine on the TTY if launched using the exact same command on an SSH session).
Logs Gathered