Comment 24 for bug 1442311

Revision history for this message
Kenneth Bogert (kbogert-uga) wrote :

I finally found some time to work on this, and I think I have it fixed.

Debugging gnome-shell when I hit this bug (note, I could also trigger this bug by allowing the screen to lock, no suspend necessary) I noticed the following backtrace kept happening:

Thread 1 (Thread 0x7f920ec68a40 (LWP 12089)):
#0 0x00007f920b9f912d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007f9202b8ab72 in poll (__timeout=-1, __nfds=1, __fds=0x7fff76528300) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2 _xcb_conn_wait (c=c@entry=0x7f9ed0, cond=cond@entry=0x7fff76528420, vector=vector@entry=0x0, count=count@entry=0x0) at ../../src/xcb_conn.c:447
#3 0x00007f9202b8c3ff in wait_for_reply (c=c@entry=0x7f9ed0, request=29601, e=e@entry=0x0) at ../../src/xcb_in.c:490
#4 0x00007f9202b8c512 in xcb_wait_for_reply (c=0x7f9ed0, request=29601, e=0x0) at ../../src/xcb_in.c:520
#5 0x00007f91f8e4b4ce in dri2WaitForMSC (pdraw=0xca4900, target_msc=0, divisor=2, remainder=0, ust=0x7fff76528550, msc=0x7fff76528558, sbc=0x7fff76528560) at ../../../../src/glx/dri2_glx.c:480
#6 0x00007f92090478f6 in _cogl_winsys_wait_for_vblank (onscreen=onscreen@entry=0xca12e0) at ./winsys/cogl-winsys-glx.c:1606
#7 0x00007f9209048016 in _cogl_winsys_onscreen_swap_region (onscreen=0xca12e0, user_rectangles=<optimized out>, n_rectangles=<optimized out>) at ./winsys/cogl-winsys-glx.c:1808
#8 0x00007f920903d341 in cogl_onscreen_swap_region (onscreen=0xca12e0, rectangles=rectangles@entry=0x7fff76528700, n_rectangles=n_rectangles@entry=1) at ./cogl-onscreen.c:337
#9 0x00007f920ce13662 in clutter_stage_cogl_redraw (stage_window=0x855b80) at ./cogl/clutter-stage-cogl.c:641
#10 0x00007f920ce77887 in clutter_stage_do_redraw (stage=0xd11bf0) at ./clutter-stage.c:1184
#11 _clutter_stage_do_update (stage=0xd11bf0) at ./clutter-stage.c:1242
#12 0x00007f920ce5e028 in master_clock_update_stages (master_clock=0xbe7880, stages=0x35dca30) at ./clutter-master-clock.c:457
#13 clutter_clock_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ./clutter-master-clock.c:589
#14 0x00007f920c13ee04 in g_main_dispatch (context=0x7d35f0) at /build/buildd/glib2.0-2.40.2/./glib/gmain.c:3064
#15 g_main_context_dispatch (context=context@entry=0x7d35f0) at /build/buildd/glib2.0-2.40.2/./glib/gmain.c:3663
#16 0x00007f920c13f048 in g_main_context_iterate (context=0x7d35f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.40.2/./glib/gmain.c:3734
#17 0x00007f920c13f30a in g_main_loop_run (loop=0x7d3390) at /build/buildd/glib2.0-2.40.2/./glib/gmain.c:3928
#18 0x00007f920d883021 in meta_run () at core/main.c:556
#19 0x0000000000401d11 in main (argc=1, argv=0x7fff76528b08) at main.c:439

Specifically frame #6, it appeared to be endlessly waiting for a vblank. So I added the following to /etc/environment:

export CLUTTER_VBLANK=none

I have just done suspend and resume 20 times without issue, whereas previously I could trigger this bug after 3 or 4 on average.