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

Vulkan Crash on Slackware64-current #5040

Closed
khronosschoty opened this issue Jun 8, 2017 · 5 comments
Closed

Vulkan Crash on Slackware64-current #5040

khronosschoty opened this issue Jun 8, 2017 · 5 comments

Comments

@khronosschoty
Copy link

khronosschoty commented Jun 8, 2017

Description

Retroarch crashes when using Vulkan driver.

[Description of the bug]
Opening a terminal such as /dev/tty1 and running Retroarch from there with Vulkan causes Retroarch to segfault.

Expected behavior

Retroarch to to present user with UI.

[What you expected to happen]
Retroarch to to present user with UI.

Actual behavior

Retroarch segfaults

Steps to reproduce the bug

  1. Start Retroarch from the terminal using Vulkan driver.

gdb backtrace

GNU gdb (GDB) 8.0
Copyright (C) 2017 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-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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...done.
(gdb) run
Starting program: /usr/games/retroarch 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffec4fd700 (LWP 3326)]

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000058f08d in vulkan_context_init (vk=0x1666550, type=VULKAN_WSI_DISPLAY) at gfx/common/vulkan_common.c:1726
#2  0x000000000075272a in gfx_ctx_khr_display_init (video_info=0x7fffffffc590, video_driver=0x1664840) at gfx/drivers_context/khr_display_ctx.c:60
#3  0x000000000045971e in video_context_driver_init (data=0x1664840, ctx=0xc37240 <gfx_ctx_khr_display>, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, 
    major=1, minor=0, hw_render_ctx=false) at gfx/video_driver.c:2719
#4  0x0000000000459895 in video_context_driver_find_driver (data=0x1664840, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, major=1, minor=0, 
    hw_render_ctx=false) at gfx/video_driver.c:2767
#5  0x0000000000459916 in video_context_driver_init_first (data=0x1664840, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, major=1, minor=0, 
    hw_render_ctx=false) at gfx/video_driver.c:2796
#6  0x0000000000583de2 in vulkan_get_context (vk=0x1664840) at gfx/drivers/vulkan.c:68
#7  0x0000000000586a72 in vulkan_init (video=0x7fffffffc840, input=0xc774a0 <current_input>, input_data=0xc774a8 <current_input_data>)
    at gfx/drivers/vulkan.c:1105
#8  0x0000000000456631 in video_driver_init_internal (video_is_threaded=0x7fffffffc907) at gfx/video_driver.c:1026
#9  0x0000000000457a90 in video_driver_init (video_is_threaded=0x7fffffffc907) at gfx/video_driver.c:1733
#10 0x000000000045bee3 in drivers_init (flags=255) at driver.c:327
#11 0x0000000000419dbd in retroarch_main_init (argc=1, argv=0x7fffffffe138) at retroarch.c:1278
#12 0x000000000042f857 in content_load (info=0x7fffffffe000) at tasks/task_content.c:277
#13 0x0000000000430a02 in task_load_content (content_info=0x7fffffffe000, content_ctx=0x7fffffffdf20, launched_from_menu=true, launched_from_cli=true, 
    error_string=0x7fffffffdf18) at tasks/task_content.c:822
#14 0x0000000000431dd3 in task_load_content_callback (content_info=0x7fffffffe000, loading_from_menu=true, loading_from_cli=true) at tasks/task_content.c:1474
#15 0x0000000000431f40 in task_push_load_content_from_cli (core_path=0x0, fullpath=0x0, content_info=0x7fffffffe000, type=CORE_TYPE_PLAIN, cb=0x0, 
    user_data=0x0) at tasks/task_content.c:1537
#16 0x00000000004162a6 in rarch_main (argc=1, argv=0x7fffffffe138, data=0x0) at frontend/frontend.c:113
#17 0x0000000000416329 in main (argc=1, argv=0x7fffffffe138) at frontend/frontend.c:149
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x000000000058f08d in vulkan_context_init (vk=0x1666550, type=VULKAN_WSI_DISPLAY) at gfx/common/vulkan_common.c:1726
        info = {sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, pNext = 0x0, flags = 14, pfnCallback = 0x58b4a1 <vulkan_debug_cb>, 
          pUserData = 0x0}
        i = 0
        res = VK_SUCCESS
        info = {sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, pNext = 0x0, flags = 0, pApplicationInfo = 0x7fffffffc480, enabledLayerCount = 1, 
          ppEnabledLayerNames = 0xc460a0 <instance_layers>, enabledExtensionCount = 0, ppEnabledExtensionNames = 0x0}
        app = {sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, pNext = 0x0, pApplicationName = 0x8f3610 "RetroArch", applicationVersion = 0, 
          pEngineName = 0x8f3610 "RetroArch", engineVersion = 0, apiVersion = 4194322}
        instance_extensions = {0x8f3460 "VK_EXT_debug_report", 0x8f3474 "VK_KHR_surface", 0x8f3500 "VK_KHR_display", 
          0x3 <error: Cannot access memory at address 0x3>}
        ext_count = 3
        instance_layers = {0x8f3ac8 "VK_LAYER_LUNARG_standard_validation"}
        use_instance_ext = false
        iface = 0x0
        GetInstanceProcAddr = 0x7fffebae4b80 <vkGetInstanceProcAddr>
#2  0x000000000075272a in gfx_ctx_khr_display_init (video_info=0x7fffffffc590, video_driver=0x1664840) at gfx/drivers_context/khr_display_ctx.c:60
        khr = 0x1666550
#3  0x000000000045971e in video_context_driver_init (data=0x1664840, ctx=0xc37240 <gfx_ctx_khr_display>, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, 
    major=1, minor=0, hw_render_ctx=false) at gfx/video_driver.c:2719
        video_info = {input_driver_nonblock_state = false, shared_context = false, black_frame_insertion = false, hard_sync = false, fps_show = false, 
          scale_integer = false, post_filter_record = false, windowed_fullscreen = true, fullscreen = true, font_enable = true, use_rgba = false, 
          libretro_running = false, xmb_shadows_enable = true, battery_level_enable = true, timedate_enable = true, runloop_is_slowmotion = false, 
          runloop_is_idle = false, runloop_is_paused = false, is_perfcnt_enable = false, menu_is_alive = false, custom_vp_x = 0, custom_vp_y = 0, 
          hard_sync_frames = 0, aspect_ratio_idx = 21, max_swapchain_images = 3, monitor_index = 0, width = 0, height = 0, xmb_theme = 0, xmb_color_theme = 1, 
          menu_shader_pipeline = 4, materialui_color_theme = 0, custom_vp_width = 960, custom_vp_height = 720, custom_vp_full_width = 0, 
          custom_vp_full_height = 0, menu_wallpaper_opacity = 0.300000012, refresh_rate = 59.8802414, 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, menu_header_opacity = 1, menu_footer_opacity = 1, 
          xmb_alpha_factor = 75, 
          fps_text = "\000\177\000\000\301\071\000\000\000\200\377\377a\321\374\367\377\177\000\000\000\001\000\000\000\000\000\000p\306\377\377\000\000\000\000w\306\377\377\377\177\000\000h\321\374\367\377\177\000\000\000\000\000\000\347\245\005\030\000\000\000\000\000\000\000\000\200\307\377\377\377\177\000\000P\273E\000\000\000\000\000a\321\374\367\377\177\000\000i\000\000\000\000\000\000\000\000+\022\361\377\177\000\000?RE\000\000\000\000\000\367\351\215\000\000\000\000\000_\324\374", <incomplete sequence \367>, cb_update_window_title = 0x0, cb_swap_buffers = 0x0, cb_get_metrics = 0x0, cb_set_resize = 0x0, cb_shader_use = 0x0, 
          cb_shader_set_mvp = 0x0, context_data = 0x0, shader_data = 0x0}
        ctx_data = 0x0
#4  0x0000000000459895 in video_context_driver_find_driver (data=0x1664840, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, major=1, minor=0, 
    hw_render_ctx=false) at gfx/video_driver.c:2767
        ctx = 0x0
        i = 4
#5  0x0000000000459916 in video_context_driver_init_first (data=0x1664840, ident=0x7ffff7fcd45f "", api=GFX_CTX_VULKAN_API, major=1, minor=0, 
    hw_render_ctx=false) at gfx/video_driver.c:2796
No locals.
#6  0x0000000000583de2 in vulkan_get_context (vk=0x1664840) at gfx/drivers/vulkan.c:68
        major = 1
        minor = 0
        settings = 0x7ffff7fca010
        api = GFX_CTX_VULKAN_API
#7  0x0000000000586a72 in vulkan_init (video=0x7fffffffc840, input=0xc774a0 <current_input>, input_data=0xc774a8 <current_input_data>)
    at gfx/drivers/vulkan.c:1105
        mode = {width = 0, height = 0, fullscreen = 224}
        inp = {input = 0x7d4067, input_data = 0x559e31 <slock_unlock+31>}
        interval = 0
        full_x = 32767
        full_y = 4294952992
        win_width = 0
        win_height = 0
        temp_width = 0
        temp_height = 0
        ctx_driver = 0x0
        vk = 0x1664840
#8  0x0000000000456631 in video_driver_init_internal (video_is_threaded=0x7fffffffc907) at gfx/video_driver.c:1026
        video = {width = 0, height = 0, fullscreen = true, vsync = true, force_aspect = true, swap_interval = 1, font_enable = true, smooth = true, 
          is_threaded = false, input_scale = 2, rgb32 = false}
        max_dim = 320
        scale = 2
        width = 0
        height = 0
        tmp = 0xc455c0 <input_udev>
        geom = 0xc775a0 <video_driver_av_info>
        system = 0x0
        dummy_pixels = {0 <repeats 32 times>}
        custom_vp = 0xc7b6d0 <video_viewport_custom>
        settings = 0x7ffff7fca010
        av_info = 0xc775a0 <video_driver_av_info>
#9  0x0000000000457a90 in video_driver_init (video_is_threaded=0x7fffffffc907) at gfx/video_driver.c:1733
No locals.
#10 0x000000000045bee3 in drivers_init (flags=255) at driver.c:327
        hwr = 0xc7b720 <hw_render>
        video_is_threaded = false
#11 0x0000000000419dbd in retroarch_main_init (argc=1, argv=0x7fffffffe138) at retroarch.c:1278
        init_failed = false
#12 0x000000000042f857 in content_load (info=0x7fffffffe000) at tasks/task_content.c:277
        i = 32767
        retval = true
        rarch_argc = 0
        rarch_argv = {0x0 <repeats 32 times>}
        argv_copy = {0x0 <repeats 32 times>}
        rarch_argv_ptr = 0x7fffffffe138
        rarch_argc_ptr = 0x7fffffffe000
        wrap_args = 0x164de90
#13 0x0000000000430a02 in task_load_content (content_info=0x7fffffffe000, content_ctx=0x7fffffffdf20, launched_from_menu=true, launched_from_cli=true, 
    error_string=0x7fffffffdf18) at tasks/task_content.c:822
        name = '\000' <repeats 133 times>, "\377\000\000\000\000\000\377\377", '\000' <repeats 19 times>, "\360*\022\361\377\177\000\000\360*\022\361\377\177\000\000@\000\000\000\000\000\000\000\340\336\377\377\377\177\000\000\000\000\000\000\000\000\000\003"...
        msg = "\000\334\377\377\377\177\000\000([\370\367\001\000\000\000\240\016\371\367\377\177\000\000\204\002\327\360\377\177\000\000S3\230\006\000\000\000\000P\341\377\367\377\177\000\000\320e\326\360\377\177\000\000\240\016\371\367\377\177\000\000\245\362K\v", '\000' <repeats 12 times>, "\250\344\377\367\377\177\000\000P\335\377\377\377\177\000\000@\335\377\377\377\177\000\000\000\000\000\000\001\000\000\000P\341\377\367\377\177\000\000\070\225@\000\000\000\000\000ta\337\003\000\000\000\000\340[\364\364\377\177\000\000hj\326\360\377\177\000\000h \022\361\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\070\341\377\377\377\177\000\000H\341\377\377\377\177\000\000 <\022\361\377\177\000\000"...
        contentless = false
        is_inited = false
#14 0x0000000000431dd3 in task_load_content_callback (content_info=0x7fffffffe000, loading_from_menu=true, loading_from_cli=true) at tasks/task_content.c:1474
        content_ctx = {subsystem = {data = 0x0, size = 0}, name_ips = 0x0, name_bps = 0x0, name_ups = 0x0, valid_extensions = 0x0, directory_cache = 0x0, 
          directory_system = 0x0, is_ips_pref = false, is_bps_pref = false, is_ups_pref = false, history_list_enable = false, block_extract = false, 
          need_fullpath = false, set_supports_no_game_enable = false, patch_is_blocked = false, bios_is_missing = false, 
          check_firmware_before_loading = false, temporary_content = 0xc417a8}
        ret = false
        error_string = 0x0
        global = 0xc487c0 <g_extern>
        settings = 0x7ffff7fca010
#15 0x0000000000431f40 in task_push_load_content_from_cli (core_path=0x0, fullpath=0x0, content_info=0x7fffffffe000, type=CORE_TYPE_PLAIN, cb=0x0, 
    user_data=0x0) at tasks/task_content.c:1537
No locals.
#16 0x00000000004162a6 in rarch_main (argc=1, argv=0x7fffffffe138, data=0x0) at frontend/frontend.c:113
        info = {argc = 1, argv = 0x7fffffffe138, args = 0x0, environ_get = 0x415844 <frontend_linux_get_env>}
        args = 0x0
#17 0x0000000000416329 in main (argc=1, argv=0x7fffffffe138) at frontend/frontend.c:149
No locals.
(gdb) quit
A debugging session is active.

	Inferior 1 [process 3322] will be killed.

Quit anyway? (y or n) y

Version/Commit

v1.6.0/ae98ea721

Environment information

  • OS: Slackware64-current
  • Compiler: Compiler: GCC (5.3.0) 64-bitBuilt: Jun 5 2017
@orbea
Copy link
Contributor

orbea commented Jun 8, 2017

Is this when using KMS or in xorg?

@khronosschoty
Copy link
Author

KMS, with xorg it runs but crashes when core is run.

@orbea
Copy link
Contributor

orbea commented Dec 20, 2018

Vulkan works for me with KMS, is this still a problem with the current master?

@khronosschoty
Copy link
Author

khronosschoty commented Dec 20, 2018

KMS just silently fails for me now with RetroArch from the current master. Core options only have software and hardware as options with "beetle-psx-libretro (2018.11.26_a081f34)" and beetle-psx-libretro as found in its master tree right now. Starting RetroArch inside of X, however, and choosing vulkan video driver and hardware in core options no longer leads to segfaults and works nicely.

Update: Never mind the issue with KMS -- I was using x input driver; changed that to udev and everything seems to work.

@orbea
Copy link
Contributor

orbea commented Dec 20, 2018

Okay, cool, glad to hear this works. I'm going to close this issue as a result. I can also reproduce that beetle-psx with radv works in KMS here, it should automatically use vulkan or opengl accordingly depending on the RetroArch video driver assuming its built with the correct support.

@orbea orbea closed this as completed Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants