Bug 622365 - glxgears doesn't terminate.... hangs on mutex (other apps too?)
Summary: glxgears doesn't terminate.... hangs on mutex (other apps too?)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-09 05:08 UTC by Tom London
Modified: 2010-09-09 15:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-09 15:48:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom London 2010-08-09 05:08:42 UTC
Description of problem:

I've been BZ-ing an issue with clementine hanging on a dri2/glx type mutex on exiting: https://bugzilla.redhat.com/show_bug.cgi?id=621913

If I run 'glxgears', it runs fine, but it hangs on exit (similar to backtrace for clementine):

__lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
136	2:	movl	%edx, %eax
(gdb) where
#0  __lll_lock_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x0000003626e094a4 in _L_lock_996 () from /lib64/libpthread.so.0
#2  0x0000003626e092ba in __pthread_mutex_lock (mutex=0x3c5886d290)
    at pthread_mutex_lock.c:61
#3  0x0000003c5862685e in __glXInitialize (dpy=0x1979010) at glxext.c:828
#4  0x0000003c58644153 in dri2GetGlxDrawableFromXDrawableId (
    dpy=<value optimized out>, id=<value optimized out>) at dri2_glx.c:774
#5  0x0000003c5864448b in DRI2WireToEvent (dpy=0x1979010, event=0x1cd9698, 
    wire=0x19908c0) at dri2.c:105
#6  0x0000003c514468de in _XEnq (dpy=0x1979010, event=<value optimized out>)
    at XlibInt.c:2431
#7  0x0000003c5144d293 in handle_response (dpy=0x1979010, response=0x19908c0, 
    in_XReply=<value optimized out>) at xcb_io.c:279
#8  0x0000003c5144dc30 in _XReply (dpy=0x1979010, rep=0x7fff3fae6f80, extra=0, 
    discard=1) at xcb_io.c:554
#9  0x0000003c514414b3 in XSync (dpy=0x1979010, discard=0) at Sync.c:46
#10 0x0000003c58625145 in GarbageCollectDRIDrawables (dpy=0x1979010, 
    gc=0x198d1a0) at glxcmds.c:98
#11 DestroyContext (dpy=0x1979010, gc=0x198d1a0) at glxcmds.c:586
#12 0x00000000004032a9 in ?? ()
#13 0x0000003626a1ecdd in __libc_start_main (main=0x4027c0, argc=1, 
    ubp_av=0x7fff3fae7488, init=<value optimized out>, 
---Type <return> to continue, or q <return> to quit---
    fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=0x7fff3fae7478) at libc-start.c:226
#14 0x00000000004017a9 in ?? ()
#15 0x00007fff3fae7478 in ?? ()
#16 0x000000000000001c in ?? ()
#17 0x0000000000000001 in ?? ()
#18 0x00007fff3fae9288 in ?? ()
#19 0x0000000000000000 in ?? ()
(gdb) 
(gdb)

Hardware is Thinkpax X200 with Intel graphics:
[tbl@tlondon ~]$ lspci | grep Graphic
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
[tbl@tlondon ~]$ 

I run with compiz.

Version-Release number of selected component (if applicable):
mesa-dri-drivers-experimental-7.9-0.6.fc14.x86_64
mesa-debuginfo-7.9-0.6.fc14.x86_64
mesa-libGLU-7.9-0.6.fc14.x86_64
mesa-dri-drivers-7.9-0.6.fc14.i686
mesa-libGLU-devel-7.9-0.6.fc14.x86_64
xorg-x11-drv-intel-2.12.0-4.fc14.x86_64
mesa-dri-drivers-7.9-0.6.fc14.x86_64
mesa-libGL-7.9-0.6.fc14.i686
mesa-libGL-7.9-0.6.fc14.x86_64
mesa-libGL-devel-7.9-0.6.fc14.x86_64
mesa-libGLU-7.9-0.6.fc14.i686



How reproducible:
Every time

Steps to Reproduce:
1. start glxgears
2. after a few cycles, enter ESC, etc.  
3. process hangs.  use 'gdb -p XXXX' to get backtrace
  
Actual results:


Expected results:


Additional info:

Comment 1 Tom London 2010-08-09 05:12:08 UTC
Sorry, forgot version of glx-utils:

glx-utils-7.9-0.6.fc14.x86_64

Comment 2 Tom London 2010-08-09 14:15:17 UTC
BTW, here is a better backtrace:

Loaded symbols for /usr/lib64/libdrm_intel.so.1
__lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
136	2:	movl	%edx, %eax
(gdb) set pagination off
(gdb) bt full
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
No locals.
#1  0x0000003626e094a4 in _L_lock_996 () from /lib64/libpthread.so.0
No symbol table info available.
#2  0x0000003626e092ba in __pthread_mutex_lock (mutex=0x3c5886d290) at pthread_mutex_lock.c:61
        __PRETTY_FUNCTION__ = "__pthread_mutex_lock"
        type = <value optimized out>
        id = 4735
#3  0x0000003c5862685e in __glXInitialize (dpy=0x1dc1010) at glxext.c:828
        info = 0x1dcc3d0
        privList = <value optimized out>
        private = <value optimized out>
        found = <value optimized out>
        dpyPriv = <value optimized out>
        dataObj = <value optimized out>
        major = <value optimized out>
        glx_direct = <value optimized out>
        glx_accel = <value optimized out>
#4  0x0000003c58644153 in dri2GetGlxDrawableFromXDrawableId (dpy=<value optimized out>, id=<value optimized out>) at dri2_glx.c:774
        d = <value optimized out>
        pdp = <value optimized out>
        pdraw = 0x3c5862602a
#5  0x0000003c5864448b in DRI2WireToEvent (dpy=0x1dc1010, event=0x21f1408, wire=0x1dd88c0) at dri2.c:105
        aevent = 0x21f1408
        awire = 0x1dd88c0
        pdraw = <value optimized out>
        info = <value optimized out>
        glx_info = 0x1dcc3d0
#6  0x0000003c514468de in _XEnq (dpy=0x1dc1010, event=<value optimized out>) at XlibInt.c:2431
        qelt = 0x21f1400
        type = <value optimized out>
        extension = <value optimized out>
#7  0x0000003c5144d293 in handle_response (dpy=0x1dc1010, response=0x1dd88c0, in_XReply=<value optimized out>) at xcb_io.c:279
        async = <value optimized out>
        next = <value optimized out>
#8  0x0000003c5144dc30 in _XReply (dpy=0x1dc1010, rep=0x7fff6ef9f650, extra=0, discard=1) at xcb_io.c:554
        event = <value optimized out>
        req = 0x216b950
        response = 0x0
        error = 0x0
        c = 0x1dc2370
        reply = <value optimized out>
        current = 0x1ddb010
        __PRETTY_FUNCTION__ = "_XReply"
#9  0x0000003c514414b3 in XSync (dpy=0x1dc1010, discard=0) at Sync.c:46
        rep = {type = 88 'X', revertTo = 247 '\367', sequenceNumber = 28409, length = 32767, focus = 1363325505, pad1 = 60, pad2 = 31199248, pad3 = 0, pad4 = 1, pad5 = 0}
        req = <value optimized out>
#10 0x0000003c586251d9 in GarbageCollectDRIDrawables (dpy=0x1dc1010, gc=0x1dd51a0) at glxcmds.c:114
        draw = 88080386
        pdraw = 0x1dd5430
        xwa = {x = 4, y = 49, width = 300, height = 300, border_width = 0, depth = 24, visual = 0x1dcbd80, root = 189, class = 1, bit_gravity = 0, win_gravity = 1, backing_store = 0, backing_planes = 4294967295, backing_pixel = 0, save_under = 0, colormap = 88080385, map_installed = 0, map_state = 2, all_event_masks = 6455313, your_event_mask = 163841, do_not_propagate_mask = 0, override_redirect = 0, screen = 0x1dcbb20}
        oldXErrorHandler = 0x3c514466c0 <_XDefaultError>
#11 DestroyContext (dpy=0x1dc1010, gc=0x1dd51a0) at glxcmds.c:586
        req = <value optimized out>
        xid = 88080387
        opcode = 153 '\231'
        imported = 0 '\000'
#12 0x00000000004032a9 in main (argc=<value optimized out>, argv=<value optimized out>) at glxgears.c:782
        winWidth = 300
        winHeight = 300
        x = 0
        y = 0
        dpy = 0x1dc1010
        win = 88080386
        ctx = 0x1dd51a0
        dpyName = <value optimized out>
        printInfo = 0 '\000'
        i = <value optimized out>
(gdb)

Comment 3 Tom London 2010-08-09 14:21:53 UTC
Not sure its helpful, but here is a valgrind run when glxgears 'freezes':

