Compiz hangs with a black screen

Bug #1008808 reported by Bernie Innocenti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Incomplete
Undecided
Unassigned

Bug Description

I'm using Ubuntu Precise with unity_5.12-0ubuntu1 and compiz_1:0.9.7.8-0ubuntu1 on a desktop. This has already happened twice: when I arrive at work I turn on my monitor and the gnome-lockscreen dialog doesn't show up. The screen remains completely black except for the mouse pointer moving around.

The desktop can be recovered by logging into a text console, killing compiz and then restarting it with "unity --replace".

This time I had unity already running from the text console, so I could capture the following stderr output:

WARN 2012-06-01 20:47:24 unity <unknown>:0 Unable to fetch children: No such interface `org.ayatana.bamf.view' on object at path /org/ayatana/bamf/application1562360038

[1565:1579:775134508833:ERROR:platform_thread_posix.cc(251)] Not implemented reached in static void base::PlatformThread::SetThreadPriority(base::PlatformThreadHandle, base::ThreadPriority)
[1136:1583:775200471562:ERROR:platform_thread_posix.cc(251)] Not implemented reached in static void base::PlatformThread::SetThreadPriority(base::PlatformThreadHandle, base::ThreadPriority)
[1136:1587:775203999881:ERROR:platform_thread_posix.cc(251)] Not implemented reached in static void base::PlatformThread::SetThreadPriority(base::PlatformThreadHandle, base::ThreadPriority)
[24705:24705:775210245400:ERROR:tab_strip_gtk.cc(1265)] Not implemented reached
in virtual void TabStripGtk::StopAllHighlighting()

WARN 2012-06-04 11:47:14 unity <unknown>:0 Failed to fetch path: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Revision history for this message
Bernie Innocenti (codewiz) wrote :

I could reproduce this also on my Laptop just after resume from suspend, which is running precise but has a different video card (Intel vs Nvidia). I guess this excludes a driver bug. Other observations:

 - The compiz process keeps running and seems to be talking to X
 - The mouse cursor changes shape near the center of the screen, where the password prompt usually is
 - I don't see "/usr/bin/python /usr/bin/unity" in the process list. maybe it has crashed?
 - It's quite hard to trigger on the laptop... I've seen it maybe twice
 - The desktop is a new install, the laptop has been upgraded from oneiric
 - Both the desktop and the laptop have similar compiz settings. They're pretty close to defaults, except that i configured 4 virtual desktops horizontally and enabled the Desktop Wall plugin.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bernie,

Using the attached script, could you please generate some stack data of compiz when it is hung? To do this...

1. Download the attached dstack script to your home directory.
2. Wait for the bug to occur again.
3. Switch to a virtual terminal: Ctrl+Alt+F1, and log in.
4. Run: sudo sh ./dstack compiz >> compizstack.txt
5. Repeat #4 a couple of times.
6. Attach the file "compizstack.txt" to this bug.

Changed in compiz:
status: New → Incomplete
Revision history for this message
Bernie Innocenti (codewiz) wrote :
Download full text (5.9 KiB)

I experienced the same bug on my Thinkpad, which has an Intel video card. So at least we know it's not a driver issue.

This time I could get a stacktrace from gdb:

#0 0x00007ffff733bb03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff5247862 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007ffff5248d5f in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007ffff5248f7b in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4 0x00007ffff6d4209d in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5 0x00007fffeb578841 in DRI2GetBuffersWithFormat (dpy=0x6176b0, drawable=98, width=0x6a5288, height=0x6a528c, attachments=0x400e8b0, count=4, outCount=0x7fffffffd24c)
    at dri2.c:470
#6 0x00007fffeb57648c in dri2GetBuffersWithFormat (driDrawable=<optimized out>, width=0x6a5288, height=0x6a528c, attachments=<optimized out>, count=<optimized out>,
    out_count=0x7fffffffd24c, loaderPrivate=0x6a5180) at dri2_glx.c:771
#7 0x00007fffeaa34c3c in intel_query_dri2_buffers_with_separate_stencil (count=0x7fffffffd24c, attachments=<synthetic pointer>, buffers=<synthetic pointer>,
    drawable=0x6a5260, intel=0x7ffff7fd0040) at intel_context.c:1183
#8 intel_update_renderbuffers (context=<optimized out>, drawable=0x6a5260) at intel_context.c:304
#9 0x00007fffeaa358e2 in intel_prepare_render (intel=<optimized out>) at intel_context.c:396
#10 0x00007fffeaa4f2a6 in brw_try_draw_prims (max_index=3, min_index=0, ib=0x0, nr_prims=1, prim=0x70c5ac, arrays=0x70e018, ctx=0x7ffff7fd0040) at brw_draw.c:449
#11 brw_draw_prims (ctx=0x7ffff7fd0040, arrays=0x70e018, prim=0x70c5ac, nr_prims=1, ib=0x0, index_bounds_valid=<optimized out>, min_index=0, max_index=3,
    tfb_vertcount=0x0) at brw_draw.c:566
#12 0x00007fffea6bf078 in vbo_exec_vtx_flush (exec=0x70bd70, keepUnmapped=1 '\001') at vbo/vbo_exec_draw.c:407
#13 0x00007fffea6b434c in vbo_exec_FlushVertices_internal (exec=0x70bd70, unmap=<optimized out>) at vbo/vbo_exec_api.c:444
#14 0x00007fffea6bcdec in vbo_exec_FlushVertices (ctx=0x7ffff7fd0040, flags=<optimized out>) at vbo/vbo_exec_api.c:1195
#15 0x00007fffea68219e in _mesa_BindTexture (target=3553, texName=0) at main/texobj.c:1123
#16 0x00007fffeb7c2242 in GLTexture::disable() () from /usr/lib/compiz/libopengl.so
#17 0x00007fffe29f27ae in unity::UnityScreen::paintPanelShadow(GLMatrix const&) () from /usr/lib/compiz/libunityshell.so
#18 0x00007fffe29fd7aa in unity::UnityWindow::glDraw(GLMatrix const&, GLFragment::Attrib&, CompRegion const&, unsigned int) () from /usr/lib/compiz/libunityshell.so
#19 0x00007fffeb7ab28a in GLWindow::glDraw(GLMatrix const&, GLFragment::Attrib&, CompRegion const&, unsigned int) () from /usr/lib/compiz/libopengl.so
#20 0x00007fffeb7ab6a4 in GLWindow::glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned int) () from /usr/lib/compiz/libopengl.so
#21 0x00007fffe2dd91d8 in WallWindow::glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned int) () from /usr/lib/compiz/libwall.so
#22 0x00007fffeb7ab64c in GLWindow::glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned int) () from /usr/lib/compiz/libopengl...

Read more...

Revision history for this message
Bernie Innocenti (codewiz) wrote :

Today I saw this bug again on my laptop, so I could investigate further:

1. I went to the text console and killed -9 the compiz process
2. The screen on my X session cleared so I could see the background picture on my root window, but no windows
3. After restarting unity (export DISPLAY=:0 ; unity --replace), the display goes black again.
4. If I start metacity, everything behaves normally!
5. If I restart the X server, unity behaves normally again

Because of this stateful behavior, I suspect a server-side DRI bug.

Revision history for this message
Bernie Innocenti (codewiz) wrote :

I could reproduce this again today.

The display was synced, but completely black with the mouse cursor also not visible. I tried a few things, such as switching consoles and replugging the hdmi cable. No effect.

Then I logged in from the text console and noticed compiz eating up 100% cpu. After ptracing compiz with strace and then gdb, the process somehow broke out of its busy loop and quietly returned to the main event loop. When I switched back to the X display, everything was back to normal and I could unlock the gnome screensaver.

Here's my hypothesis based on the above observations: compiz and the X server keep ping-ponging some message over the wire protocol in a tight loop. Perhaps something related to vblank sync, which would explain why the screensaver would trigger the problem.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 966744, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.