i965: crash on Wayland
Original ticket: gstreamer/gst-plugins-good#671 (closed)
gst-plugins-good/tests/examples/gtk/gtkglsink
crashes when I'm running it in Wayland; usually when trying to resize the window .
It works fine when using X11.
I'm using Fedora 32 (Mesa 20.0.7) on a Lenovo X230.
Linux cass-x230 5.6.13-300.fc32.x86_64 #1 SMP Thu May 14 22:51:37 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 21fa
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 32
Region 0: Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at e0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at 5000 [size=64]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915
Thread 11 "gstglcontext" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc3fff700 (LWP 22220)]
dri2InvalidateDrawable (drawable=0x0) at ../src/mesa/drivers/dri/common/dri_util.c:849
849 drawable->dri2.stamp++;
#0 dri2InvalidateDrawable (drawable=0x0) at ../src/mesa/drivers/dri/common/dri_util.c:849
#1 0x00007fffdec0d950 in intelDrawBuffer (ctx=0x7fffbc006410) at ../src/mesa/drivers/dri/i965/intel_buffers.c:45
#2 intelDrawBuffer (ctx=0x7fffbc006410) at ../src/mesa/drivers/dri/i965/intel_buffers.c:36
#3 0x00007fffded2bf79 in draw_buffer (no_error=false, caller=0x7fffdf39fb92 "glDrawBuffer", buffer=1029, fb=0x7fffdf70df80 <IncompleteFramebuffer>, ctx=0x7fffbc006410) at ../src/mesa/main/buffers.c:326
#4 draw_buffer_error (ctx=0x7fffbc006410, fb=0x7fffdf70df80 <IncompleteFramebuffer>, buffer=1029, caller=0x7fffdf39fb92 "glDrawBuffer") at ../src/mesa/main/buffers.c:337
#5 0x00007fffec4f27dc in gst_gl_memory_copy_teximage (src=0x7fffe0033e50, tex_id=85, out_target=<optimized out>, out_tex_format=<optimized out>, out_width=640, out_height=480)
at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c:757
#6 0x00007fffec4f2b48 in _gl_tex_copy_thread (context=<optimized out>, data=0x7fffc3ffe900) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c:807
#7 0x00007fffec4f2bf1 in gst_gl_memory_copy_into (gl_mem=gl_mem@entry=0x7fffe0033e50, tex_id=<optimized out>, target=<optimized out>, tex_format=<optimized out>, width=<optimized out>, height=<optimized out>)
at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c:1005
#8 0x00007fffec4f4a69 in _gl_mem_copy (src=0x7fffe0033e50, offset=0, size=1228800) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c:129
#9 0x00007fffec4dbf94 in _mem_copy_gl (context=<optimized out>, transfer=0x7fffee3b0060) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c:408
#10 0x00007fffec5080a3 in _run_message_sync (message=0x7fffee3affe0) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c:612
#11 0x00007fffec508042 in _run_message_async (message=0x837020) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c:679
#12 0x00007ffff7d4c49b in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#13 0x00007ffff7d507cf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#14 0x00007ffff7d50b58 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#15 0x00007ffff7d50e73 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#16 0x00007fffec4e884e in gst_gl_context_create_thread (context=0x7fffe0008af0) at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcontext.c:1322
#17 0x00007ffff7d7a7f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#18 0x00007ffff6f9e432 in start_thread () at /lib64/libpthread.so.0
#19 0x00007ffff72c69d3 in clone () at /lib64/libc.so.6
==20328== Thread 11 gstglcontext:
==20328== Invalid read of size 4
==20328== at 0x140E4A34: dri2InvalidateDrawable (dri_util.c:849)
==20328== by 0x1406394F: intelDrawBuffer (intel_buffers.c:45)
==20328== by 0x1406394F: intelDrawBuffer (intel_buffers.c:36)
==20328== by 0x14181F78: UnknownInlinedFun (buffers.c:326)
==20328== by 0x14181F78: draw_buffer_error (buffers.c:337)
==20328== by 0x136AE7DB: gst_gl_memory_copy_teximage (gstglmemory.c:757)
==20328== by 0x136AEB47: _gl_tex_copy_thread (gstglmemory.c:807)
==20328== by 0x136AEBF0: gst_gl_memory_copy_into (gstglmemory.c:1005)
==20328== by 0x136B0A68: _gl_mem_copy (gstglmemorypbo.c:579)
==20328== by 0x13697F93: _mem_copy_gl (gstglbasememory.c:409)
==20328== by 0x136C40A2: _run_message_sync (gstglwindow.c:612)
==20328== by 0x136C4041: _run_message_async (gstglwindow.c:679)
==20328== by 0x4A3649A: ??? (in /usr/lib64/libglib-2.0.so.0.6400.2)
==20328== by 0x4A3A7CE: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.2)
==20328== by 0x4A3AB57: ??? (in /usr/lib64/libglib-2.0.so.0.6400.2)
==20328== by 0x4A3AE72: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6400.2)
==20328== by 0x136A484D: gst_gl_context_create_thread (gstglcontext.c:1322)
==20328== by 0x4A647F1: ??? (in /usr/lib64/libglib-2.0.so.0.6400.2)
==20328== by 0x5863431: start_thread (in /usr/lib64/libpthread-2.31.so)
==20328== by 0x55839D2: clone (in /usr/lib64/libc-2.31.so)
==20328== Address 0x30 is not stack'd, malloc'd or (recently) free'd