rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

RPCS3 segfaults on exit

Open MastaG opened this issue 1 year ago • 3 comments

Quick summary

RPCS3 seems to segfault when trying to close it. Even when I didn't run any games/software.

Details

Compiled the latest v0.0.28-15141-6d918b56 rev 6f834e99d22e4821b9061aee4e51691de06d2345 on Fedora 38 running the default Gnome 44.1 desktop with Wayland. I'm using an AMD RX 6400 with mesa 23.1.1.

I've compiled RPCS3 with only the "-DBUILD_LLVM=1" cmake flag.

When I open the emulator the GUI appears, but when I close it (by pressing the X in the upper-right corner), the emulator will segfault.

Attach a log file

backtrace_on_close.log

RPCS3.log

Attach capture files for visual issues

No response

System configuration

No response

Other details

No response

MastaG avatar Jun 08 '23 12:06 MastaG

Experiencing the same on latest flatpak: flathub/net.rpcs3.RPCS3#1401

rivenirvana avatar Jun 08 '23 14:06 rivenirvana

If it doesn't happen with the AppImage, then this is something specific to your environment. Btw, flatpaks are not supported.

Megamouse avatar Jun 08 '23 20:06 Megamouse

I'm not running any flatpaks nor AppImages. I just compiled the vanilla source as per wiki instructions.

MastaG avatar Jun 08 '23 20:06 MastaG

This still seems to happen with the latest git as of today. I've deleted ~/.config/rpcs3 and ~/.cache/rpcs3 before running it. I'm running a freshly compiled build through gdb. If there's a better way to debug this please let me know.

But it should be nice to be able to exit the emulator without crashing it.

Thread 2 "..pool" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff71f5f6c0 (LWP 129758)]
0x00007ffff58ae786 in start_thread (arg=<optimized out>) at pthread_create.c:461
461       if (__glibc_unlikely (pd->report_events))                                                                              
Missing separate debuginfos, use: dnf debuginfo-install xorg-x11-drv-nvidia-libs-535.54.03-2.fc38.x86_64
(gdb) thread apply all bt -full

Thread 11 (Thread 0x7fff4ffff6c0 (LWP 129768) "dconf worker"):
#0  0x00007ffff592735d in __GI___poll (fds=0x7fff30000b90, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007ffff4b713a9 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7fff30000b90, timeout=<optimized out>, context=0x7e67b50) at ../glib/gmain.c:4584
        ret = <optimized out>
        errsv = <optimized out>
        poll_func = 0x7ffff4b247c0 <g_poll>
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = <optimized out>
        fds = 0x7fff30000b90
        begin_time_nsec = 25897632653778
#2  g_main_context_iterate.isra.0 (context=0x7e67b50, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = <optimized out>
        fds = 0x7fff30000b90
        begin_time_nsec = 25897632653778
#3  0x00007ffff4b10a23 in g_main_context_iteration (context=context@entry=0x7e67b50, may_block=may_block@entry=1) at ../glib/gmain.c:4343
        retval = <optimized out>
#4  0x00007fff578ae5c5 in dconf_gdbus_worker_thread (user_data=0x7e67b50) at ../gdbus/dconf-gdbus-thread.c:82
        context = 0x7e67b50
#5  0x00007ffff4b41893 in g_thread_proxy (data=0x7e67d60) at ../glib/gthread.c:831
        thread = 0x7e67d60
        __func__ = "g_thread_proxy"
#6  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799678538273776649, 140734535562944, -13024, 17, 140737488340432, -5799678538286359561, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0
, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 10 (Thread 0x7fff54ba26c0 (LWP 129767) "gdbus"):
#0  0x00007ffff592735d in __GI___poll (fds=0x7fff3c000b90, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007ffff4b713a9 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x7fff3c000b90, timeout=<optimized out>, context=0x7fff38006720) at ../glib/gmain.c:4584
        ret = <optimized out>
        errsv = <optimized out>
        poll_func = 0x7ffff4b247c0 <g_poll>
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 3
        allocated_nfds = <optimized out>
        fds = 0x7fff3c000b90
        begin_time_nsec = 25899266783737
#2  g_main_context_iterate.isra.0 (context=0x7fff38006720, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 3
        allocated_nfds = <optimized out>
        fds = 0x7fff3c000b90
        begin_time_nsec = 25899266783737
#3  0x00007ffff4b1299f in g_main_loop_run (loop=0x7fff38006810) at ../glib/gmain.c:4479
        __func__ = "g_main_loop_run"
#4  0x00007fff5c1484b2 in gdbus_shared_thread_func (user_data=0x7fff380066f0) at ../gio/gdbusprivate.c:284
        data = 0x7fff380066f0
