Bug 80963 - glxgears stops rendering randomly under xwayland with dri3 & glamor
Summary: glxgears stops rendering randomly under xwayland with dri3 & glamor
Status: RESOLVED NOTOURBUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: XWayland (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-06 01:37 UTC by Boyan Ding
Modified: 2014-07-12 10:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Boyan Ding 2014-07-06 01:37:19 UTC
Recent mainlined dri3 & glamor support can cause glxgears stop rendering.

Steps to reproduce (both happens under weston and gnome on wayland):
1. run glxgears
2. wait until the animation stop (which can happen at any time). Notice the refresh rate output in the terminal also stops (I guess it gets stuck somewhere in the main loop)

This issue don't appear without dri3 & glamor (when llvmpipe is used).

Versions:
xwayland(xserver) (HEAD): 1.15.99.903-0-g7a4854
mesa: 10.2.2
libdrm: 2.4.54

Hardware:
Intel(R) HD Graphics 4000
Comment 1 Boyan Ding 2014-07-09 01:28:27 UTC
I built a glxgears with debug symbols and used gdb, I discovered pressing 'a' several times (to pause and restart animation) can effectively trigger the halt, and the stack trace when it is halted is always as below (sorry I used heavily optimized and stripped binaries, I am too lazy to build them myself):

#0  0x00007ffff70cd800 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007ffff5626992 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007ffff5627dc9 in xcb_wait_for_special_event ()
   from /usr/lib/libxcb.so.1
#3  0x00007ffff7bb9244 in ?? () from /usr/lib/libGL.so.1
#4  0x00007ffff7bb9845 in ?? () from /usr/lib/libGL.so.1
#5  0x00007ffff7bba235 in ?? () from /usr/lib/libGL.so.1
#6  0x00007ffff36378b7 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#7  0x00007ffff3637be5 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#8  0x00007ffff362c71d in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
#9  0x00000000004027fa in draw () at gears.c:183
#10 0x00007ffff76c1ac4 in ?? () from /usr/lib/libglut.so.3
#11 0x00007ffff76c5329 in fgEnumWindows () from /usr/lib/libglut.so.3
#12 0x00007ffff76c207d in glutMainLoopEvent () from /usr/lib/libglut.so.3
#13 0x00007ffff76c28e5 in glutMainLoop () from /usr/lib/libglut.so.3
#14 0x00000000004031af in main (argc=1, argv=0x7fffffffeb78) at gears.c:405

line 183 at draw() is:
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

I guess it has something to do with dri3.
Comment 2 Boyan Ding 2014-07-09 02:00:25 UTC
Finally built mesa (10.2.3) myself with debug symbols and backtrace is as below:
#0  0x00007ffff70bd800 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007ffff55fc992 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007ffff55fddc9 in xcb_wait_for_special_event ()
   from /usr/lib/libxcb.so.1
#3  0x00007ffff7bbc495 in dri3_find_back (c=0x605790, priv=0xa346e0)
    at dri3_glx.c:1103
#4  0x00007ffff7bbc51b in dri3_get_buffer (driDrawable=0x6a48e0, format=4107, 
    buffer_type=dri3_buffer_back, loaderPrivate=0xa346e0) at dri3_glx.c:1127
#5  0x00007ffff7bbc92e in dri3_get_buffers (driDrawable=0x6a48e0, format=4107, 
    stamp=0x6a4910, loaderPrivate=0xa346e0, buffer_mask=1, 
    buffers=0x7fffffffe640) at dri3_glx.c:1274
#6  0x00007ffff3563c10 in intel_update_image_buffers (brw=0x7ffff7fd4040, 
    drawable=0x6a48e0) at brw_context.c:1395
#7  0x00007ffff3563436 in intel_update_renderbuffers (context=0x6a4020, 
    drawable=0x6a48e0) at brw_context.c:1087
#8  0x00007ffff35634cd in intel_prepare_render (brw=0x7ffff7fd4040)
    at brw_context.c:1108
#9  0x00007ffff3556969 in brw_clear (ctx=0x7ffff7fd4040, mask=18)
    at brw_clear.c:234
#10 0x00007ffff31b875e in _mesa_Clear (mask=16640) at main/clear.c:226
#11 0x00000000004027fa in draw () at gears.c:183
#12 0x00007ffff76b1ac4 in ?? () from /usr/lib/libglut.so.3
#13 0x00007ffff76b5329 in fgEnumWindows () from /usr/lib/libglut.so.3
#14 0x00007ffff76b207d in glutMainLoopEvent () from /usr/lib/libglut.so.3
#15 0x00007ffff76b28e5 in glutMainLoop () from /usr/lib/libglut.so.3
#16 0x00000000004031af in main (argc=1, argv=0x7fffffffeb78) at gears.c:405

Seems that it halts in waiting for back buffers.
Comment 3 Boyan Ding 2014-07-12 10:03:15 UTC
It's the bug of libxcb 1.10
Fixed in http://cgit.freedesktop.org/xcb/libxcb/commit/?id=3b72a2c9d1d656c74c691a45689e1d637f669e3a


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.