Closed disinfectantinjector closed 1 year ago
If I had to guess without backtrace, uninstall libva-vdpau-driver
.
Won't fix? That package is required for some other hardware acceleration, this shouldn't be an acceptable solution. It's also a regression in obs 29 as it does not occur on obs 28.
It's a third-party package we do not directly support anyway. And without a backtrace we cannot help you.
Won't fix?
If my guess is right, the issue is not on OBS Side but on this driver.
That package is required for some other hardware acceleration
Edit:
It's also a regression in obs 29 as it does not occur on obs 28.
In 29 we improved VAAPI H264 enablement, and this driver happen to cause this segfault. This improvement just revealed an issue in this driver.
Installing https://github.com/elFarto/nvidia-vaapi-driver/ and removing libva-vdpau-driver-chromium fixes the issue, and now obs 29.0.0 starts up normally.
Here's a backtrace in case it's useful.
PID: 2209 (obs)
UID: 1000 (user)
GID: 1000 (user)
Signal: 11 (SEGV)
Timestamp: Thu 2023-01-12 12:25:18 EST (5h 33min ago)
Command Line: obs
Executable: /usr/bin/obs
Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-kscreen@autostart.service
Unit: user@1000.service
User Unit: app-kscreen@autostart.service
Slice: user-1000.slice
Owner UID: 1000 (user)
Boot ID: 73252bca57e14790b054bf6befcab693
Machine ID: 102328bf726a468f80bbc31305b6e509
Hostname: tomato
Storage: /var/lib/systemd/coredump/core.obs.1000.73252bca57e14790b054bf6befcab693.2209.1673544318000000.zst (present)
Size on Disk: 7.0M
Message: Process 2209 (obs) of user 1000 dumped core.
Stack trace of thread 2209:
#0 0x00007f0d46dab8c4 XDisplayString (libX11.so.6 + 0x2b8c4)
#1 0x00007f0d0d004c17 __vaDriverInit_1_10 (nvidia_drv_video.so + 0x6c17)
#2 0x00007f0d46ee79c3 n/a (libva.so.2 + 0x39c3)
#3 0x00007f0d46eeacd0 vaInitialize (libva.so.2 + 0x6cd0)
#4 0x00007f0d0d0e9b76 vaapi_open_device (obs-ffmpeg.so + 0x16b76)
#5 0x00007f0d0d0ea124 vaapi_device_h264_supported (obs-ffmpeg.so + 0x17124)
#6 0x00007f0d0d0ea1f9 vaapi_get_h264_default_device (obs-ffmpeg.so + 0x171f9)
#7 0x00007f0d0d0e6384 obs_module_load (obs-ffmpeg.so + 0x13384)
#8 0x00007f0d547ed64e obs_init_module (libobs.so.0 + 0x5164e)
#9 0x00007f0d547edb5f n/a (libobs.so.0 + 0x51b5f)
#10 0x00007f0d547ee069 obs_find_modules2 (libobs.so.0 + 0x52069)
#11 0x00007f0d547ee76d obs_load_all_modules2 (libobs.so.0 + 0x5276d)
#12 0x0000563f81b4b5ed n/a (obs + 0x1255ed)
#13 0x0000563f81ab0ca8 main (obs + 0x8aca8)
#14 0x00007f0d53477290 n/a (libc.so.6 + 0x23290)
#15 0x00007f0d5347734a __libc_start_main (libc.so.6 + 0x2334a)
#16 0x0000563f81ab2635 n/a (obs + 0x8c635)
Stack trace of thread 2212:
#0 0x00007f0d5354f0bf __poll (libc.so.6 + 0xfb0bf)
#1 0x00007f0d51e3bbef n/a (libglib-2.0.so.0 + 0xacbef)
#2 0x00007f0d51de3132 g_main_context_iteration (libglib-2.0.so.0 + 0x54132)
#3 0x00007f0d51de3182 n/a (libglib-2.0.so.0 + 0x54182)
#4 0x00007f0d51e11e05 n/a (libglib-2.0.so.0 + 0x82e05)
#5 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#6 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2214:
#0 0x00007f0d534d74b6 n/a (libc.so.6 + 0x834b6)
#1 0x00007f0d534d9fd4 pthread_cond_timedwait (libc.so.6 + 0x85fd4)
#2 0x00007f0d548509ba os_event_timedwait (libobs.so.0 + 0xb49ba)
#3 0x00007f0d547e6185 obs_hotkey_thread (libobs.so.0 + 0x4a185)
#4 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#5 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2216:
#0 0x00007f0d535217c5 clock_nanosleep (libc.so.6 + 0xcd7c5)
#1 0x00007f0d535262d7 __nanosleep (libc.so.6 + 0xd22d7)
#2 0x00007f0d53552179 usleep (libc.so.6 + 0xfe179)
#3 0x00007f0d54850e49 os_sleepto_ns_fast (libobs.so.0 + 0xb4e49)
#4 0x00007f0d5483aaaa n/a (libobs.so.0 + 0x9eaaa)
#5 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#6 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2215:
#0 0x00007f0d534d74b6 n/a (libc.so.6 + 0x834b6)
#1 0x00007f0d534e26a0 n/a (libc.so.6 + 0x8e6a0)
#2 0x00007f0d5484f2c3 n/a (libobs.so.0 + 0xb32c3)
#3 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#4 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2217:
#0 0x00007f0d534d74b6 n/a (libc.so.6 + 0x834b6)
#1 0x00007f0d534e26a0 n/a (libc.so.6 + 0x8e6a0)
#2 0x00007f0d5483ac78 n/a (libobs.so.0 + 0x9ec78)
#3 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#4 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2223:
#0 0x00007f0d534d74b6 n/a (libc.so.6 + 0x834b6)
#1 0x00007f0d534e26a0 n/a (libc.so.6 + 0x8e6a0)
#2 0x00007f0d300913e6 n/a (libobs-scripting.so.1 + 0x63e6)
#3 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#4 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2213:
#0 0x00007f0d5354f0bf __poll (libc.so.6 + 0xfb0bf)
#1 0x00007f0d51e3bbef n/a (libglib-2.0.so.0 + 0xacbef)
#2 0x00007f0d51de3ddf g_main_loop_run (libglib-2.0.so.0 + 0x54ddf)
#3 0x00007f0d463fcadc n/a (libgio-2.0.so.0 + 0x10aadc)
#4 0x00007f0d51e11e05 n/a (libglib-2.0.so.0 + 0x82e05)
#5 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#6 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2211:
#0 0x00007f0d5354f0bf __poll (libc.so.6 + 0xfb0bf)
#1 0x00007f0d51e3bbef n/a (libglib-2.0.so.0 + 0xacbef)
#2 0x00007f0d51de3132 g_main_context_iteration (libglib-2.0.so.0 + 0x54132)
#3 0x00007f0d53d10382 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x34d382)
#4 0x00007f0d53af8604 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x135604)
#5 0x00007f0d53be0778 _ZN7QThread4execEv (libQt6Core.so.6 + 0x21d778)
#6 0x00007f0d461f811f n/a (libQt6DBus.so.6 + 0x2d11f)
#7 0x00007f0d53c48a21 n/a (libQt6Core.so.6 + 0x285a21)
#8 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#9 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2210:
#0 0x00007f0d5354f0bf __poll (libc.so.6 + 0xfb0bf)
#1 0x00007f0d4652226b n/a (libxcb.so.1 + 0xd26b)
#2 0x00007f0d46523d1d xcb_wait_for_event (libxcb.so.1 + 0xed1d)
#3 0x00007f0d42718362 n/a (libQt6XcbQpa.so.6 + 0x4e362)
#4 0x00007f0d53c48a21 n/a (libQt6Core.so.6 + 0x285a21)
#5 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#6 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
Stack trace of thread 2218:
#0 0x00007f0d535217c5 clock_nanosleep (libc.so.6 + 0xcd7c5)
#1 0x00007f0d535262d7 __nanosleep (libc.so.6 + 0xd22d7)
#2 0x00007f0d54850dd5 os_sleepto_ns (libobs.so.0 + 0xb4dd5)
#3 0x00007f0d5481f34b obs_graphics_thread_loop (libobs.so.0 + 0x8334b)
#4 0x00007f0d54820969 obs_graphics_thread (libobs.so.0 + 0x84969)
#5 0x00007f0d534da8fd n/a (libc.so.6 + 0x868fd)
#6 0x00007f0d5355ca60 n/a (libc.so.6 + 0x108a60)
ELF object binary architecture: AMD x86-64
As mentioned, this is not a problem in OBS but in these (not nvidia supported, and not anyone supported considering its age) drivers. OBS is not doing anything naughty with the VA-API so there is nothing we can do short of making life worse for users with working drivers.
Last note:
The backtrace confirmed my guess, nvidia_drv_video.so
comes from libva-vdpau-driver
in this situation.
Some might say that https://github.com/elFarto/nvidia-vaapi-driver/ provides the file but it is a different one code-wise.
@tytan652 thank you for actually mentioning the alternative. I wasn't aware that there was a newer replacement package available.
it happened to me as well and removing the libva-vdpau-driver
immediately solved the issue. hmu if you want to look at a backtrace.
Thx. Still had libva-vdpau-driver
installed without knowing it. Led to obs crashing with a SIGSEGV signal. Uninstalling solved the problem :+1:
Stumbled across this problem on my Debian install. Seeing as this is the most common search result -- and lots of other forums link back here -- I'm dropping my Debian troubleshooting for posterity.
Running obs in gdb gave me a similar backtrace:
$ gdb obs
... [trimmed output]
(gdb) run
... [trimmed output; crash on start happens here]
(gdb) backtrace
... [trimmed output]
info: NVENC supported
Thread 1 "obs" received signal SIGSEGV, Segmentation fault.
0x00007fffee8f01b0 in XDisplayString () from /usr/lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0 0x00007fffee8f01b0 in XDisplayString () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#1 0x00007fffa1e05ee5 in __vaDriverInit_1_0 () at /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
#2 0x00007ffff0a15e21 in () at /usr/lib/x86_64-linux-gnu/libva.so.2
#3 0x00007ffff0a16f8e in vaInitialize () at /usr/lib/x86_64-linux-gnu/libva.so.2
#4 0x00007fffb4050e7c in vaapi_open_device () at /usr//lib/x86_64-linux-gnu/obs-plugins/obs-ffmpeg.so
#5 0x00007fffb405120f in vaapi_device_h264_supported () at /usr//lib/x86_64-linux-gnu/obs-plugins/obs-ffmpeg.so
#6 0x00007fffb40512d8 in vaapi_get_h264_default_device () at /usr//lib/x86_64-linux-gnu/obs-plugins/obs-ffmpeg.so
#7 0x00007fffb403d14a in obs_module_load () at /usr//lib/x86_64-linux-gnu/obs-plugins/obs-ffmpeg.so
#8 0x00007ffff655856b in obs_init_module () at /usr/lib/x86_64-linux-gnu/libobs.so.0
#9 0x00007ffff6559a15 in () at /usr/lib/x86_64-linux-gnu/libobs.so.0
#10 0x00007ffff6559057 in obs_find_modules2 () at /usr/lib/x86_64-linux-gnu/libobs.so.0
#11 0x00007ffff6559727 in obs_load_all_modules2 () at /usr/lib/x86_64-linux-gnu/libobs.so.0
#12 0x00005555556bd2a7 in ()
#13 0x00005555555ff83c in ()
#14 0x00005555555dc610 in main ()
(gdb) q
A debugging session is active.
Inferior 1 [process 81337] will be killed.
Quit anyway? (y or n) y
$
So I dug around for vdpau packages that I might have installed, and found one:
$ apt search vdpau
...[trimmed output]
vdpau-va-driver/now 0.7.4-dmo8 amd64 [installed,local]
VDPAU-based backend for VA API
In particular, it's listed as [installed,local]
, meaning it didn't come from deb repositories and I must've installed it myself ages ago (or that it's a super old package from ages ago, which seems to be the case). Which means that there may be landmines for me to discover if I just up and remove it. I tried following the chain of dependencies up from vdpau-va-driver
:
$ apt-cache rdepends vdpau-va-driver --installed
vdpau-va-driver
Reverse Depends:
mesa-va-drivers
mesa-va-drivers
$ apt-cache rdepends mesa-va-drivers --installed
mesa-va-drivers
Reverse Depends:
va-driver-all
$ apt-cache rdepends va-driver-all --installed
va-driver-all
Reverse Depends:
|libva1
|steam-libs
|libva2
$ apt-cache rdepends libva2 --installed
libva2
Reverse Depends:
libavcodec57
vdpau-va-driver
libmfx1
libmfx0
libgstreamer-plugins-bad1.0-0
libavutil57
libavutil56
libavutil55
libavcodec59
libavcodec58
gstreamer1.0-plugins-bad
libva-drm2
vlc-plugin-video-output
obs-studio
mpv
libgstreamer-plugins-bad1.0-0
gstreamer1.0-plugins-bad
libavutil58
libavfilter9
libavcodec60
libavutil57
libavcodec59
libavutil56
libavcodec58
vlc-plugin-video-output
steam-libs
obs-studio
mpv
mesa-va-drivers
libva-x11-2
libva-x11-2
libva-wayland2
libva-wayland2
libva-glx2
libva-glx2
libva-drm2
i965-va-driver
libmfx1
libgstreamer-plugins-bad1.0-0
gstreamer1.0-plugins-bad
libgavl2
libavutil57
libavcodec59
$ apt-cache rdepends libva1 --installed
libva1
Reverse Depends:
libavcodec54
libavcodec56
libavcodec55
libavcodec53
libavcodec-ffmpeg56
$
Which ultimately showed a fair amount of reverse-dependencies.
Nevertheless, I'm in a living dangerously mood, so I removed the package anyway:
$ sudo apt remove vdpau-va-driver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
vdpau-va-driver
0 upgraded, 0 newly installed, 1 to remove and 8 not upgraded.
After this operation, 108 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 942623 files and directories currently installed.)
Removing vdpau-va-driver:amd64 (0.7.4-dmo8) ...
And then OBS would at least start again. Knowing that vlc was one of the reverse dependencies, I tried playing a video, and it worked, though with log complaints about unknown libva errors:
$ vlc Videos/Fast\ Rapper\ Watsky\ Has\ Damages\ Rapped\ up\ -\ YouTube.mp4
VLC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d)
[00005619414db550] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f76400049b0] gl gl: Initialized libplacebo v5.264.1 (API v264)
libva info: VA-API version 1.17.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f76400049b0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[00007f76400049b0] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[00007f76400049b0] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[00007f76400049b0] gl gl: Initialized libplacebo v5.264.1 (API v264)
[00007f7654c18900] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library 525.116.04 Thu Apr 27 17:54:53 UTC 2023 for hardware decoding
I'll update here if I run into any other landmines from my decision to apt remove vdpau-va-driver
.
UPDATE 2023-06-14: No problems resulting from that decision. OBS works fine again, no other observed issues on my system.
FWIW the problem was diagnosed at https://github.com/intel/libva/issues/675#issuecomment-1408950331
On manjaro (arch linux) removing the libva-vdpau-driver
resolved the issue:
pacman -Rns libva-vdpau-driver
Be careful not to remove the packages libvdpau
lib32-libvdpau
Otherwise you'll get:
obs: error while loading shared libraries: libvdpau.so.1: cannot open shared object file: No such file or directory
Hopefully getting fixed soon™
https://gitlab.archlinux.org/archlinux/packaging/packages/libva-vdpau-driver/-/merge_requests/1
Or you can install libva-nvidia-driver
libva-vdpau
i un-installed this driver and obs launched and played perfectly after this, thanks
Operating System Info
Other
Other OS
Arch Linux
OBS Studio Version
29.0.0
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/1VlKYHlDMLWUG60B
OBS Studio Crash Log URL
https://obsproject.com/logs/1VlKYHlDMLWUG60B
Expected Behavior
Expected obs to startup normally
Current Behavior
obs startup fails with error
Segmentation fault (core dumped)
Steps to Reproduce
Segmentation fault (core dumped)
Anything else we should know?
Downgrading to obs-studio 28.1.2-2 fixes the issue and obs starts normally.
Arch Linux package versions obs-studio 29.0.0-1 linux 6.1.5.arch1-1 nvidia 525.78.01-3 qt6-base 6.4.2-1 libva-vdpau-driver-chromium 0.7.4-8
Full crash log:
Backtrace