#5  0x00007ffff4b41893 in g_thread_proxy (data=0x7e5b7a0) at ../glib/gthread.c:831
        thread = 0x7e5b7a0
        __func__ = "g_thread_proxy"
#6  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799702197637997577, 140734614873792, -13024, 11, 140734623467024, -5799702197650580489, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 9 (Thread 0x7fff553d86c0 (LWP 129766) "pool-rpcs3"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff4b68e40 in g_cond_wait_until (cond=<optimized out>, mutex=0x7e54480, end_time=<optimized out>) at ../glib/gthread-posix.c:1600
        span_arg = {tv_sec = 14, tv_nsec = 999999180}
        now = {tv_sec = 25898, tv_nsec = 129234820}
        span = {tv_sec = <optimized out>, tv_nsec = <optimized out>}
        sampled = 0
        res = <optimized out>
        success = <optimized out>
#2  0x00007ffff4ade013 in g_async_queue_pop_intern_unlocked (queue=0x7e54480, wait=1, end_time=25913129234) at ../glib/gasyncqueue.c:428
        retval = <optimized out>
        __func__ = "g_async_queue_pop_intern_unlocked"
#3  0x00007ffff4ade166 in g_async_queue_timeout_pop (queue=0x7e54480, timeout=<optimized out>) at ../glib/gasyncqueue.c:551
        end_time = 25913129234
        retval = <optimized out>
        __func__ = "g_async_queue_timeout_pop"
#4  0x00007ffff4b43e4f in g_thread_pool_wait_for_new_pool () at ../glib/gthreadpool.c:181
        pool = <optimized out>
        local_max_idle_time = 15000
        local_wakeup_thread_serial = <optimized out>
        last_wakeup_thread_serial = 0
        have_relayed_thread_marker = <optimized out>
        free_pool = <optimized out>
        task = <optimized out>
        pool = <optimized out>
#5  g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:408
        free_pool = <optimized out>
        task = <optimized out>
        pool = <optimized out>
#6  0x00007ffff4b41893 in g_thread_proxy (data=0x7fff40000b90) at ../glib/gthread.c:831
        thread = 0x7fff40000b90
        __func__ = "g_thread_proxy"
#7  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799701060545405961, 140734623483584, -13024, 0, 140734640252832, -5799701060557988873, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#8  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7fff55bd96c0 (LWP 129765) "gmain"):
#0  0x00007ffff592735d in __GI___poll (fds=0x7e55fb0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007ffff4b713a9 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7e55fb0, timeout=<optimized out>, context=0x7e55d80) at ../glib/gmain.c:4584
        ret = <optimized out>
        errsv = <optimized out>
        poll_func = 0x7ffff4b247c0 <g_poll>
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = <optimized out>
        fds = 0x7e55fb0
        begin_time_nsec = 25897628461764
#2  g_main_context_iterate.isra.0 (context=0x7e55d80, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4271
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = <optimized out>
        fds = 0x7e55fb0
        begin_time_nsec = 25897628461764
#3  0x00007ffff4b10a23 in g_main_context_iteration (context=0x7e55d80, may_block=may_block@entry=1) at ../glib/gmain.c:4343
        retval = <optimized out>
#4  0x00007ffff4b10a79 in glib_worker_main (data=<optimized out>) at ../glib/gmain.c:6455
#5  0x00007ffff4b41893 in g_thread_proxy (data=0x7e45c30) at ../glib/gthread.c:831
        thread = 0x7e45c30
        __func__ = "g_thread_proxy"
#6  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799699960496907273, 140734631876288, -13024, 2, 140737488341296, -5799699960509490185, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 7 (Thread 0x7fff563da6c0 (LWP 129764) "pool-spawner"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff4b685ee in g_cond_wait (cond=0x7e54438, mutex=0x7e54430) at ../glib/gthread-posix.c:1475
        sampled = 1
#2  0x00007ffff4ade04b in g_async_queue_pop_intern_unlocked (queue=0x7e54430, wait=1, end_time=-1) at ../glib/gasyncqueue.c:425
        retval = <optimized out>
        __func__ = "g_async_queue_pop_intern_unlocked"
#3  0x00007ffff4b43473 in g_thread_pool_spawn_thread (data=<optimized out>) at ../glib/gthreadpool.c:311
        spawn_thread_data = <optimized out>
        thread = 0x0
        error = 0x0
        prgname = <optimized out>
        name = "pool-rpcs3\000\000\000\000\000"
