Bug 36563 - Unity locks up with latest xorg/mesa/dri/drm
Summary: Unity locks up with latest xorg/mesa/dri/drm
Status: RESOLVED WORKSFORME
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-25 01:16 UTC by Ernst Sjöstrand
Modified: 2015-07-07 23:47 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Output of gdb after attaching to frozen/hung compiz (32.08 KB, text/plain)
2011-05-22 14:37 UTC, Rune K. Svendsen
Details
Output of running 'thread apply all bt full' in gdb after attaching to frozen/hung compiz (55.08 KB, text/plain)
2011-05-25 12:27 UTC, Rune K. Svendsen
Details
Second output of running 'thread apply all bt full' in gdb after attaching to frozen/hung compiz (46.38 KB, text/plain)
2011-05-25 12:34 UTC, Rune K. Svendsen
Details

Description Ernst Sjöstrand 2011-04-25 01:16:00 UTC
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00007f643c9615b4 in _L_lock_944 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f643c9613ca in __pthread_mutex_lock (mutex=0xf09a68) at pthread_mutex_lock.c:61
#3  0x00007f6432d91f9d in radeon_bo (radeon=0xf09a10, handle=21, size=0, alignment=0) at radeon_bo.c:78
#4  0x00007f6432d8d612 in r600_bo_handle (radeon=0xf09a10, handle=21, array_mode=0x7fff0d9888ec) at r600_bo.c:83
#5  0x00007f6432d7770d in r600_texture_from_handle (screen=0xf09bd0, templ=0x7fff0d988990, whandle=0x7fff0d9889d0) at r600_texture.c:484
#6  0x00007f6432d8b29a in dri2_drawable_process_buffers (drawable=0x7f6434095e20, statts=<value optimized out>, count=228100616) at dri2.c:253
#7  dri2_allocate_textures (drawable=0x7f6434095e20, statts=<value optimized out>, count=228100616) at dri2.c:363
#8  0x00007f6432d8c1f7 in dri_st_framebuffer_validate (stfbi=<value optimized out>, statts=0x7fff0d988a80, count=1, out=0x0) at dri_drawable.c:73
#9  0x00007f6432d8c370 in dri_drawable_validate_att (pDRICtx=<value optimized out>, target=3553, format=8410, dPriv=<value optimized out>)
    at dri_drawable.c:185
#10 dri_set_tex_buffer2 (pDRICtx=<value optimized out>, target=3553, format=8410, dPriv=<value optimized out>) at dri_drawable.c:199
#11 0x00007f6433bc41fe in TfpTexture::bindPixmapToTexture(unsigned long, int, int, int) () from /usr/lib/compiz/libopengl.so
#12 0x00007f6433bc9cf4 in boost::detail::function::function_invoker4<GLTexture::List (*)(unsigned long, int, int, int), GLTexture::List, unsigned long, int, int, int>::invoke(boost::detail::function::function_buffer&, unsigned long, int, int, int) () from /usr/lib/compiz/libopengl.so
#13 0x00007f6433bc3cb4 in GLTexture::bindPixmapToTexture(unsigned long, int, int, int) () from /usr/lib/compiz/libopengl.so
#14 0x00007f643072ff79 in DecorTexture::DecorTexture(unsigned long) () from /usr/lib/compiz/libdecor.so
#15 0x00007f6430730095 in DecorScreen::getTexture(unsigned long) () from /usr/lib/compiz/libdecor.so
#16 0x00007f6430730678 in Decoration::create(unsigned long, unsigned long) () from /usr/lib/compiz/libdecor.so
#17 0x00007f6430730704 in DecorWindow::updateDecoration() () from /usr/lib/compiz/libdecor.so
#18 0x00007f6430733593 in DecorScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libdecor.so
#19 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#20 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#21 0x00007f642fef44bf in RegexScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libregex.so
#22 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#23 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#24 0x00007f642f3c97bc in MoveScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libmove.so
#25 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#26 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#27 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#28 0x00007f642d2bb1ad in WorkaroundsScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libworkarounds.so
#29 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#30 0x00007f642ce7c396 in ResizeScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libresize.so
#31 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#32 0x00007f642cc626c1 in FadeScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libfade.so
#33 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#34 0x00007f642ca4d0cb in UnityMTGrabHandlesScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libunitymtgrabhandles.so
#35 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#36 0x00007f642c62a3c7 in PrivateScaleScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libscale.so
#37 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#38 0x00007f642c40f3c0 in SessionScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libsession.so
#39 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#40 0x00007f642c174829 in UnityScreen::handleEvent(_XEvent*) () from /usr/lib/compiz/libunityshell.so
#41 0x000000000044e9a3 in CompScreen::handleEvent(_XEvent*) ()
#42 0x000000000042e59b in PrivateScreen::processEvents() ()
#43 0x0000000000455958 in CompEventSource::callback() ()
#44 0x00007f643db83daf in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) () from /usr/lib/libglibmm-2.4.so.1
#45 0x00007f643d032bcd in g_main_dispatch (context=0xea3f30) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:2440
#46 g_main_context_dispatch (context=0xea3f30) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3013
#47 0x00007f643d0333a8 in g_main_context_iterate (context=0xea3f30, block=<value optimized out>, dispatch=1, self=<value optimized out>)
    at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3091