[tbl@tlondon ~]$ valgrind glxgears
==4959== Memcheck, a memory error detector
==4959== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==4959== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==4959== Command: glxgears
==4959== 
==4959== Syscall param ioctl(generic) points to uninitialised byte(s)
==4959==    at 0x3626AD7577: ioctl (syscall-template.S:82)
==4959==    by 0x3632603387: drmIoctl (xf86drm.c:184)
==4959==    by 0x36326035CB: drmCommandWriteRead (xf86drm.c:2390)
==4959==    by 0x505DA52: intel_get_param.clone.0 (intel_screen.c:234)
==4959==    by 0x505DB01: intelInitScreen2 (intel_screen.c:454)
==4959==    by 0x504E082: dri2CreateNewScreen (dri_util.c:868)
==4959==    by 0x3C58643D3E: dri2CreateScreen (dri2_glx.c:694)
==4959==    by 0x3C58626D22: __glXInitialize (glxext.c:794)
==4959==    by 0x3C586228C1: GetGLXPrivScreenConfig (glxcmds.c:194)
==4959==    by 0x3C58623DBE: glXChooseVisual (glxcmds.c:1507)
==4959==    by 0x402A36: main (glxgears.c:515)
==4959==  Address 0x7fefff724 is on thread 1's stack
==4959== 
==4959== Syscall param ioctl(generic) points to uninitialised byte(s)
==4959==    at 0x3626AD7577: ioctl (syscall-template.S:82)
==4959==    by 0x54826BE: drm_intel_bufmgr_gem_init (intel_bufmgr_gem.c:2118)
==4959==    by 0x505DC20: intelInitScreen2 (intel_screen.c:398)
==4959==    by 0x504E082: dri2CreateNewScreen (dri_util.c:868)
==4959==    by 0x3C58643D3E: dri2CreateScreen (dri2_glx.c:694)
==4959==    by 0x3C58626D22: __glXInitialize (glxext.c:794)
==4959==    by 0x3C586228C1: GetGLXPrivScreenConfig (glxcmds.c:194)
==4959==    by 0x3C58623DBE: glXChooseVisual (glxcmds.c:1507)
==4959==    by 0x402A36: main (glxgears.c:515)
==4959==  Address 0x7fefff6e4 is on thread 1's stack
==4959== 
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
==4959== Conditional jump or move depends on uninitialised value(s)
==4959==    at 0x3C5864448F: DRI2WireToEvent (dri2.c:106)
==4959==    by 0x3C514468DD: _XEnq (XlibInt.c:2431)
==4959==    by 0x3C5144D292: handle_response (xcb_io.c:279)
==4959==    by 0x3C5144DC2F: _XReply (xcb_io.c:554)
==4959==    by 0x3C58644E80: DRI2GetBuffersWithFormat (dri2.c:446)
==4959==    by 0x3C58643823: dri2GetBuffersWithFormat (dri2_glx.c:498)
==4959==    by 0x5055905: intel_update_renderbuffers (intel_context.c:278)
==4959==    by 0x5055CFD: intel_prepare_render (intel_context.c:425)
==4959==    by 0x5054FDA: intelClear (intel_clear.c:95)
==4959==    by 0x401993: draw (glxgears.c:253)
==4959==    by 0x4031C0: main (glxgears.c:315)
==4959== 
236 frames in 5.0 seconds = 47.049 FPS
==4959== Conditional jump or move depends on uninitialised value(s)
==4959==    at 0x3C5864448F: DRI2WireToEvent (dri2.c:106)
==4959==    by 0x3C514468DD: _XEnq (XlibInt.c:2431)
==4959==    by 0x3C5144D292: handle_response (xcb_io.c:279)
==4959==    by 0x3C5144D894: _XEventsQueued (xcb_io.c:304)
==4959==    by 0x3C5143664C: XPending (Pending.c:55)
==4959==    by 0x402FB6: main (glxgears.c:686)
==4959== 
281 frames in 5.0 seconds = 56.198 FPS
275 frames in 5.0 seconds = 54.835 FPS

Comment 4 Tom London 2010-09-09 15:48:18 UTC
I can no longer reproduce this with

mesa-libGL-7.9-0.7.fc15.i686
mesa-dri-drivers-7.9-0.7.local.fc15.x86_64
mesa-dri-drivers-experimental-7.9-0.7.local.fc15.x86_64
mesa-debuginfo-7.9-0.7.local.fc15.x86_64
mesa-libGL-7.9-0.7.local.fc15.x86_64
mesa-libGL-devel-7.9-0.7.local.fc15.x86_64
xorg-x11-drv-intel-2.12.0-4.fc14.x86_64
glx-utils-7.9-0.7.fc15.x86_64
mesa-libGLU-7.9-0.7.local.fc15.x86_64
mesa-libGLU-devel-7.9-0.7.local.fc15.x86_64
mesa-dri-drivers-7.9-0.7.fc15.i686
mesa-libGLU-7.9-0.7.fc15.i686

I'll close this "RAWHIDE".


Note You need to log in before you can comment on or make changes to this bug.