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

mpv crash on arch linux with vulkan #14029

Closed
gift0125 opened this issue May 1, 2024 · 11 comments
Closed

mpv crash on arch linux with vulkan #14029

gift0125 opened this issue May 1, 2024 · 11 comments
Labels

Comments

@gift0125
Copy link

gift0125 commented May 1, 2024

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)
@kasper93
Copy link
Contributor

kasper93 commented May 1, 2024

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

@Andarwinux
Copy link
Contributor

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

@ThGrSoRu
Copy link

ThGrSoRu commented May 6, 2024

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.

@kasper93
Copy link
Contributor

kasper93 commented May 6, 2024

type bt full in gdb to get full trace.

@ThGrSoRu
Copy link

ThGrSoRu commented May 6, 2024

#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

@gift0125
Copy link
Author

gift0125 commented May 7, 2024

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

@llyyr
Copy link
Contributor

llyyr commented May 7, 2024

#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

@ThGrSoRu
Copy link

ThGrSoRu commented May 8, 2024

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

@gift0125
Copy link
Author

gift0125 commented May 9, 2024

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];

@Andarwinux
Copy link
Contributor

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

@gift0125
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants