NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 44 forks source link

Segmentation fault in libnvidia-egl-wayland.so.1 #28

Closed ghost closed 3 years ago

ghost commented 3 years ago

Steps to reproduce:

  1. Start Alacritty.
  2. Observe segmentation fault.

Here's the stack trace:

#0  0x00007ffff76fed1f in ?? () from /usr/lib/libnvidia-egl-wayland.so.1
No symbol table info available.
#1  0x00007ffff7700c17 in ?? () from /usr/lib/libnvidia-egl-wayland.so.1
No symbol table info available.
#2  0x00007ffff709c552 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#3  0x00007ffff7024ff4 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#4  0x00005555557cebd0 in ?? ()
No symbol table info available.
#5  0x0000555555741a43 in ?? ()
No symbol table info available.
#6  0x00005555555f1150 in ?? ()
No symbol table info available.
#7  0x00005555555f3692 in ?? ()
No symbol table info available.
#8  0x00005555556bbfde in ?? ()
No symbol table info available.
#9  0x0000555555676cb8 in ?? ()
No symbol table info available.
#10 0x00005555558de6e3 in ?? ()
No symbol table info available.
#11 0x00005555556726dd in ?? ()
No symbol table info available.
#12 0x00007ffff7c55152 in __libc_start_main () from /usr/lib/libc.so.6
No symbol table info available.
#13 0x00005555555b80ee in ?? ()
No symbol table info available.

gdb output:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76fed1f in ?? () from /usr/lib/libnvidia-egl-wayland.so.1

GNOME on Wayland.

I will gladly help with any more information if needed.

erik-kz commented 3 years ago

Thank you, sir, for reporting this. The segfault is occurring in wlEglCheckInterfaceType, which is definitely a bug in our library. I'll get a fix out for that. However, this indicates that the wl_egl_window passed to eglCreatePlatformWindowSurface doesn't have a valid pointer to wl_surface_interface, so alacritty will still fail to start. That may point to an issue in the rust bindings for libwayland-client. I can look a little deeper and hopefully address that as well, since it likely affects other rust applications using EGL on Wayland.

tjaalton commented 3 years ago

So how about that release now? 1.1.5 is 6mo old, and this crash fix is almost 2mo old.

erik-kz commented 3 years ago

Sorry for the delay. I'll check in a fix for the alacritty segfault and cut a new release on Monday.