#4  0x00007ffff4b41893 in g_thread_proxy (data=0x7e50470) at ../glib/gthread.c:831
        thread = 0x7e50470
        __func__ = "g_thread_proxy"
#5  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799698860448408585, 140734640268992, -13024, 2, 140737488341520, -5799698860460991497, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fff7175e6c0 (LWP 129759) "rpcs3"):
#0  0x00007ffff58f8413 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fff7175aa90, rem=0x7fff7175aa90) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        r = <optimized out>
#1  0x00007ffff58fceb7 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
        ret = <optimized out>
#2  0x00000000007bf651 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<logs::file_writer::file_writer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)::{lambda()#1}> > >::_M_run() ()
#3  0x00007ffff5ae31f3 in std::execute_native_thread_routine(void*) (__p=0x7e054f0) at ../../../../../libstdc++-v3/src/c++11/thread.cc:104
#4  0x00007ffff58ae907 in start_thread (arg=<optimized out>) at pthread_create.c:444
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312908816, -5799763252745593865, 140735096940224, -13024, 29, 140737488343472, -5799763252758176777, -5800051438762451977}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#5  0x00007ffff5934870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fff71f5f6c0 (LWP 129758) "..pool"):
#0  0x00007ffff58ae786 in start_thread (arg=<optimized out>) at pthread_create.c:461
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 0, 2731503684151363669, -1711148465952057245, 1135053654550465436, -4212756811591183740, -8554314274326255552, 5252885090958264519}, mask_was_saved = -1020738429}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#1  0xe840c78948f92164 in  ()
#2  0x0fc08548f87d4b1c in  ()
#3  0xc589480000001284 in  ()
#4  0x8948f87d7d3ae840 in  ()
#5  0x48e5ff28c48348c7 in  ()
#6  0x00000000c328c483 in  ()
#7  0x0000000000000000 in  ()

Thread 1 (Thread 0x7ffff1f6eb40 (LWP 129750) "rpcs3"):
#0  0x00007ffff58ab1d9 in __futex_abstimed_wait_common64 (private=128, cancel=true, abstime=0x0, op=265, expected=129758, futex_word=0x7fff71f5f990) at futex-internal.c:57
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
        err = <optimized out>
        clockbit = 256
        op = 265
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fff71f5f990, expected=129758, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128, cancel=cancel@entry=true) at futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 265
#2  0x00007ffff58ab25f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fff71f5f990, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128) at futex-internal.c:139
#3  0x00007ffff58b05e3 in __pthread_clockjoin_ex (threadid=140735105332928, thread_return=0x0, clockid=0, abstime=0x0, block=<optimized out>) at pthread_join_common.c:102
        ret = <optimized out>
        _buffer = {__routine = 0x7ffff58b04c0 <cleanup>, __arg = 0x7fff71f5fce0, __canceltype = 0, __prev = 0x0}
        tid = <optimized out>
        pd = 0x7fff71f5f6c0
        self = <optimized out>
        result = 0
        pd_result = <optimized out>
#4  0x000000000080ccc0 in thread_base::finalize(unsigned long)::{lambda()#2}::operator()() const::{lambda()#1}::_FUN() ()
#5  0x00007ffff58621a6 in __run_exit_handlers (status=0, listp=<optimized out>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:111
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
        arg = <optimized out>
        f = <optimized out>
        new_exitfn_called = 13500
        cur = 0x7d93170
#6  0x00007ffff58622ee in __GI_exit (status=<optimized out>) at exit.c:141
#7  0x00007ffff5849b51 in __libc_start_call_main (main=main@entry=0x4a2b10 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffded8) at ../sysdeps/nptl/libc_start_call_main.h:74
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488346840, -5800065569483121673, 1, 0, 140737354125312, 68533104, -5800065569367778313, -5800051454184121353}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x1, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 1}}}
        not_first_call = <optimized out>
#8  0x00007ffff5849c0b in __libc_start_main_impl (main=0x4a2b10 <main>, argc=1, argv=0x7fffffffded8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdec8) at ../csu/libc-start.c:360
#9  0x0000000000680875 in _start ()

MastaG avatar Jul 07 '23 14:07 MastaG

@MastaG can this be rechecked on latest build

Mrlinkwii avatar Jan 01 '24 15:01 Mrlinkwii

This is pointless if you're not using an official build anyway

Megamouse avatar Jan 01 '24 19:01 Megamouse

If I remember correctly this was a Qt Wayland vs NVIDIA bug. It had nothing to do with the emulator itself. I think it should be fixed with the latest 545 driver series and Qt6. Will report back.

MastaG avatar Jan 01 '24 19:01 MastaG