Bug 104301

Summary: mpv segfaults in brw_bo_unreference () at /usr/lib/xorg/modules/dri/i965_dri.so when spamming fullscreen key
Product: Mesa Reporter: Nicolas Frattaroli <fdbugs>
Component: Drivers/DRI/i965Assignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED DUPLICATE QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: chris, evangelos, freedesktop.org
Version: 17.3   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=104342
i915 platform: i915 features:

Description Nicolas Frattaroli 2017-12-17 06:16:09 UTC
When I watch a video with mpv (git HEAD) on mesa 17.3.0, and spam the fullscreen key, I get a segfault with the following backtrace:

(gdb) bt
#0  0x00007fff9bce2f73 in brw_bo_unreference () at /usr/lib/xorg/modules/dri/i965_dri.so
#1  0x00007fff9bd1401d in intel_destroy_image () at /usr/lib/xorg/modules/dri/i965_dri.so
#2  0x00007fff9aea5365 in dri3_free_render_buffer.isra () at /usr/lib/libEGL_mesa.so.0
#3  0x00007fff9aea62e9 in dri3_get_buffer.isra () at /usr/lib/libEGL_mesa.so.0
#4  0x00007fff9aea6e90 in loader_dri3_get_buffers () at /usr/lib/libEGL_mesa.so.0
#5  0x00007fff9bce8fd6 in intel_update_renderbuffers ()
    at /usr/lib/xorg/modules/dri/i965_dri.so
#6  0x00007fff9bce9301 in intel_prepare_render () at /usr/lib/xorg/modules/dri/i965_dri.so
#7  0x00007fff9bce4c9c in brw_clear () at /usr/lib/xorg/modules/dri/i965_dri.so
#8  0x000055555579e9cd in gl_clear (ra=<optimized out>, dst=<optimized out>, color=0x7fffbdffa3c0, scissor=0x7fffbdffa380) at ../video/out/opengl/ra_gl.c:636
#9  0x000055555579928d in gl_video_render_frame (p=0x7fffac64ff60, frame=frame@entry=0x5555575e0460, fbo=...) at ../video/out/gpu/video.c:3016
#10 0x00005555557ac5e5 in draw_frame (vo=0x555557462190, frame=0x5555575e0460)
    at ../video/out/vo_gpu.c:87
#11 0x00005555557a90d2 in vo_render_frame_external (vo=vo@entry=0x555557462190)
    at ../video/out/vo.c:870
#12 0x00005555557a9978 in vo_thread (ptr=0x555557462190) at ../video/out/vo.c:1016
#13 0x00007fffefeba08a in start_thread () at /usr/lib/libpthread.so.0
#14 0x00007ffff06e142f in clone () at /usr/lib/libc.so.6

mpv configuration doesn't appear to matter, since it also happens with --no-config.

Using a Skylake.
Comment 1 Nicolas Frattaroli 2017-12-17 19:40:36 UTC
Correction: I'm not sure if it's a Skylake. It's whatever the Intel(R) Core(TM) i7-7500U is. (So 7th Gen, I guess)
Comment 2 Nicolas Frattaroli 2017-12-20 14:58:34 UTC
I've done some further testing and this seems to only crash reliably when playing back 60 fps content; this seems to imply a race condition of some sort that's more likely to lead to a crash in mesa the higher mpv's framerate is.
Comment 3 Evangelos Foutras 2018-01-11 05:39:08 UTC
(Based on your comment in bug 104214.)

*** This bug has been marked as a duplicate of bug 104214 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.