-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Linux Core SDK
-
LCPD-47070
-
12.00.00
-
12.01.00
-
am62pxx_sk-fs
The crash is in libpvr_mesa_wsi.so (PowerVR's Mesa Window System Interface library, part of ti-img-rogue-umlibs v25.3.6908880). The call chain every time is:
mpv → libplacebo (pl_swapchain_resize) → libvulkan → libpvr_mesa_wsi.so → libVK_IMG.so → SIGSEGV
pl_swapchain_resize is libplacebo's call to create or resize the Vulkan swapchain - the chain of GPU framebuffers used for presentation to the display. The PowerVR WSI implementation has a NULL pointer dereference somewhere in its vkCreateSwapchainKHR path. This happens in two scenarios:
1. Without WAYLAND_DISPLAY: crashes immediately during Vulkan instance/surface probing before any playback starts
2. With WAYLAND_DISPLAY: crashes on the first actual frame render when libplacebo calls pl_swapchain_resize to set up the swapchain for the video dimensions
This is a bug in the TI/IMG userspace driver - the WSI should return VK_ERROR_INITIALIZATION_FAILED or VK_ERROR_SURFACE_LOST_KHR instead of dereferencing a null pointer.
To recreate you can run the following command:
XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 mpv --vo=gpu --gpu-api=vulkan --hwdec=auto --vd=hevc_v4l2m2m --no-correct-pts --container-fps-override=60 /home/vids/bbb_1080p60_30s.h265
I ran this as well in gdb to get the following backtrace
Command: XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 gdb --args mpv --vo=gpu --gpu-api=vulkan --hwdec=auto --vd=hevc_v4l2m2m --no-correct-pts --container-fps-override=60 /home/vids/bbb_1080p60_30s.h265
(gdb) run
(gdb) bt
Thread 15 "vo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffffc7ffef60 (LWP 8259)]
0x0000ffffe8ed1d98 in ?? () from /usr/lib/libVK_IMG.so
(gdb) bt
#0 0x0000ffffe8ed1d98 in ?? () from /usr/lib/libVK_IMG.so
#1 0x0000ffffc4175aec in ?? () from /usr/lib/libpvr_mesa_wsi.so
#2 0x0000ffffc417670c in ?? () from /usr/lib/libpvr_mesa_wsi.so
#3 0x0000ffffc417401c in ?? () from /usr/lib/libpvr_mesa_wsi.so
#4 0x0000ffffc417a234 in ?? () from /usr/lib/libpvr_mesa_wsi.so
#5 0x0000ffffc4174808 in ?? () from /usr/lib/libpvr_mesa_wsi.so
#6 0x0000fffff49a7fc8 in ?? () from /usr/lib/libvulkan.so.1
#7 0x0000fffff522c090 in ?? () from /usr/lib/libplacebo.so.351
#8 0x0000fffff522ca8c in ?? () from /usr/lib/libplacebo.so.351
#9 0x0000fffff520360c in pl_swapchain_resize () from /usr/lib/libplacebo.so.351
#10 0x0000aaaaaabf8fd4 in ?? ()
#11 0x0000aaaaaabf96fc in ?? ()
#12 0x0000aaaaaabc19e8 in ?? ()
#13 0x0000aaaaaabc028c in ?? ()
#14 0x0000fffff4832b58 in start_thread (arg=0xffffc7ffef60) at pthread_create.c:454
#15 0x0000fffff48969dc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:75
This command works so i know it's a vulkan issue:
XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 mpv --vo=gpu --gpu-api=opengl --hwdec=auto --vd=hevc_v4l2m2m --no-correct-pts --container-fps-override=60 /home/vids/bbb_1080p60_30s.h265