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

Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf-wayland #15992

Open
6 tasks done
arcivanov opened this issue Mar 2, 2025 · 2 comments
Open
6 tasks done

Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf-wayland #15992

arcivanov opened this issue Mar 2, 2025 · 2 comments
Labels

Comments

@arcivanov
Copy link

mpv Information

mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1
FFmpeg library versions:
   libavcodec      61.3.100 (runtime 61.19.100)
   libavdevice     61.1.100 (runtime 61.3.100)
   libavfilter     10.1.100 (runtime 10.4.100)
   libavformat     61.1.100 (runtime 61.7.100)
   libavutil       59.8.100 (runtime 59.39.100)
   libswresample   5.1.100 (runtime 5.3.100)
   libswscale      8.1.100 (runtime 8.3.100)

Other Information

- Linux version: Fedora Linux 41 (Workstation Edition)
- Kernel Version: 6.13.5-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 27 15:07:31 UTC 2025 x86_64 GNU/Linux
- GPU Model: 
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] [1002:7480] (rev c1)
c4:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c2)
- Mesa/GPU Driver Version:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.0.0

        driverInfo                                           = Mesa 25.0.0
        driverInfo                                           = Mesa 25.0.0
        driverInfo                                           = Mesa 25.0.0 (LLVM 19.1.7)

- Window Manager and Version: kwin 6.3.2
- Source of mpv: distro
- Latest known working version: 0.39.0
- Issue started after the following happened: upgrade to Mesa 25.0.0

Reproduction Steps

The config is as follows:

hwdec=vaapi
vo=dmabuf-wayland

Opening any video causes segfault. Commenting out vo=dmabuf-wayland resolves the issue.

Expected Behavior

No segfault

Actual Behavior

Segfault playing any video.

Log File

Segfault debug log:
output-failure.txt

Working debug log:
output-success.txt

