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

segmentation fault on start of examples on wayland #4095

Closed
ruabmbua opened this issue Aug 28, 2023 · 3 comments
Closed

segmentation fault on start of examples on wayland #4095

ruabmbua opened this issue Aug 28, 2023 · 3 comments

Comments

@ruabmbua
Copy link

Description
Pretty much all examples crash on swapchain creation, when running on wayland.

Repro steps
Just run one of the examples with graphical output on linux + wayland.

Expected vs observed behavior

I observe the following crash:

#0  0x00007ffff7fb69d4 in wl_proxy_get_version () from /usr/lib/libwayland-client.so
#1  0x00007ffff7190eca in ?? () from /usr/lib/libvulkan_radeon.so
#2  0x00007ffff71869cf in ?? () from /usr/lib/libvulkan_radeon.so
#3  0x00007ffff7aeb8ca in ?? () from /usr/lib/libvulkan.so.1
#4  0x00007fffea83887e in DispatchCreateSwapchainKHR (device=0x555557ce71a0, pCreateInfo=0x7fffffff9f20, pAllocator=0x0, pSwapchain=0x7fffffff9be8)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-sdk-1.3.250.0/layers/vulkan/generated/layer_chassis_dispatch.cpp:572
#5  0x00007fffea76f602 in vulkan_layer_chassis::CreateSwapchainKHR (device=0x555557ce71a0, pCreateInfo=0x7fffffff9f20, pAllocator=0x0, pSwapchain=0x7fffffff9be8)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-sdk-1.3.250.0/layers/vulkan/generated/chassis.cpp:5638
#6  0x000055555604789c in ash::extensions::khr::swapchain::Swapchain::create_swapchain (self=0x7fffffff9d30, create_info=0x7fffffff9f20, allocation_callbacks=...)
    at /home/rruckerbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.3+1.3.251/src/extensions/khr/swapchain.rs:54
#7  0x0000555555ed4b62 in wgpu_hal::vulkan::Device::create_swapchain (self=0x555558053c20, surface=0x555557da14f0, config=0x7fffffffb760, provided_old_swapchain=...) at wgpu-hal/src/vulkan/device.rs:606
#8  0x0000555555ee4eb5 in wgpu_hal::vulkan::instance::{impl#5}::configure (self=0x555557da14f0, device=0x555558053c20, config=0x7fffffffb760) at wgpu-hal/src/vulkan/instance.rs:802
#9  0x0000555555a5ec82 in wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::surface_configure<wgpu_core::identity::IdentityManagerFactory, wgpu_hal::vulkan::Api> (self=0x555557c12dc0,
    surface_id=..., device_id=..., config=0x7fffffffc9d8) at wgpu-core/src/device/global.rs:2211
#10 0x0000555555a1195b in wgpu::backend::direct::{impl#7}::surface_configure (self=0x555557c12dc0, surface=0x7fffffffbe50, surface_data=0x555557c46bb0, device=0x7fffffffbe58, _device_data=0x5555580535c0,
    config=0x7fffffffc9d8) at wgpu/src/backend/direct.rs:769
#11 0x0000555555aff167 in wgpu::context::{impl#5}::surface_configure<wgpu::backend::direct::Context> (self=0x555557c12dc0, surface=0x7fffffffd8e8, surface_data=..., device=0x7fffffffc240, device_data=...,
    config=0x7fffffffc9d8) at wgpu/src/context.rs:2192
#12 0x00005555559ed4fc in wgpu::Surface::configure (self=0x7fffffffd8d8, device=0x7fffffffc230, config=0x7fffffffc9d8) at wgpu/src/lib.rs:4724
#13 0x00005555556f5b65 in hello_triangle::run::{async_fn#0} () at examples/hello-triangle/src/main.rs:83
#14 0x0000555555727f4c in core::future::from_generator::{impl#1}::poll<hello_triangle::run::{async_fn_env#0}> (self=..., cx=0x7fffffffcfc8)
    at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91
#15 0x000055555570877a in pollster::block_on<core::future::from_generator::GenFuture<hello_triangle::run::{async_fn_env#0}>> (fut=...)
    at /home/rruckerbauer/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.3.0/src/lib.rs:128
#16 0x000055555574370a in hello_triangle::main () at examples/hello-triangle/src/main.rs:150

I expect no crash, and a working example.

Platform

System:
  Host: rolandryzen Kernel: 6.4.12-arch1-1 arch: x86_64 bits: 64 compiler: gcc
    v: 13.2.1 clocksource: tsc available: hpet,acpi_pm
  Desktop: sway v: 1.8.1 info: swaybar vt: 2 dm: 1: GDM v: 44.1 2: LightDM
    v: 1.32.0 note: stopped Distro: Arch Linux
Graphics:
  Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX] vendor: Sapphire PULSE
    driver: amdgpu v: kernel arch: RDNA-3 code: Navi-3x process: TSMC n5 (5nm)
    built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: DP-1,DP-2 empty: HDMI-A-1,HDMI-A-2 bus-ID: 0c:00.0
    chip-ID: 1002:744c class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.0
    compositor: sway v: 1.8.1 driver: X: loaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu d-rect: 4480x1440
    display-ID: 1
  Monitor-1: DP-1 pos: primary,left model: VG27WQ serial: L4LMDW007654
    built: 2020 res: 2560x1440 hz: 144 dpi: 109 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 720x400
  Monitor-2: DP-2 pos: right model: HP 27 Curved serial: CNC8441FXM
    built: 2018 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2 scale: 1
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: 4.6 Mesa 23.3.0-devel (git-5ce6e09ffc) renderer: AMD
    Radeon RX 7900 XT (gfx1100 LLVM 18.0.0 DRM 3.52 6.4.12-arch1-1)
    direct-render: Yes
@cwfitzgerald
Copy link
Member

@i509VCB any idea?

@ruabmbua
Copy link
Author

b.t.w. its a nullptr dereference, but can`t really tell more without debug symbols of system libraries.

@ruabmbua
Copy link
Author

Good news, its a driver issue! I accidentally tested with the wrong applications (not using wayland). Seems like all my vulkan + wayland apps are broken.

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

2 participants