Mir

cursor interactions cause lockup with pocket desktop

Bug #1588929 reported by Kevin DuBois
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
High
Kevin DuBois
qtdeclarative-opensource-src (Ubuntu)
New
Undecided
Unassigned
qtmir (Ubuntu)
Invalid
Undecided
Daniel d'Andrada
unity8 (Ubuntu)
Fix Released
Undecided
Daniel d'Andrada

Bug Description

To reproduce (seen on frieza):

Connect a mouse to a pocket desktop setup.
Launch a 'legacy' application, like gedit, in windowed mode. The problem is not seen with 'native' applications, it seems that the setting the custom cursor bitmap that Xmir does is the precipitating event for the problem.
Rapidly move the cursor over the edge of the window to force rapid cursor transitions.
After a while (usually between 30s-2 minutes of the rapid movement), the desktop will lock up.

First noted on mir 0.23 testing (silo 69), but also seen with 0.22.1.

USC is still alive, and doesn't look locked up. Unity8 is locked.

Render logs from Qt for the last 2 frames (including the one that's locked)
http://pastebin.ubuntu.com/16953202/

BT of threads when attaching to unity8 when stuck:
http://pastebin.ubuntu.com/16952340/
note: it seems that thread 1 is the render loop, and thread 2 is the render thread. Thread 2 doesn't quite seem stuck (seems to be busy, and doesnt unblock), and thread 1 is stuck waiting for a response from thread 2

If I disable the notification of the cursor change callback in mir (just commenting out here)
http://bazaar.launchpad.net/~mir-team/mir/0.22/view/head:/src/server/scene/basic_surface.cpp#L693
This breaks the cursor updating for Xmir apps, but averts the crash

Related branches

Revision history for this message
Kevin DuBois (kdub) wrote :

not quite sure if its a mir problem or a qtmir+u8 problem, so will tag both.

description: updated
Changed in qtmir:
assignee: nobody → Daniel d'Andrada (dandrader)
Kevin DuBois (kdub)
description: updated
Revision history for this message
Daniel d'Andrada (dandrader) wrote :
Revision history for this message
Kevin DuBois (kdub) wrote :

Package versions of qtmir+u8+mirserver, as well as the system-image-cli. (installed on frieza)

Changed in mir:
assignee: nobody → Kevin DuBois (kdub)
Revision history for this message
Kevin DuBois (kdub) wrote :

I noticed this first during mir 0.23.0 release testing... so wanted to see if it was a the race was any better or worse with 0.23.0 vs 0.22.1.

So, did a quick manual check of time to failure on 0.23.0 and 0.22.1. (attached). Seems its just about as prevalent on each version of mir. This doesn't exonerate mir altogether, but IMO, should let us proceed with the 0.23.0 release.

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

There is a known bug where libmirclient crashes on Xmir cursor updates -> bug 1506358
Please check your Xmir has not crashed (so this bug is not a duplicate of that one)

If this was bug 1506358 though I would expect Unity8 to keep working and not freeze the whole desktop. But Unity8 might not be able to survive bug 1506358 as well as the Mir demo servers(?).

Please also check Unity8 lockup bug 1588534

Changed in mir:
status: New → Incomplete
Revision history for this message
Kevin DuBois (kdub) wrote :

Xmir does not appear to have crashed. I don't think this is bug 1506358, as that exception isn't seen, and it appears to be the Qt renderloop/renderthread that is locked up.

Changed in qtmir:
status: New → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Cause seems to be a busy loop in QQuickSpriteEngine::assembledImage() triggered by changing between bitmap cursors (as opposed to named cursors).

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

It's a but in Qt triggered by the peculiar way unity8 uses AnimatedSprite QML Type

Changed in mir:
status: Incomplete → Invalid
Changed in unity8 (Ubuntu):
status: New → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
Changed in qtmir:
status: In Progress → Invalid
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

s/but/bug

Revision history for this message
Daniel d'Andrada (dandrader) wrote :
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Fix for bug in qtdeclarative:
https://codereview.qt-project.org/#/c/161896/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.12+16.10.20160617-0ubuntu1

---------------
unity8 (8.12+16.10.20160617-0ubuntu1) yakkety; urgency=medium

  [ Michael Terry ]
  * Do not create Label/Icon if we don't need it
  * Fix Z-ordering of prompt surfaces (LP: #1586219)
  * Drop bottom edge tutorials completely and small fixes for other
    edges. (LP: #1565103)
  * Redo visuals for greeter prompt box. (LP: #1435923)
  * Make tutorial qmltests more robust. (LP: #1590810)
  * Stop showing an extra lockscreen in desktop unity8 sessions. (LP:
    #1582987)

  [ Albert Astals Cid ]
  * Improve dash plugin mock
  * Stabilize PreviewExpandableTest::test_all_widgets_height
  * Workaround QTBUG-53460
  * Split artShape code for cardTool card and regular card
  * Simplify the code since fixedArtSize code is mandatory for regular
    cards
  * Desktop stage: Support rotatesWindowContents (LP: #1547481)
  * Turn if if else into if elseif else
  * Fix leaks in QInputDeviceManagerPrivate::addDevice
  * Do not call |= on uninitialized sigterm.sa_flags
  * initialize udevMonitor
  * Make notifier and notifierFd function local variables
  * Fix crash if a component that is not an Item is given to
    sectionDelegate
  * Tests: Do not use dynamic_cast if we're not going to test it anyway
  * Minor coverity fixes
  * Fix warning about anchors.fill in ProportionalShape (LP: #1590963)
  * Make wait in cleanup() wait for snapTo animation to have finished

  [ Alexandros Frantzis ]
  * Improve the way notifications interact with power management (LP:
    #1570922)

  [ Andrea Cimitan ]
  * Correctly refresh cardcreator cache on artshapestyle changes (LP:
    #1588335)
  * Same tweaks we have for click scope now for libertine
  * add a timer to pull to refresh to work on small windows (LP:
    #1589060)

  [ Daniel d'Andrada ]
  * Clean up debug leftovers
  * Ensure mouse and window movement are pixel-aligned (LP: #1510382)
  * Fix SpreadDelegate rotation animations
  * No point in version-controlling files that are automatically
    generated
  * Center cursor on screen when it's first shown
  * Custom cursor name just have to start with "custom"
  * Work around AnimatedSprite infinite loop bug (LP: #1588929)

  [ Josh Arenson ]
  * Disable showDash when it is already shown. (LP: #1506708)
  * Add a timestamp to the dash log (LP: #1580074)
  * Add timestamp to unity8 log (LP: #1498169)

  [ Lukáš Tinkl ]
  * Implement keyboard shortcuts info panel
  * Implement window controls overlay activatable with 3 fingers tap
    (LP: #1489020)
  * Select correct Chinese input method for OSK in the wizard (LP:
    #1588633)

  [ Michael Zanetti ]
  * Add support for the launcher surface pips displaying the correct
    number of surfaces
  * Add support for the persistent alert state. (LP: #1575147, #1584348,
    #1586621)
  * send a Alt-release event on alt+tab instead of delaying it
    completely and invoking it later (LP: #1565236)

  [ Stephen M. Webb ]
  * added a new upstart $SESSION for unity8-desktop-session (LP:
    #1376715)

 -- Michael Terry <email address hidden> Fri, 17 Jun 2016 01:22:57 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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