mpv icon indicating copy to clipboard operation
mpv copied to clipboard

mpv crash on arch linux with vulkan

Open gift0125 opened this issue 1 year ago • 10 comments

system

  • mpv v0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
  • Linux arch 6.8.8-arch1-1
  • pacman install
  • kwin 6.1.0
  • NVIDIA GeForce RTX 3080 Ti
  • error: fish: Job 1, 'mpv --no-config --gpu-context=w…' terminated by signal SIGSEGV (Address boundary error)

Reproduction steps

  • args: mpv -v --gpu-context=waylandvk --vo=gpu-next --gpu-api=vulkan --hwdec=vulkan

Log file

[cplayer] Starting playback...
[af] [in] 48000Hz 5.1(side) 6ch floatp
[af] [userspeed] 48000Hz 5.1(side) 6ch floatp
[af] [userspeed] (disabled)
[af] [convert] 48000Hz 5.1(side) 6ch floatp
[vd] Pixel formats supported by decoder: vaapi vulkan vdpau cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'vulkan' from decoder.
fish: Job 1, 'mpv -v --gpu-context=waylandvk …' terminated by signal SIGSEGV (Address boundary error)

gift0125 avatar May 01 '24 01:05 gift0125

Get stacktrace as described here https://wiki.archlinux.org/title/Debugging/Getting_traces

kasper93 avatar May 01 '24 03:05 kasper93

Just use nvdec. vulkan hwdec doesn't bring any benefit, only more errors.

Andarwinux avatar May 01 '24 12:05 Andarwinux

I seem to have the same issue, if vo=gpu-next or vo=gpu is set. Using gdb, I got this:

Thread 11 "vo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd7e006c0 (LWP 24031)]
0x0000000000000000 in ?? ()

Using vo=dmabuf-wayland causes mpv to behave correctly.

ThGrSoRu avatar May 06 '24 12:05 ThGrSoRu

type bt full in gdb to get full trace.

kasper93 avatar May 06 '24 12:05 kasper93

#0  0x0000000000000000 in ??? ()
#1  0x00007ffff4168e65 in ??? () at /usr/lib/libvulkan.so.1
#2  0x00007ffff4184729 in vkEnumeratePhysicalDevices () at /usr/lib/libvulkan.so.1
#3  0x00007ffff6983628 in pl_vulkan_choose_device () at /usr/lib/libplacebo.so.338
#4  0x00007ffff698a9c8 in pl_vulkan_create () at /usr/lib/libplacebo.so.338
#5  0x0000555555714c8b in ??? ()
#6  0x0000555555715eb7 in ??? ()
#7  0x000055555567695f in ??? ()
#8  0x00005555556b1df4 in ??? ()
#9  0x00005555556a2391 in ??? ()
#10 0x00007ffff3f851cf in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736815171264, -8029087828402215547, 140736815171264, -33008, 0, 140737488346640, -8029087828381244027, -8029149136642873979}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#11 0x00007ffff40066ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

ThGrSoRu avatar May 06 '24 12:05 ThGrSoRu

Just use nvdec. vulkan hwdec doesn't bring any benefit, only more errors.

nvdec use cuda which force nvidia driver to work in p2 state, that's a bad idea

gift0125 avatar May 07 '24 11:05 gift0125

#0  0x0000000000000000 in ??? ()
#1  0x00007ffff4168e65 in ??? () at /usr/lib/libvulkan.so.1
#2  0x00007ffff4184729 in vkEnumeratePhysicalDevices () at /usr/lib/libvulkan.so.1
#3  0x00007ffff6983628 in pl_vulkan_choose_device () at /usr/lib/libplacebo.so.338
#4  0x00007ffff698a9c8 in pl_vulkan_create () at /usr/lib/libplacebo.so.338
#5  0x0000555555714c8b in ??? ()
#6  0x0000555555715eb7 in ??? ()
#7  0x000055555567695f in ??? ()
#8  0x00005555556b1df4 in ??? ()
#9  0x00005555556a2391 in ??? ()
#10 0x00007ffff3f851cf in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736815171264, -8029087828402215547, 140736815171264, -33008, 0, 140737488346640, -8029087828381244027, -8029149136642873979}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#11 0x00007ffff40066ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Set up Debuginfod so we can actually see the symbols

llyyr avatar May 07 '24 16:05 llyyr

I can't reproduce anymore, as mpv is working correctly. A library or other dependency must be responsible, as the package was not upgraded.

ThGrSoRu avatar May 08 '24 20:05 ThGrSoRu

hi,guys,too busy late. trace below:

Thread 1 "mpv" received signal SIGSEGV, Segmentation fault. ff_vk_exec_add_dep_frame.constprop.0.isra.0 (e=0x555557eb3980, f=0x0, signal_stage=67108864, wait_stage=67108864, s=) at ./libavutil/vulkan.c:612 Downloading source file /usr/src/debug/ffmpeg/ffmpeg/./libavutil/vulkan.c 612 AVVkFrame *vkf = (AVVkFrame *)f->data[0];

gift0125 avatar May 09 '24 14:05 gift0125

see https://github.com/mpv-player/mpv/issues/13375 https://github.com/streetpea/chiaki4deck/issues/239#issuecomment-1931408400 https://trac.ffmpeg.org/ticket/10847

Andarwinux avatar May 09 '24 15:05 Andarwinux

see #13375 streetpea/chiaki4deck#239 (comment) https://trac.ffmpeg.org/ticket/10847

o

gift0125 avatar May 14 '24 02:05 gift0125