#48 0x00007f643d0339f2 in g_main_loop_run (loop=0xee5620) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3299
#49 0x000000000042a2ea in CompScreen::eventLoop() ()
#50 0x0000000000423160 in main ()
Comment 1 Ernst Sjöstrand 2011-04-26 21:35:31 UTC
I was in a hurry but I thought it was better with a quick bugreport than no report at all. :-)
This was with Ubuntu Natty's 2.6.38 kernel + xorg-edgers 20110422.
Can't remember exactly what I did, some window management operation. Hasn't happened since.
Attached to compiz with gdb from the console and got the backtrace when this happened.
Comment 2 Rune K. Svendsen 2011-05-22 14:37:17 UTC
Created attachment 47018 [details]
Output of gdb after attaching to frozen/hung compiz

I'm experiencing this bug as well, it seems. I'm attaching the output of gdb after attaching to compiz (which is what hangs/freezes).

This bug happens when a new window wants to open. That's my experience at least. It can be any window. A new dialog in an existing program, or a new program opening up a window (for example mplayer).

This happens for me using mesa from git from this PPA: https://launchpad.net/~oibaf/+archive/graphics-drivers/

I'm on r600g and x86-64 as well.
Comment 3 Michel Dänzer 2011-05-23 00:31:17 UTC
Looks like it's hanging when trying to acquire the radeon->bo_handles_mutex . Does running

 thread apply all bt full

in gdb give backtraces for any other threads?
Comment 4 Ernst Sjöstrand 2011-05-23 01:18:46 UTC
Yes, it's probably when a new window is created or similar. But just opening 100 gnome-terminals doesn't trigger it so it's not super easy to trigger.
Comment 5 Rune K. Svendsen 2011-05-25 12:27:24 UTC
Created attachment 47157 [details]
Output of running 'thread apply all bt full' in gdb after attaching to frozen/hung compiz

(In reply to comment #3)
> Looks like it's hanging when trying to acquire the radeon->bo_handles_mutex .
> Does running
> 
>  thread apply all bt full
> 
> in gdb give backtraces for any other threads?

I'm attaching the output of that command here.
Please let me know if I'm missing any relevant debug symbols. I can see a lot of the loaded libraries don't have debug symbols, so please let me know which are relevant, if any.
Comment 6 Rune K. Svendsen 2011-05-25 12:34:00 UTC
Created attachment 47160 [details]
Second output of running 'thread apply all bt full' in gdb after attaching to frozen/hung compiz

It just happened again.
I did a 'thread apply all bt full' again, and I can see that the output isn't the same as the previous time. So I'm attaching this output in case it's relevant.
Comment 7 Rune K. Svendsen 2011-05-26 12:35:15 UTC
I have found a reliable way of reproducing this bug on this computer at least.

Compiz must be enabled.
1. Go to CompizConfig Settings Manager (ccsm)
2. Under "Window Management"->"Resize Window" in the "General" tab, choose "Normal" as the Default Resize Mode. This will cause windows to resize real-time, as they are dragged by their corners/sides.
3. Open up gnome-terminal and start resizing the window quickly, it will lag a lot and eventually hang compiz.

The output of gdb after attaching is similar to that of the "Second output" (https://bugs.freedesktop.org/attachment.cgi?id=47160) attached to this bug report. Ie. line #3 in Thread 1 is "radeon_bo_destroy" followed by "radeon_bo_reference" "r600_bo_destroy" "r600_bo_reference" etc.
Comment 8 Ernst Sjöstrand 2015-07-07 23:47:32 UTC
Old stuff not an issue anymore.


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.