← Back to team overview

compiz team mailing list archive

[Bug 740126] Re: Disabling an output can cause vblank events to be missed

 

** Summary changed:

- Something blocks compiz randomly several times per day
+ Disabling an output can cause vblank events to be missed

** Description changed:

+ When an output gets disabled - by being switched off by DPMS, unplugged,
+ etc - it's possible for applications to have pending vblank events
+ waiting on this output.  If this occurs, the application will never
+ receive the vblank event.  This manifests as the app appearing to hang
+ (in poll() on the X connection, if you attach GDB).
+ 
  Binary package hint: compiz
  
  This seems to happen when I'm not at my laptop (ie, when the screensaver
  has activated usually). When I return to my laptop, I find it in a state
  which appears to be completely frozen (ie, nothing gets repainted on the
  screen). However, I can switch to a console and things appear to be
  working normally. I can send a SIGKILL to compiz and start another WM,
  and then everything starts working normally again (although if I restart
  compiz, it often crashes until I've restarted my laptop).
  
  If I attach gdb to the hung compiz, I always see a trace which looks
  like this:
  
  0x00007f53f3dc8e33 in __poll (fds=<value optimised out>, nfds=<value optimised out>, timeout=<value optimised out>) at ../sysdeps/unix/sysv/linux/poll.c:87
  87	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
- 	in ../sysdeps/unix/sysv/linux/poll.c
+  in ../sysdeps/unix/sysv/linux/poll.c
  (gdb) btbt full
  #0  0x00007f53f3dc8e33 in __poll (fds=<value optimised out>, nfds=<value optimised out>, timeout=<value optimised out>) at ../sysdeps/unix/sysv/linux/poll.c:87
-         resultvar = 18446744073709551100
-         oldtype = 0
-         result = <value optimised out>
+         resultvar = 18446744073709551100
+         oldtype = 0
+         result = <value optimised out>
  #1  0x00007f53f738d512 in _xcb_conn_wait (c=0x1b79060, cond=<value optimised out>, vector=0x0, count=0x0) at ../../src/xcb_conn.c:313
-         ret = <value optimised out>
-         fd = {fd = 3, events = 1, revents = 0}
+         ret = <value optimised out>
+         fd = {fd = 3, events = 1, revents = 0}
  #2  0x00007f53f738eb3f in xcb_wait_for_reply (c=0x1b79060, request=390272, e=0x7fff56067648) at ../../src/xcb_in.c:378
-         cond = {__data = {__lock = 0, __futex = 0, __total_seq = 0, __wakeup_seq = 0, __woken_seq = 0, __mutex = 0x0, __nwaiters = 0, __broadcast_seq = 0}, 
-           __size = '\000' <repeats 47 times>, __align = 0}
-         reader = {request = 390272, data = 0x7fff560675a0, next = 0x0}
-         prev_reader = <value optimised out>
-         widened_request = <value optimised out>
-         ret = 0x0
+         cond = {__data = {__lock = 0, __futex = 0, __total_seq = 0, __wakeup_seq = 0, __woken_seq = 0, __mutex = 0x0, __nwaiters = 0, __broadcast_seq = 0},
+           __size = '\000' <repeats 47 times>, __align = 0}
+         reader = {request = 390272, data = 0x7fff560675a0, next = 0x0}
+         prev_reader = <value optimised out>
+         widened_request = <value optimised out>
+         ret = 0x0
  #3  0x00007f53f75e188d in _XReply (dpy=0x1b77e10, rep=0x7fff560676a0, extra=0, discard=0) at ../../src/xcb_io.c:533
-         req = 0x1b74780
-         response = <value optimised out>
-         error = 0x0
-         c = 0x1b79060
-         reply = <value optimised out>
-         current = 0x1b74780
-         __PRETTY_FUNCTION__ = "_XReply"
+         req = 0x1b74780
+         response = <value optimised out>
+         error = 0x0
+         c = 0x1b79060
+         reply = <value optimised out>
+         current = 0x1b74780
+         __PRETTY_FUNCTION__ = "_XReply"
  #4  0x00007f53efb6993b in DRI2WaitMSC (dpy=0x1b77e10, drawable=100, target_msc=0, divisor=2, remainder=1, ust=0x7fff56067728, msc=0x7fff56067720, sbc=0x7fff56067718) at dri2.c:616
-         info = <value optimised out>
-         req = <value optimised out>
-         rep = {type = 64 '@', pad1 = 119 'w', sequenceNumber = 22022, length = 32767, ust_hi = 1443264328, ust_lo = 32767, msc_hi = 100, msc_lo = 0, sbc_hi = 2137562112, 
-           sbc_lo = 3119085452}
- #5  0x00007f53efb67df1 in dri2WaitForMSC (pdraw=<value optimised out>, target_msc=<value optimised out>, divisor=<value optimised out>, remainder=<value optimised out>, 
-     ust=0x7fff56067778, msc=0x7fff56067770, sbc=0x7fff56067768) at dri2_glx.c:346
-         dri2_ust = 29839872
-         dri2_msc = 29878048
-         dri2_sbc = 139998480560225
-         ret = -516
+         info = <value optimised out>
+         req = <value optimised out>
+         rep = {type = 64 '@', pad1 = 119 'w', sequenceNumber = 22022, length = 32767, ust_hi = 1443264328, ust_lo = 32767, msc_hi = 100, msc_lo = 0, sbc_hi = 2137562112,
+           sbc_lo = 3119085452}
+ #5  0x00007f53efb67df1 in dri2WaitForMSC (pdraw=<value optimised out>, target_msc=<value optimised out>, divisor=<value optimised out>, remainder=<value optimised out>,
+     ust=0x7fff56067778, msc=0x7fff56067770, sbc=0x7fff56067768) at dri2_glx.c:346
+         dri2_ust = 29839872
+         dri2_msc = 29878048
+         dri2_sbc = 139998480560225
+         ret = -516
  #6  0x00007f53efb3f81f in __glXWaitVideoSyncSGI (divisor=2, remainder=1, count=0x7fff560677cc) at glxcmds.c:1775
-         gc = 0x1c7e720
-         psc = 0x1c77560
-         pdraw = <value optimised out>
-         ust = 2722
-         msc = <value optimised out>
-         sbc = 139998480562447
-         ret = <value optimised out>
+         gc = 0x1c7e720
+         psc = 0x1c77560
+         pdraw = <value optimised out>
+         ust = 2722
+         msc = <value optimised out>
+         sbc = 139998480562447
+         ret = <value optimised out>
  #7  0x00007f53efdb71c4 in PrivateGLScreen::waitForVideoSync() () from /usr/lib/compiz/libopengl.so
  No symbol table info available.
  #8  0x00007f53efdb737b in PrivateGLScreen::paintOutputs(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int, CompRegion const&) ()
-    from /usr/lib/compiz/libopengl.so
+    from /usr/lib/compiz/libopengl.so
  No symbol table info available.
  #9  0x00007f53effddb19 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
  No symbol table info available.
  #10 0x00007f53effdf930 in CompositeScreen::handlePaintTimeout() () from /usr/lib/compiz/libcomposite.so
  No symbol table info available.
  #11 0x00000000004219ff in CompTimeoutSource::callback() ()
  No symbol table info available.
  #12 0x000000000042146d in CompTimeoutSource::dispatch(sigc::slot_base*) ()
  No symbol table info available.
  #13 0x00007f53f5c649df in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) () from /usr/lib/libglibmm-2.4.so.1
  No symbol table info available.
  #14 0x00007f53f5114bcd in g_main_dispatch (context=0x1ba7730) at /build/buildd/glib2.0-2.28.3/./glib/gmain.c:2440
-         dispatch = 0x7f53f5c64990 <Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*)>
-         was_in_call = 0
-         user_data = 0x1c507a0
-         callback = 0x7f53f5c64b40
-         cb_funcs = 0x7f53f53bf630
-         cb_data = 0x1c45fe0
-         current_source_link = {data = 0x1c50730, next = 0x0}
-         need_destroy = <value optimised out>
-         source = 0x1c50730
-         current = 0x1ba7e90
-         i = <value optimised out>
+         dispatch = 0x7f53f5c64990 <Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*)>
+         was_in_call = 0
+         user_data = 0x1c507a0
+         callback = 0x7f53f5c64b40
+         cb_funcs = 0x7f53f53bf630
+         cb_data = 0x1c45fe0
+         current_source_link = {data = 0x1c50730, next = 0x0}
+         need_destroy = <value optimised out>
+         source = 0x1c50730
+         current = 0x1ba7e90
+         i = <value optimised out>
  #15 g_main_context_dispatch (context=0x1ba7730) at /build/buildd/glib2.0-2.28.3/./glib/gmain.c:3013
  No locals.
  #16 0x00007f53f51153a8 in g_main_context_iterate (context=0x1ba7730, block=<value optimised out>, dispatch=1, self=<value optimised out>)
-     at /build/buildd/glib2.0-2.28.3/./glib/gmain.c:3091
-         max_priority = 2147483647
-         timeout = 11
-         some_ready = 1
-         nfds = 14
-         allocated_nfds = <value optimised out>
-         fds = <value optimised out>
+     at /build/buildd/glib2.0-2.28.3/./glib/gmain.c:3091
+         max_priority = 2147483647
+         timeout = 11
+         some_ready = 1
+         nfds = 14
+         allocated_nfds = <value optimised out>
+         fds = <value optimised out>
  #17 0x00007f53f51159f2 in g_main_loop_run (loop=0x1c50880) at /build/buildd/glib2.0-2.28.3/./glib/gmain.c:3299
-         __PRETTY_FUNCTION__ = "g_main_loop_run"
+         __PRETTY_FUNCTION__ = "g_main_loop_run"
  #18 0x0000000000429fba in CompScreen::eventLoop() ()
  No symbol table info available.
  #19 0x0000000000422f70 in main ()
  
  This is happening fairly often for me (3-4 times per day)

-- 
You received this bug notification because you are a member of compiz
packagers, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/740126

Title:
  Disabling an output can cause vblank events to be missed


References