#0  0x00007fc98d85185b in vl_video_buffer_sampler_view_components () at /usr/lib64/dri-freeworld/radeonsi_drv_video.so
#1  0x00007fc98d8369fe in vl_compositor_set_buffer_layer () at /usr/lib64/dri-freeworld/radeonsi_drv_video.so
#2  0x00007fc98d239c83 in vlVaPostProcCompositor () at /usr/lib64/dri-freeworld/radeonsi_drv_video.so
#3  0x00007fc98d232bc9 in vlVaPutImage () at /usr/lib64/dri-freeworld/radeonsi_drv_video.so
#4  0x00007fc9d76a30de in vaPutImage (dpy=0x7fc99000d0c0, surface=3, image=4, src_x=0, src_y=0, src_width=2, src_height=2, dest_x=0, dest_y=0, dest_width=2, dest_height=2) at ../va/va.c:1893
#5  0x00007fc9d822851e in vaapi_unmap_frame () at /lib64/libavutil.so.59
#6  0x00007fc9d8224c6b in ff_hwframe_unmap () at /lib64/libavutil.so.59
#7  0x00007fc9d82115e5 in buffer_replace () at /lib64/libavutil.so.59
#8  0x00007fc9d821d26c in av_frame_unref () at /lib64/libavutil.so.59
#9  0x00007fc9d821d3d2 in av_frame_free () at /lib64/libavutil.so.59
#10 0x00007fc9d822de42 in vaapi_transfer_data_to.lto_priv () at /lib64/libavutil.so.59
#11 0x00007fc9d8224d8a in av_hwframe_transfer_data () at /lib64/libavutil.so.59
#12 0x000055a87e73f75e in mp_image_hw_upload (hw_img=0x7fc9902dd870, src=0x7fc9903111f0) at ../video/mp_image_pool.c:350
#13 mp_image_hw_upload (hw_img=0x7fc9902dd870, src=0x7fc9903111f0) at ../video/mp_image_pool.c:327
#14 mp_av_pool_image_hw_upload (hw_frames_ctx=<optimized out>, src=0x7fc9903111f0) at ../video/mp_image_pool.c:438
#15 0x000055a87e7c314e in try_format_upload (hw=hw@entry=0x7fc99000d590, pixfmt=<optimized out>) at ../video/out/hwdec/hwdec_vaapi.c:436
#16 0x000055a87e7c3bac in try_format_config (hw=0x7fc99000d590, hwconfig=0x7fc9902d7c40) at ../video/out/hwdec/hwdec_vaapi.c:504
#17 determine_working_formats (hw=0x7fc99000d590) at ../video/out/hwdec/hwdec_vaapi.c:572
#18 init (hw=0x7fc99000d590) at ../video/out/hwdec/hwdec_vaapi.c:177
#19 0x000055a87e740737 in ra_hwdec_load_driver (ra_ctx=<optimized out>, log=0x55a8b29517d0, global=<optimized out>, devs=0x7fc99000d4f0, drv=0x55a87e8e5c40 <ra_hwdec_vaapi>, is_auto=true) at ../video/out/gpu/hwdec.c:104
#20 load_add_hwdec (ctx=0x55a8b292b6f8, devs=0x7fc99000d4f0, drv=0x55a87e8e5c40 <ra_hwdec_vaapi>, is_auto=true) at ../video/out/gpu/hwdec.c:236
#21 load_add_hwdec (ctx=0x55a8b292b6f8, devs=0x7fc99000d4f0, drv=0x55a87e8e5c40 <ra_hwdec_vaapi>, is_auto=<optimized out>) at ../video/out/gpu/hwdec.c:226
#22 0x000055a87e743014 in load_hwdecs_all (ctx=<optimized out>, devs=<optimized out>) at ../video/out/gpu/hwdec.c:245
#23 load_hwdecs_all (ctx=0x55a8b292b6f8, devs=0x7fc99000d4f0) at ../video/out/gpu/hwdec.c:241
#24 ra_hwdec_ctx_init (ctx=0x55a8b292b6f8, devs=0x7fc99000d4f0, type=<optimized out>, load_all_by_default=<optimized out>) at ../video/out/gpu/hwdec.c:276
#25 0x000055a87e7a742f in preinit (vo=0x55a8b29db820) at ../video/out/vo_dmabuf_wayland.c:809
#26 0x000055a87e74f5bb in vo_thread (ptr=0x55a8b29db820) at ../video/out/vo.c:1090
#27 0x00007fc9d74cb168 in start_thread (arg=<optimized out>) at pthread_create.c:448
#28 0x00007fc9d754f14c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
(gdb) bt full no-filters
#0  0x00007f499985185b in vl_video_buffer_sampler_view_components (buffer=0x7f496836a5a0) at ../src/gallium/auxiliary/vl/vl_video_buffer.c:305
        res = <optimized out>
        desc = <optimized out>
        nr_components = <optimized out>
        buf = 0x7f496836a5a0
        sv_templ = {{__cl_space = "\020\365֝I\177\000\000\n\024\235\261I\177\000\000\320\337-hI\177\000\0000\000\000hI\177\000\000\000\000\000\000\000\000\000\000pTLhI\177\000\000\000\002\004\006", '\000' <repeats 11 times>, reference = {
              count = -1646856944}}, format = 1360, astc_decode_format = 3, is_tex2d_from_buf = true, target = 13, swizzle_r = 5, swizzle_g = 3, swizzle_b = 7, swizzle_a = 4, texture = 0x7f49b19d17a2 <_int_free+738>, context = 0x2, u = {tex = {
              first_layer = 0, last_layer = 0, first_level = 0, last_level = 0}, buf = {offset = 0, size = 0}, tex2d_from_buf = {offset = 0, row_stride = 0, width = 0, height = 14720}}}
        pipe = 0x7f4968202b50
        sampler_format = {PIPE_FORMAT_A8R8G8B8_UNORM, PIPE_FORMAT_NONE, PIPE_FORMAT_NONE}
        plane_order = <optimized out>
        i = <optimized out>
        j = <optimized out>
        component = <optimized out>
        num_planes = <optimized out>
#1  0x00007f49998369fe in vl_compositor_set_buffer_layer (s=s@entry=0x7f496806a280, c=c@entry=0x7f496806a0f8, layer=layer@entry=0, buffer=buffer@entry=0x7f496836a5a0, src_rect=src_rect@entry=0x7f499dd6f620, dst_rect=dst_rect@entry=0x0, 
    deinterlace=VL_COMPOSITOR_NONE) at ../src/gallium/auxiliary/vl/vl_compositor.c:589
        sampler_views = <optimized out>
        i = <optimized out>
#2  0x00007f4999239c83 in vlVaPostProcCompositor (drv=drv@entry=0x7f496806a0e0, src_region=src_region@entry=0x7f499dd6f6c0, dst_region=dst_region@entry=0x7f499dd6f6c8, src=0x7f496836a5a0, dst=<optimized out>, 
    deinterlace=deinterlace@entry=VL_COMPOSITOR_NONE, param=0x7f499dd6f7a0) at ../src/gallium/frontends/va/postproc.c:227
        surfaces = 0x7f49682de018
        src_rect = {x0 = 0, x1 = 2, y0 = 0, y1 = 2}
        dst_rect = {x0 = 0, x1 = 2, y0 = 0, y1 = 2}
        color_standard = <optimized out>
        rotation = VL_COMPOSITOR_ROTATE_0
        mirror = VL_COMPOSITOR_MIRROR_NONE
        src_yuv = false
        dst_yuv = <optimized out>
        src_full_range = <optimized out>
        dst_full_range = <optimized out>
#3  0x00007f4999232bc9 in vlVaPutImage (ctx=<optimized out>, surface=<optimized out>, image=<optimized out>, src_x=0, src_y=0, src_width=2, src_height=2, dest_x=0, dest_y=0, dest_width=2, dest_height=2) at ../src/gallium/frontends/va/image.c:716
        tmp_surf = {templat = {context = 0x0, buffer_format = PIPE_FORMAT_A8R8G8B8_UNORM, width = 2, height = 2, interlaced = false, bind = 0, flags = 0, contiguous_planes = false, destroy = 0x0, get_resources = 0x0, get_sampler_view_planes = 0x0, 
            get_sampler_view_components = 0x0, get_surfaces = 0x0, associated_data = 0x0, codec = 0x0, destroy_associated_data = 0x0, statistics_data = 0x0}, buffer = 0x7f496836a5a0, subpics = {mem_ctx = 0x0, data = 0x0, size = 0, capacity = 0}, 
          ctx = 0x0, coded_buf = 0x0, full_range = false, fence = 0x0, pipe_fence = 0x0, efc_surface = 0x0, is_dpb = false}
        ret = <optimized out>
        dst_rect = {x = 0, y = 0, width = 2, height = 2}
        proc = {surface = 0, surface_region = 0x0, surface_color_standard = VAProcColorStandardNone, output_region = 0x0, output_background_color = 0, output_color_standard = VAProcColorStandardNone, pipeline_flags = 0, filter_flags = 0, 
          filters = 0x0, num_filters = 0, forward_references = 0x0, num_forward_references = 0, backward_references = 0x0, num_backward_references = 0, rotation_state = 0, blend_state = 0x0, mirror_state = 0, additional_outputs = 0x0, 
          num_additional_outputs = 0, input_surface_flag = 0, output_surface_flag = 0, input_color_properties = {chroma_sample_location = 0 '\000', color_range = 0 '\000', colour_primaries = 0 '\000', transfer_characteristics = 0 '\000', 
            matrix_coefficients = 0 '\000', reserved = "\000\000"}, output_color_properties = {chroma_sample_location = 0 '\000', color_range = 0 '\000', colour_primaries = 0 '\000', transfer_characteristics = 0 '\000', 
            matrix_coefficients = 0 '\000', reserved = "\000\000"}, processing_mode = VAProcDefaultMode, output_hdr_metadata = 0x0, va_reserved = {0 <repeats 16 times>}}
        src_rect = {x = 0, y = 0, width = 2, height = 2}
        drv = 0x7f496806a0e0
        surf = 0x7f4968310340
        img_buf = 0x7f496831ae20
        vaimage = 0x7f49682dc080
        format = <optimized out>

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@arcivanov arcivanov changed the title Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf_wayland Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf-wayland Mar 2, 2025
@arcivanov arcivanov changed the title Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf-wayland Segfault after Mesa 25.0.0 upgrade on F41 with vo=dmabuf-wayland Mar 2, 2025
@Dudemanguy
Copy link
Member

This should work on master I believe. We're working on a new release soonish.

@arcivanov
Copy link
Author

Thanks, we'll wait for release then.

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

2 participants