Skip to content

SEGFAULT in libva-2.20.0-1 when running Moonlight

Description:

When running moonlight-qt, after connecting to a server, an error seems to occur (which may or may not be related to libva). Shortly after, a SEGFAULT in libva is thrown.

Additional info:

  • Arch Linux
  • Wayland (sway 1.9)
  • Multiple GPUs (laptop with intel+nvidia, and an eGPU with AMD Radeon)
  • env LIBVA_DRIVER_NAME=radeonsi
  • segfault no longer happens after downgrading to libva-2.19.0-2, and happens again after re-upgrading.

Running with GDB gives this stacktrace:

Thread 222 "Session Exec" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff9ac006c0 (LWP 69295)]
VA_DRM_GetDriverNames (drivers=0x7fff9abff1e0, num_drivers=0x7fff9abff1d4, ctx=<optimized out>) at ../libva/va/drm/va_drm_utils.c:74
74	     drm_driver = va_DRM_GetDrmDriverName(drm_state->fd);    

#0  VA_DRM_GetDriverNames (drivers=0x7fff9abff1e0, num_drivers=0x7fff9abff1d4, ctx=<optimized out>) at ../libva/va/drm/va_drm_utils.c:74
#1  0x00007ffff7dd7cdf in va_new_opendriver (dpy=0x7ffee024d6d0) at ../libva/va/va.c:681
#2  vaInitialize (minor_version=0x7fff9abff4a8, major_version=0x7fff9abff4ac, dpy=0x7ffee024d6d0) at ../libva/va/va.c:743
#3  vaInitialize (dpy=0x7ffee024d6d0, major_version=0x7fff9abff4ac, minor_version=0x7fff9abff4a8) at ../libva/va/va.c:727
#4  0x00005555555dadbc in ??? ()
#5  0x00005555555d3813 in ??? ()
#6  0x00005555555d8c99 in ??? ()
#7  0x00005555555c476c in ??? ()
#8  0x00005555555c9bb4 in ??? ()
#9  0x00007ffff2aeb79a in operator() (__closure=<optimized out>) at thread/qthread_unix.cpp:350
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at thread/qthread_unix.cpp:287
#11 QThreadPrivate::start (arg=0x7fffffffa6e0) at thread/qthread_unix.cpp:310
#12 0x00007ffff34a955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#13 0x00007ffff3526a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

dmesg:

[17119.728221] Session Exec[71900]: segfault at 0 ip 00007371de0e78c7 sp 0000737180dfefc0 error 4 in libva-wayland.so.2.2000.0[7371de0e7000+1000] likely on CPU 0 (core 0, socket 0)
[17119.728235] Code: 00 00 31 c0 31 ed e8 98 f8 ff ff e9 39 ff ff ff 0f 1f 00 41 57 41 56 41 55 49 89 f5 41 54 49 89 d4 55 53 48 81 ec 98 01 00 00 <8b> 3f 64 48 8b 04 25 28 00 00 00 48 89 84 24 88 01 00 00 31 c0 ff
  • package version(s): libva-2.20.0-1

Steps to reproduce:

This might be very specific to my config, but I'm happy to help you guys debug

  1. Launch moonlight-qt
  2. Connect to a server running Sunshine
  3. Observe segfault
Edited by Victor Lavaud
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information