Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetroArch randomly crashes after the first launch using Vulkan on Wayland (Hyprland) with Nvidia #17025

Open
BenTowali opened this issue Sep 22, 2024 · 4 comments

Comments

@BenTowali
Copy link

Description

The first launch is fine after wiping the retroarch config files, but once I relaunch it launches fine but then a few seconds after it crashes

Expected behavior

Retroarch launches and doesn't crash randomly

Actual behavior

Retroarch launches and then core dumps a few seconds later

Steps to reproduce the bug

  1. Launch retroarch
  2. Wait a few seconds

Bisect Results

After the initial launch, the subsequent launches crash

Version/Commit

  • RetroArch: 1.19.1 (Git 0792144) (from the arch repos, i also tried the flatpak but the same thing occured)

Environment information

  • OS: Arch Linux
  • Nvidia Drivers: 560.35.03-6

Launching retroarch verbosely

╭─ ~                                                                                                                                                       7s
╰─❯ retroarch -v
[INFO] [Config]: Looking for config in: "/home/ben/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.19.1 (Git 0792144fe3)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2
[INFO] Version: 1.19.1
[INFO] Git: 0792144fe3
[INFO] Built: Jun 16 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[ERROR] Couldn't find any cloud sync driver named ""
[INFO] Available cloud sync drivers are:
[INFO] 	webdav
[INFO] 	null
[WARN] Going to default to first cloud sync driver...
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Set video size to: 960x720.
[INFO] [Wayland]: fractional_scale_v1 enabled
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: "vk_wayland".
[INFO] [Vulkan]: Detecting screen resolution: 1920x1080.
[INFO] [Vulkan]: Found GPU at index 0: "NVIDIA GeForce GTX 1070 Ti".
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using fences for WSI acquire.
[INFO] [Vulkan]: Using GPU: "NVIDIA GeForce GTX 1070 Ti".
[INFO] [Vulkan]: Queue family 0 supports 16 sub-queues.
[INFO] [Vulkan]: Got 3 swapchain images.
[INFO] [Vulkan]: Using resolution 960x720.
[INFO] [Vulkan]: Using RGB565 format.
[INFO] [Vulkan]: Loading stock shader.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Wayland]: Enabling idle inhibitor
[INFO] [Video]: Found display server: "null".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.12
[INFO] [Microphone]: Initialized microphone driver.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Playlist]: Loading history file: "/home/ben/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/ben/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/ben/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/ben/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/home/ben/.config/retroarch/content_favorites.lpl".
[INFO] [PulseAudio]: Pausing.
zsh: segmentation fault (core dumped)  retroarch -v

Journalctl

...skipping...
                                               #2  0x00007dd678234795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                               #3  0x00007dd65d8492fe n/a (libdconfsettings.so + 0x62fe)
                                               #4  0x00007dd6782651b6 n/a (libglib-2.0.so.0 + 0x8d1b6)
                                               #5  0x00007dd678bab39d n/a (libc.so.6 + 0x9439d)
                                               #6  0x00007dd678c3049c n/a (libc.so.6 + 0x11949c)

                                               Stack trace of thread 13308:
                                               #0  0x00007dd678c2263d __poll (libc.so.6 + 0x10b63d)
                                               #1  0x00007dd678297e0d n/a (libglib-2.0.so.0 + 0xbfe0d)
                                               #2  0x00007dd678234795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                               #3  0x00007dd6782347f2 n/a (libglib-2.0.so.0 + 0x5c7f2)
                                               #4  0x00007dd6782651b6 n/a (libglib-2.0.so.0 + 0x8d1b6)
                                               #5  0x00007dd678bab39d n/a (libc.so.6 + 0x9439d)
                                               #6  0x00007dd678c3049c n/a (libc.so.6 + 0x11949c)

                                               Stack trace of thread 13315:
                                               #0  0x00007dd678ba7a19 n/a (libc.so.6 + 0x90a19)
                                               #1  0x00007dd678baa479 pthread_cond_wait (libc.so.6 + 0x93479)
                                               #2  0x00007dd6527fc87c n/a (libnvidia-glcore.so.560.35.03 + 0x9fc87c)
                                               #3  0x00007dd652c2af55 n/a (libnvidia-glcore.so.560.35.03 + 0xe2af55)
                                               #4  0x00007dd6527fee04 n/a (libnvidia-glcore.so.560.35.03 + 0x9fee04)
                                               #5  0x00007dd678bab39d n/a (libc.so.6 + 0x9439d)
                                               #6  0x00007dd678c3049c n/a (libc.so.6 + 0x11949c)

                                               Stack trace of thread 13319:
                                               #0  0x00007dd678ba7a19 n/a (libc.so.6 + 0x90a19)
                                               #1  0x00007dd678baa7e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                               #2  0x00007dd6527fc8dc n/a (libnvidia-glcore.so.560.35.03 + 0x9fc8dc)
                                               #3  0x00007dd652d3188c n/a (libnvidia-glcore.so.560.35.03 + 0xf3188c)
                                               #4  0x00007dd652d1e9b6 n/a (libnvidia-glcore.so.560.35.03 + 0xf1e9b6)
                                               #5  0x00007dd6527fee04 n/a (libnvidia-glcore.so.560.35.03 + 0x9fee04)
                                               #6  0x00007dd678bab39d n/a (libc.so.6 + 0x9439d)
                                               #7  0x00007dd678c3049c n/a (libc.so.6 + 0x11949c)
                                               ELF object binary architecture: AMD x86-64
Sep 22 20:29:42 benPC systemd[1]: [email protected]: Deactivated successfully.
Sep 22 20:29:42 benPC systemd[1]: [email protected]: Consumed 646ms CPU time, 409M memory peak.
@viachaslavic
Copy link
Contributor

Which wayland compositor are you using?

@BenTowali
Copy link
Author

Which wayland compositor are you using?

╭─ ~
╰─❯ hyprctl version
Hyprland, built from branch  at commit 0f594732b063a90d44df8c5d402d658f27471dfe  (props: bump version to 0.43.0).
Date: Sun Sep 8 16:48:21 2024
Tag: v0.43.0, commits: 5196

flags: (if any)

@gouchi
Copy link
Member

gouchi commented Sep 23, 2024

Hi @BenTowali,

Please rename the issue with precise information to something like

RetroArch randomly crashes after the first launch using Vulkan on Wayland (Hyprland) with Nvidia

Also if possible, can you provide some debug log following this documentation ? At least with

git clone  https://github.com/libretro/RetroArch.git
cd RetroArch
./configure && make DEBUG=1  -j$(nproc)
gdb ./retroarch

Then enter r to launch RA then bt full when you get the crash.

Thank you.

@BenTowali BenTowali changed the title Retroarch randomly crashes after the first launch RetroArch randomly crashes after the first launch using Vulkan on Wayland (Hyprland) with Nvidia Sep 23, 2024
@BenTowali
Copy link
Author

Then enter r to launch RA then bt full when you get the crash.

I ran it with my system binary in /usr/bin/retroarch like so: gdb retroarch

And this is the output

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x00007fffcd410857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
(gdb) bt full
#0  0x00007fffcd410857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
No symbol table info available.
#1  0x00007fffcd8279e9 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
No symbol table info available.
#2  0x00007fffcd80d380 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
No symbol table info available.
#3  0x00007fffcd74b78e in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
No symbol table info available.
#4  0x000055555589d75a in vulkan_acquire_next_image (vk=0x5555564f8348) at gfx/common/vulkan_common.c:1851
        index = <optimized out>
        fence_info = {sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, pNext = 0x0, flags = 0}
        sem_info = {sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, pNext = 0x0, flags = 0}
        err = VK_SUCCESS
        fence = 0x5555565ec040
        semaphore = 0x0
        is_retrying = false
        __PRETTY_FUNCTION__ = "vulkan_acquire_next_image"
#5  0x000055555587591a in gfx_ctx_wl_swap_buffers (data=0x5555564f8120) at gfx/drivers_context/wayland_vk_ctx.c:278
        wl = 0x5555564f8120
#6  0x00005555558a3b0d in vulkan_frame (data=<optimized out>, frame=<optimized out>, frame_width=<optimized out>, frame_height=<optimized out>,
    frame_count=419, pitch=<optimized out>, msg=0x55555631e500 <video_driver_msg> "", video_info=0x7fffffff9730) at gfx/drivers/vulkan.c:4979
        i = <optimized out>
        j = <optimized out>
        k = <optimized out>
        submit_info = {sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, pNext = 0x0, waitSemaphoreCount = 0, pWaitSemaphores = 0x0, pWaitDstStageMask = 0x0,
          commandBufferCount = 1, pCommandBuffers = 0x555556506b08, signalSemaphoreCount = 1, pSignalSemaphores = 0x7fffffff94b0}
        clear_color = {color = {float32 = {0, 0, 0, 0}, int32 = {0, 0, 0, 0}, uint32 = {0, 0, 0, 0}}, depthStencil = {depth = 0, stencil = 0}}
        rp_info = {sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, pNext = 0x0, renderPass = 0x5555566fbd00, framebuffer = 0x555556690c40, renderArea = {
            offset = {x = 0, y = 0}, extent = {width = 941, height = 1018}}, clearValueCount = 1, pClearValues = 0x7fffffff94c0}
        begin_info = {sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, pNext = 0x0, flags = 1, pInheritanceInfo = 0x0}
        signal_semaphores = {0x555556727560, 0x7ffff7fc8523 <__GI__dl_catch_exception+163>}
        vk = <optimized out>
        waits_for_semaphores = <optimized out>
        width = 941
        height = 1018
        statistics_show = false
        stat_text = 0x7fffffff981a "\377\377\377\177"
        black_frame_insertion = 0
        bfi_light_frames = <optimized out>
        n = <optimized out>
        input_driver_nonblock_state = false
        runloop_is_slowmotion = false
        runloop_is_paused = false
        video_width = 941
        video_height = 1018
        osd_params = 0x7fffffff97ec
        menu_is_alive = <optimized out>
        widgets_active = true
        frame_index = <optimized out>
        swapchain_index = 2
        overlay_behind_menu = <optimized out>
        use_main_buffer = false
        chain = <optimized out>
        backbuffer = 0x5555565069e0
        manager = <optimized out>
        buff_chain_vbo = <optimized out>
        buff_chain_ubo = <optimized out>
        video_hdr_enable = <optimized out>
        wait_stage = 1024
#7  0x00005555556df4f7 in video_driver_frame (data=<optimized out>, width=<optimized out>, height=4, pitch=<optimized out>) at gfx/video_driver.c:3927
        status_text = "\000\000\000\000\374\020\000\000\376\020\000\000\001\177\000\000\371\020\000\000\373\020\000\000\001)\375\367\366\020\000\000\370\020\000\000\001\177\000\000\002\021\000\000\004\021\000\000\000\226\377\377\032\021\000\000\034\021\000\000\000\177\000\000\024\021\000\000\026\021\000\000\000\000\000\000\v\021\000\000\r\021\000\000\000\000\000\000\016\021\000\000\020\021\000\000\000\221\305W\027\021\000\000\031\021\000\000\000\000\000\000\377\020\000\000\001\021\000\000\000\363\274UUU\000"
        render_frame = <optimized out>
        new_time = <optimized out>
        video_info = {userdata = 0x555556505910, widgets_userdata = 0x555556268960 <dispwidget_st.lto_priv>,
          disp_userdata = 0x5555562f5500 <dispgfx_st.lto_priv>, custom_vp_x = 0, custom_vp_y = 0, crt_switch_center_adjust = 0, crt_switch_porch_adjust = 0,
          hard_sync_frames = 0, runahead_frames = 1, aspect_ratio_idx = 22, max_swapchain_images = 3, monitor_index = 0, crt_switch_resolution = 0,
          crt_switch_resolution_super = 2560, width = 941, height = 1018, xmb_theme = 0, xmb_color_theme = 4, menu_shader_pipeline = 2,
          materialui_color_theme = 9, ozone_color_theme = 12, custom_vp_width = 960, custom_vp_height = 720, custom_vp_full_width = 0,
          custom_vp_full_height = 0, black_frame_insertion = 0, bfi_dark_frames = 1, shader_subframes = 1, current_subframe = 0, fps_update_interval = 256,
--Type <RET> for more, q to quit, c to continue without paging--
          memory_update_interval = 256, msg_queue_delay = 0, menu_wallpaper_opacity = 0.899999976, menu_framebuffer_opacity = 0.899999976,
          menu_header_opacity = 1, menu_footer_opacity = 1, refresh_rate = 60, font_size = 32, font_msg_pos_x = 0.0500000007, font_msg_pos_y = 0.0500000007,
          font_msg_color_r = 1, font_msg_color_g = 1, font_msg_color_b = 0, xmb_alpha_factor = 90, osd_stat_params = {drop_x = 32767, drop_y = 0, color = 0,
            x = -nan(0x7f9a50), y = 4.59163468e-41, scale = -nan(0x7f9a00), drop_mod = 4.59163468e-41, drop_alpha = -nan(0x7f99f8),
            text_align = (TEXT_ALIGN_RIGHT | TEXT_ALIGN_CENTER | unknown: 0x7ffc), full_screen = 2}, video_st_flags = 164864, menu_st_flags = 1057,
          stat_text = "\377\377\377\177\000\000P\230\377\377\377\177\000\000\024\357\311\362\377\177\000\000p\230\377\377\377\177\000\000\000\2352\017\302EsR\000\000\001\001\000\001\001\000W\245\305WUU\000\000P\177.WUU\000\000\000\020\000\000\000\000\000\000p\t.XUU\000\000p\017\204UUU\000\000\300\230\377\377\377\177\000\000\"̸UUU\000\000Щ\377\377p\000\000\000\000\2352\017\302EsR\020{jVUU\000\000\240\221\305WUU\000\000\300\230\377\377\377\177\000\000\000\2352\017\302EsR\020\t.XUU\000\000\020\t.XUU\000\000p\231\377\377\377\177\000\000'r\177UUU\000\000R\000\000\000\000\000\000\000P$^V\000\345\001\016@\231\377", '\000' <repeats 13 times>..., widgets_active = true, notifications_hidden = false, menu_mouse_enable = true, input_menu_swap_ok_cancel_buttons = false,
          input_driver_nonblock_state = false, input_driver_grab_mouse_state = false, hard_sync = false, runahead = false, runahead_second_instance = true,
          preemptive_frames = false, fps_show = false, memory_show = false, statistics_show = false, framecount_show = false, core_status_msg_show = false,
          post_filter_record = false, windowed_fullscreen = true, fullscreen = false, font_enable = true, hdr_support = 85, libretro_running = false,
          xmb_shadows_enable = true, battery_level_enable = false, timedate_enable = true, runloop_is_slowmotion = false, runloop_is_paused = false,
          fastforward_frameskip = true, frame_rest = false, msg_bgcolor_enable = false, crt_switch_hires_menu = false, hdr_enable = false,
          overlay_behind_menu = false, scan_subframes = false}
        buf_pos = <optimized out>
        video_st = <optimized out>
        runloop_st = <optimized out>
        video_driver_pix_fmt = <optimized out>
        runloop_idle = <optimized out>
        video_driver_active = <optimized out>
        p_dispwidget = <optimized out>
        widgets_active = true
        recording_st = <optimized out>
        video_driver_msg = '\000' <repeats 255 times>
        last_fps = 59.946888
        last_frame_duped = false
        frame_time_accumulator = 0
        last_time = 29261051562
        nonblock_active = 0 '\000'
        fps_time = 29261051562
        frame_time = 16430
        last_total_memory = 0
        last_used_memory = 0
        curr_time = 29258338185
#8  0x00005555556ddf92 in video_driver_cached_frame () at gfx/video_driver.c:2482
        runloop_st = <optimized out>
        recording_st = <optimized out>
        video_st = <optimized out>
        recording = 0x0
        cbs = <optimized out>
#9  0x000055555560d7dd in runloop_check_state (error_on_init=false, settings=settings@entry=0x7fffd7a18010, current_time=current_time@entry=29261051545)
    at /usr/src/debug/retroarch/RetroArch/runloop.c:6042
        runloop_is_inited = <optimized out>
        menu_pause_libretro = <optimized out>
        libretro_running = <optimized out>
        action = <optimized out>
        menu_st = <optimized out>
        focused = true
        trigger_input = {data = {0, 0, 0, 0, 0, 0, 0, 0}, analogs = {0, 0, 0, 0, 0, 0, 0, 0}, analog_buttons = {0 <repeats 16 times>}}
        screensaver_timeout = <optimized out>
        old_input = <optimized out>
        old_action = <optimized out>
        content_info = <optimized out>
        current_bits = {data = {0, 0, 0, 0, 0, 0, 0, 0}, analogs = {0, 0, 0, 0, 0, 0, 0, 0}, analog_buttons = {0 <repeats 16 times>}}
        uico_st = <optimized out>
        input_st = <optimized out>
        video_st = <optimized out>
        p_disp = <optimized out>
        runloop_st = <optimized out>
        cbs = <optimized out>
        is_focused = true
        is_alive = <optimized out>
        frame_count = <optimized out>
        focused = <optimized out>
        rarch_is_initialized = <optimized out>
        runloop_paused = false
        pause_nonactive = true
        quit_gamepad_combo = <optimized out>
        menu_st = <optimized out>
        menu = 0x5555572d8e90
        menu_toggle_gamepad_combo = <optimized out>
        menu_driver_binding_state = <optimized out>
        menu_was_alive = 33
        display_kb = false
        p_dispwidget = <optimized out>
        widgets_active = true
        cheevos_hardcore_active = false
        last_input = {data = {0, 0, 0, 0, 0, 0, 0, 0}, analogs = {0, 0, 0, 0, 0, 0, 0, 0}, analog_buttons = {0 <repeats 16 times>}}
        runloop_paused_hotkey = false
        old_pressed = false
        old_pressed = false
        last_controller_connected = false
        old_pressed = false
        last_width = 0
        last_height = 0
        old_pressed = false
        last_width = 0
        last_height = 0
        quit_key = false
        old_quit_key = false
        quit_key_time = 0
        runloop_exec = false
        old_pressed = false
        old_input = {data = {0, 0, 0, 0, 0, 0, 0, 0}, analogs = {0, 0, 0, 0, 0, 0, 0, 0}, analog_buttons = {0 <repeats 16 times>}}
        old_action = MENU_ACTION_NOOP
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        volume_hotkey_delay = 0
        volume_hotkey_delay_active = 6
        old_pressed = false
        old_pressed = false
        old_rewind_pressed = false
        old_focus = true
        old_pause_pressed = false
        pauseframeadvance = false
        old_pause_pressed = false
        old_frameadvance = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_button_state = false
        old_hold_button_state = false
        old_slowmotion_button_state = false
        old_slowmotion_hold_button_state = false
        old_should_slot_increase = false
        old_should_slot_decrease = false
        old_should_replay_slot_increase = false
        old_should_replay_slot_decrease = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed = false
        old_pressed2 = false
        old_pressed3 = false
        old_pressed = false
        old_pressed2 = false
        old_pressed3 = false
        old_pressed = false
        old_pressed2 = false
        old_pressed3 = false
        need_to_apply = false
        timer = {current = 0, timeout_us = 0, timeout_end = 0, timer_begin = false, timer_end = false}
#10 0x000055555560f7ea in runloop_iterate () at /usr/src/debug/retroarch/RetroArch/runloop.c:6950
        i = <optimized out>
        dpad_mode = {ANALOG_DPAD_NONE <repeats 13 times>, 32767, 254935040, 1383286210}
        input_st = <optimized out>
        audio_st = <optimized out>
        video_st = <optimized out>
        recording_st = <optimized out>
        camera_st = <optimized out>
        settings = <optimized out>
        runloop_st = <optimized out>
        vrr_runloop_enable = <optimized out>
        max_users = <optimized out>
        current_time = <optimized out>
        menu_pause_libretro = <optimized out>
        core_paused = <optimized out>
        slowmotion_ratio = <optimized out>
        cheevos_enable = <optimized out>
        audio_sync = <optimized out>
        discord_st = <optimized out>
#11 0x00005555555ef543 in rarch_main (data=0x0, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/retroarch/RetroArch/retroarch.c:5937
        ret = <optimized out>
        app_exit = false
        p_rarch = <optimized out>
        runloop_st = <optimized out>
        video_st = <optimized out>
        p_rarch = <optimized out>
        runloop_st = <optimized out>
        video_st = <optimized out>
        i = <optimized out>
        info = <optimized out>
        ret = <optimized out>
        app_exit = <optimized out>
#12 main (argc=<optimized out>, argv=<optimized out>) at ui/drivers/ui_qt.cpp:4279
No locals.
(gdb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants