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

Applications crash after a couple seconds using Vulkan backend (NVIDIA Drivers) #2572

Open
4 tasks done
flummi1 opened this issue Sep 8, 2024 · 13 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@flummi1
Copy link

flummi1 commented Sep 8, 2024

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

When I run $cargo run --release --package tour in examples the application opens before crashing a couple seconds later with $fish: Job 1, 'cargo run --release --package t…' terminated by signal SIGSEGV (Address boundary error)
This also happens when I try using Halloy or Sniffnet which both use iced as their gui library. This does not happen with any other Vulkan application that I know of. The wgpu examples work fine, I am able to run steam games using vulkan as the backend perfectly fine.

I am running Arch Linux with Hyprland. I am using the latest Nvidia-open drivers and I am using an RTX 3080.

What is the expected behavior?

Not crashing

Version

master

Operating System

Linux

Do you have any log output?

No response

@flummi1 flummi1 added the bug Something isn't working label Sep 8, 2024
@flummi1
Copy link
Author

flummi1 commented Sep 8, 2024

I thought it might've been an issue with getting mouse movement, so I tried running Bevy examples that interact with the mouse, but those also work perfectly fine. For some reason it's just an issue with Iced.

@leo848
Copy link

leo848 commented Sep 11, 2024

Same drivers, OS and WM and it also does not work. I do not get Address boundary error, but instead just Segmentation fault (core dumped), but I assume that is just a difference between the shells.

@flummi1
Copy link
Author

flummi1 commented Sep 11, 2024

Same drivers, OS and WM and it also does not work. I do not get Address boundary error, but instead just Segmentation fault (core dumped), but I assume that is just a difference between the shells.

Yeah, if I switch to bash I just get a core dump as well.

@ARKye03
Copy link

ARKye03 commented Sep 19, 2024

+1
I'm getting seg faults on my Arch Linux machine while running any app even the example counter
I even installed via AUR the ytdlp-gui, and seg faults too.

Extra info
  • Arch Linux x86_64
  • Linux 6.10.10-zen1-1-zen
  • Wayland (Hyprland)
  • NVIDIA-SMI 560.35.03
    • RTX 3050
    • Driver Version: 560.35.03
    • CUDA Version: 12.6
  • Iced
    • iced_winit v0.13.0
    • iced_glyphon v0.6.0
    • iced_wgpu v0.13.0
    • iced_renderer v0.13.0
    • iced_widget v0.13.1
    • iced v0.13.1

@dtzxporter
Copy link
Contributor

Can someone try testing by forcing vulkan using the environment variable:

WGPU_BACKEND=vulkan

Then running the iced examples? This may be related to a similar issue I've been tracking down.

@ARKye03
Copy link

ARKye03 commented Sep 19, 2024

WGPU_BACKEND=vulkan

Using the env var, the error persists:

Running the counter example:

$ WGPU_BACKEND=vulkan cargo run

after a few seconds, it results in:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/IcedApp`
zsh: segmentation fault (core dumped)  WGPU_BACKEND=vulkan cargo run

It's worth noting that it only segfaults if focused; otherwise, the app stays open. However, once refocused, it does the segfault and other apps using Iced also do segfaults, like the one I mentioned ytdlp-gui.

Video
iced.mp4

@hecrj
Copy link
Member

hecrj commented Sep 19, 2024

Is the issue present in #2510?

@mxtxy
Copy link

mxtxy commented Sep 20, 2024

I can no longer reproduce the issue on my system (Arch running KDE Plamsa Wayland with NVIDIA 560.35.03 drivers) with the current master branch.

@hecrj
Copy link
Member

hecrj commented Sep 20, 2024

I imagine the wgpu update by #2510 fixed it then!

@sirlan-ff00ff
Copy link

can confirm that building from main (at time of writing), and running with WGPU_BACKEND=vulkan cargo run --release --package tour, the tour program runs fine, but without the environment variable it fails to start, with a really long trace message, an excerpt being

Protocol error  4  on object 31wp_linux_drm_syncobj_surface_v1: @ 40 :
 0xProtocol error 78ad46ba2e084 -  on object <unknown>wp_linux_drm_syncobj_surface_v1
@40:
 32:   Protocol error  4  on object 0xwp_linux_drm_syncobj_surface_v178ad46ba2ecc@ - 40__libc_start_main:

Protocol error 4 on object  wp_linux_drm_syncobj_surface_v1 @3340: :
   0x5a0b6b122e35 - _startProtocol error
4 on object wp_linux_drm_syncobj_surface_v1@40:
 34Protocol error : 4  on object  wp_linux_drm_syncobj_surface_v1  @ 40 :
     Protocol error  4  on object  wp_linux_drm_syncobj_surface_v10x@040 - : <unknown>

Protocol error 4 on object wp_linux_drm_syncobj_surface_v1@40:

@Tahinli
Copy link
Contributor

Tahinli commented Nov 8, 2024

I also lived situation and after couple try with messing nvidia drivers I ended up here.

I can also confirm that "WGPU_BACKEND=vulkan" solved my seg fault.

@dtzxporter
Copy link
Contributor

Yeah this is something related to how WGPU initializes and checks every available api before choosing one automatically, I haven't been able to pin it down where it happens and the maintainers couldn't reproduce. They need more info.

@Tahinli
Copy link
Contributor

Tahinli commented Nov 8, 2024

Also tried latest git version of iced right now, there is no problem

42a2cb6

but 0.13.1 has that problem.

I'm using Hyprland and my program was working 1-2 month ago but today I realised there is a problem. Also can't reproduce this problem in KDE Plasma (Wayland), I only encounter in Hyprland. I tried with Nvidia 560 and 565 drivers. I'm using 6.11.6 Kernel and Fedora 41

Here is my core dump

                Module /home/tahinli/Documents/Code/Rust/radioxide/streamer/target/debug/streamer without build-id.
                Module /home/tahinli/Documents/Code/Rust/radioxide/streamer/target/debug/streamer
                Module libwayland-egl.so.1 from rpm wayland-1.23.0-2.fc41.x86_64
                Module libEGL_mesa.so.0 from rpm mesa-24.2.6-1.fc41.x86_64
                Module libnvidia-egl-xlib.so.1 from rpm egl-x11-1.0.0^20240916gitf13be94-1.fc41.x86_64
                Module libnvidia-egl-xcb.so.1 from rpm egl-x11-1.0.0^20240916gitf13be94-1.fc41.x86_64
                Module libpciaccess.so.0 from rpm libpciaccess-0.16-13.fc41.x86_64
                Module libxcb-dri2.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libdrm_intel.so.1 from rpm libdrm-2.4.123-1.fc41.x86_64
                Module libdrm_radeon.so.1 from rpm libdrm-2.4.123-1.fc41.x86_64
                Module libsensors.so.4 from rpm lm_sensors-3.6.0-20.fc41.x86_64
                Module libglapi.so.0 from rpm mesa-24.2.6-1.fc41.x86_64
                Module libgallium-24.2.6.so from rpm mesa-24.2.6-1.fc41.x86_64
                Module libgbm.so.1 from rpm mesa-24.2.6-1.fc41.x86_64
                Module libnvidia-egl-gbm.so.1 from rpm egl-gbm-1.1.2^20240919gitb24587d-3.fc41.x86_64
                Module libwayland-server.so.0 from rpm wayland-1.23.0-2.fc41.x86_64
                Module libnvidia-egl-wayland.so.1 from rpm egl-wayland-1.1.17^20241101git218f678-4.fc41.x86_64
                Module libGLdispatch.so.0 from rpm libglvnd-1.7.0-5.fc41.x86_64
                Module libEGL.so.1 from rpm libglvnd-1.7.0-5.fc41.x86_64
                Module libVkLayer_MESA_device_select.so from rpm mesa-24.2.6-1.fc41.x86_64
                Module libcap.so.2 from rpm libcap-2.70-4.fc41.x86_64
                Module libsystemd.so.0 from rpm systemd-256.7-1.fc41.x86_64
                Module libXext.so.6 from rpm libXext-1.3.6-2.fc41.x86_64
                Module libelf.so.1 from rpm elfutils-0.192-5.fc41.x86_64
                Module libdrm_amdgpu.so.1 from rpm libdrm-2.4.123-1.fc41.x86_64
                Module liblzma.so.5 from rpm xz-5.6.2-2.fc41.x86_64
                Module libtinfo.so.6 from rpm ncurses-6.5-2.20240629.fc41.x86_64
                Module libxml2.so.2 from rpm libxml2-2.12.8-2.fc41.x86_64
                Module libedit.so.0 from rpm libedit-3.1-53.20240808cvs.fc41.x86_64
                Module libvulkan_lvp.so from rpm mesa-24.2.6-1.fc41.x86_64
                Module libexpat.so.1 from rpm expat-2.6.3-1.fc41.x86_64
                Module libxshmfence.so.1 from rpm libxshmfence-1.3.2-5.fc41.x86_64
                Module libxcb-shm.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libxcb-randr.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libxcb-sync.so.1 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libxcb-xfixes.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libxcb-present.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libxcb-dri3.so.0 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libzstd.so.1 from rpm zstd-1.5.6-2.fc41.x86_64
                Module libz.so.1 from rpm zlib-ng-2.1.7-3.fc41.x86_64
                Module libdrm.so.2 from rpm libdrm-2.4.123-1.fc41.x86_64
                Module libvulkan.so.1 from rpm vulkan-loader-1.3.296.0-1.fc41.x86_64
                Module libxkbcommon.so.0 from rpm libxkbcommon-1.7.0-4.fc41.x86_64
                Module libffi.so.8 from rpm libffi-3.4.6-3.fc41.x86_64
                Module libwayland-client.so.0 from rpm wayland-1.23.0-2.fc41.x86_64
                Module libX11-xcb.so.1 from rpm libX11-1.8.10-2.fc41.x86_64
                Module libXau.so.6 from rpm libXau-1.0.11-7.fc41.x86_64
                Module libxcb.so.1 from rpm libxcb-1.17.0-3.fc41.x86_64
                Module libX11.so.6 from rpm libX11-1.8.10-2.fc41.x86_64
                Module libasound.so.2 from rpm alsa-lib-1.2.12-2.fc41.x86_64
                Stack trace of thread 15185:
                #0  0x00007f4281c10857 n/a (libnvidia-glcore.so.560.35.03 + 0xa10857)
                #1  0x00007f42820279e9 n/a (libnvidia-glcore.so.560.35.03 + 0xe279e9)
                #2  0x00007f428200d380 n/a (libnvidia-glcore.so.560.35.03 + 0xe0d380)
                #3  0x00007f4281f4b78e n/a (libnvidia-glcore.so.560.35.03 + 0xd4b78e)
                #4  0x00005574464284b4 n/a (/home/tahinli/Documents/Code/Rust/radioxide/streamer/target/debug/streamer + 0x1da54b4)
                #5  0x00005574447e7bfa n/a (/home/tahinli/Documents/Code/Rust/radioxide/streamer/target/debug/streamer + 0x164bfa)
                #6  0x00007f42b841f30b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x330b)
                #7  0x0000557444686d65 n/a (/home/tahinli/Documents/Code/Rust/radioxide/streamer/target/debug/streamer + 0x3d65)
                ELF object binary architecture: AMD x86-64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants