[Bug 98645] New: X Freeze while rendering video with multiple displays and TearFree enabled

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 8 22:37:52 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98645

            Bug ID: 98645
           Summary: X Freeze while rendering video with multiple displays
                    and TearFree enabled
           Product: xorg
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Driver/Radeon
          Assignee: xorg-driver-ati at lists.x.org
          Reporter: charlotte0m at gmail.com
        QA Contact: xorg-team at lists.x.org

Created attachment 127849
  --> https://bugs.freedesktop.org/attachment.cgi?id=127849&action=edit
system diagnostics

This was first observed while rendering video in our application after
upgrading to Ubuntu 16.04 and enabling TearFree setting.  We have reproduced
the issue outside of our application with a minimal code sample:
    https://github.com/charo-m/4K_displaywall_bench/tree/amd_xfreeze_repro

steps to reproduce:
git clone https://github.com/charo-m/4K_displaywall_bench.git
git checkout amd_xfreeze_repro
sudo apt-get install libxrandr-dev libxinerama-dev libxcursor-dev libglfw3-dev
libglm-dev
cmake .
make
./4K_displaywall_bench -width 3840 -height 1080 -swap_interval 1 -gl 3 -i
images/bubble4K.png


X.Org X Server 1.18.4
09:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Tahiti XT GL [FirePro W9000]
OpenGL renderer string: Gallium 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.8.0)
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.2.0
OS:    Ubuntu 16.04.1 LTS
Kernel:  4.4.0-45-generic

Two 2K monitors:
  1920x1080 @ 60Hz  (not rotated)  DP1 at pos 0x0, DP2 at pos 1920x0
Server hardware:
  Dell  Precision T5600

**** Option “TearFree” “on”  ****


The issue does not seem to happen with a single monitor.  The code sample
re-uploads the same image data every frame with glTexSubImage2D.  The
"-swap_interval [0|1]" option maps to glXSwapIntervalEXT(0) which disables
vsync or glXSwapIntervalEXT(1) which enables vsync.  The issue seems to be a
race condition and so is more likely to happen under certain conditions (at
least two monitors, T5600, tearfree enabled).

single monitor:
./4K_displaywall_bench -width 1920 -height 1080 -swap_interval 1 -gl 3 -i
images/bubble4K.png   -> unlikely to happen at all / never reproduced

two monitors, viewport covers both, vsync enabled:
./4K_displaywall_bench -width 3840 -height 1080 -swap_interval 1 -gl 3 -i
images/bubble4K.png   -> most likely to happen (usually within 15 min, but not
always)

two monitors, viewport only covers first, vsync enabled:
./4K_displaywall_bench -width 1920 -height 1080 -swap_interval 1 -gl 3 -i
images/bubble4K.png   -> unlikely to happen

two monitors, viewport covers both, vsync disabled:
./4K_displaywall_bench -width 3840 -height 1080 -swap_interval 0 -gl 3 -i
images/bubble4K.png   -> unlikely to happen


stacktrace:
Thread 2 (Thread 0x7f61abb7e700 (LWP 8249)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f61afed8213 in cnd_wait (mtx=0xdef5b0, cond=0xdef5d8)
    at ../../../../../../include/c11/threads_posix.h:159
#2  pipe_semaphore_wait (sema=0xdef5b0) at
../../../../../../src/gallium/auxiliary/os/os_thread.h:259
#3  radeon_drm_cs_emit_ioctl (param=param at entry=0xdef180)
    at ../../../../../../src/gallium/winsys/radeon/drm/radeon_drm_winsys.c:688
#4  0x00007f61afed7937 in impl_thrd_routine (p=<optimized out>) at
../../../../../../include/c11/threads_posix.h:87
#5  0x00007f61b34ea6fa in start_thread (arg=0x7f61abb7e700) at
pthread_create.c:333
#6  0x00007f61b3d48b5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f61b4ecb740 (LWP 8248)):
#0  0x00007f61b3d3ce8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f61b289cc62 in poll (__timeout=-1, __nfds=1, __fds=0x7ffdbd4045a0)
    at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  _xcb_conn_wait (c=c at entry=0xd64000, cond=cond at entry=0x7ffdbd4046c0,
vector=vector at entry=0x0, 
    count=count at entry=0x0) at ../../src/xcb_conn.c:459
#3  0x00007f61b289e617 in wait_for_reply (c=c at entry=0xd64000, request=279249,
e=e at entry=0x7ffdbd404790)
    at ../../src/xcb_in.c:516
#4  0x00007f61b289e721 in xcb_wait_for_reply (c=c at entry=0xd64000,
request=279249, e=e at entry=0x7ffdbd404790)
    at ../../src/xcb_in.c:546
#5  0x00007f61b373da47 in _XReply (dpy=dpy at entry=0xd62cf0,
rep=rep at entry=0x7ffdbd404810, extra=extra at entry=0, 
    discard=discard at entry=0) at ../../src/xcb_io.c:602
#6  0x00007f61b1c3a29a in DRI2GetBuffersWithFormat (dpy=0xd62cf0,
drawable=2097159, width=width at entry=0xf52e38, 
    height=height at entry=0xf52e3c, attachments=0x7ffdbd4049b0, count=1,
outCount=0x7ffdbd404970)
    at ../../../src/glx/dri2.c:491
#7  0x00007f61b1c3a5d7 in dri2GetBuffersWithFormat (driDrawable=<optimized
out>, width=0xf52e38, height=0xf52e3c, 
    attachments=<optimized out>, count=<optimized out>,
out_count=0x7ffdbd404970, loaderPrivate=0xf53df0)
    at ../../../src/glx/dri2_glx.c:900
#8  0x00007f61afb4674a in dri2_drawable_get_buffers (count=<synthetic pointer>,
atts=0xf54550, drawable=0xf53ee0)
    at ../../../../../src/gallium/state_trackers/dri/dri2.c:213
#9  dri2_allocate_textures (ctx=0xd971f0, drawable=0xf53ee0, statts=0xf54550,
statts_count=2)
    at ../../../../../src/gallium/state_trackers/dri/dri2.c:407
#10 0x00007f61afb42f9c in dri_st_framebuffer_validate (stctx=<optimized out>,
stfbi=<optimized out>, 
    statts=0xf54550, count=2, out=0x7ffdbd404ae0)
    at ../../../../../src/gallium/state_trackers/dri/dri_drawable.c:83
#11 0x00007f61afa693be in st_framebuffer_validate (stfb=0xf540f0,
st=st at entry=0xf4acc0)
    at ../../../src/mesa/state_tracker/st_manager.c:202
#12 0x00007f61afa6a929 in st_manager_validate_framebuffers
(st=st at entry=0xf4acc0)
    at ../../../src/mesa/state_tracker/st_manager.c:877
#13 0x00007f61afa0fa12 in st_validate_state (st=st at entry=0xf4acc0,
pipeline=pipeline at entry=ST_PIPELINE_RENDER)
    at ../../../src/mesa/state_tracker/st_atom.c:235
#14 0x00007f61afa17a61 in st_Clear (ctx=0xf06460, mask=18) at
../../../src/mesa/state_tracker/st_cb_clear.c:393
#15 0x0000000000405605 in proto::Scene::Draw() ()
#16 0x0000000000402ca5 in main ()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-driver-ati/attachments/20161108/3032cb54/attachment.html>


More information about the xorg-driver-ati mailing list