Unity8 random freeze on demo image

Bug #1281728 reported by Victor Tuson Palau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Critical
Alexandros Frantzis
mir (Ubuntu)
Fix Released
Critical
Unassigned
unity8 (Ubuntu)
Invalid
Critical
Unassigned

Bug Description

I was just using the image and unity8 froze. See attached logs.

Tags: mwcdemo2014

Related branches

Revision history for this message
Victor Tuson Palau (vtuson) wrote :
Revision history for this message
Victor Tuson Palau (vtuson) wrote :
Changed in unity8 (Ubuntu):
assignee: nobody → Michał Sawicz (saviq)
Revision history for this message
Alexander Sack (asac) wrote :

reproducible?

Revision history for this message
Victor Tuson Palau (vtuson) wrote :

crashed again, this time with a report

Revision history for this message
Victor Tuson Palau (vtuson) wrote :
Revision history for this message
Alexander Sack (asac) wrote :

bumping prio of a mwcdemo blocker

Changed in unity8 (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Michał Sawicz (saviq) wrote :

I will spend some time trying to get it to crash today, but I didn't manage to get anything out of the .crash files unfortunately.

kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: New → In Progress
Changed in unity8:
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
Michael Zanetti (mzanetti) wrote :

I've managed to crash it once. According to the logs attached here and my observation, this seems to sometimes happen when apps are started. The stack trace I got points to something internal in Mir, but it wasn't exactly useful either.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Ok... Seems I can reproduce it:

* Open an app
* swipe it away
* open the media player
* It will display a message that no file has been selected. click ok
=> the media player crashes and the previously opened app will show up.
* swipe the app away
=> *boom*

This seems to happen because unity-mir requests a new screenshot for the crashed app.

The crashing thread:

#0 0xb44496c0 in std::thread::_Impl<std::_Bind_simple<std::reference_wrapper<mir::scene::SnapshottingFunctor> ()> >::_M_run() () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.15
#1 0xb6704a24 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6

Which seems to be triggered by:

#0 0xb6140726 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0xb613b660 in __pthread_mutex_unlock_usercnt () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0xb4448d0c in mir::scene::ThreadedSnapshotStrategy::take_snapshot_of(std::shared_ptr<mir::shell::SurfaceBufferAccess> const&, std::function<void (mir::shell::Snapshot const&)> const&) ()
   from /usr/lib/arm-linux-gnueabihf/libmirserver.so.15
#3 0xb4437fc2 in mir::scene::ApplicationSession::take_snapshot(std::function<void (mir::shell::Snapshot const&)> const&) () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.15
#4 0xa77f33b4 in Application::updateScreenshot() () from /usr/lib/arm-linux-gnueabihf/qt5/imports/Unity-Mir/Unity/Application/libunityapplicationplugin.so
#5 0xa77f0800 in ApplicationManager::updateScreenshot(QString const&) () from /usr/lib/arm-linux-gnueabihf/qt5/imports/Unity-Mir/Unity/Application/libunityapplicationplugin.so
#6 0xa77ff5f0 in ?? () from /usr/lib/arm-linux-gnueabihf/qt5/imports/Unity-Mir/Unity/Application/libunityapplicationplugin.so

Revision history for this message
Michael Zanetti (mzanetti) wrote :

In the meantime ricmm merged a fix for handling crashing applications to unity-mir trunk. I've merged that with the demo branches now and unity8 doesn't crash any more if apps in there crash.

Demo ppa is currently building the updated branch.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Ok. Having an image now which behaves slightly better, but its still not completely fixed.

The difference is, that now it recovers if an app crashes, but takes ~2 secs to do so. If you do something that requires updating screenshots in those 2 secs (e.g. swipe the app from the left), it still crashes.

Revision history for this message
John McAleely (john.mcaleely) wrote :

Crash file attached. Was trying to swipe in launcher.

Had opened media player directly from app screen. Dismissed dialog noting no file to play, and was therefore swiping in the launcher to get back to the scopes...

Revision history for this message
John McAleely (john.mcaleely) wrote :

Additional note to my comment #12, Nexus4, runing the MWC-demo image, flashed a hour or so before this posting.

Revision history for this message
Victor Tuson Palau (vtuson) wrote :

another freeze with a media scanner crash file associated to it

Revision history for this message
John McAleely (john.mcaleely) wrote :

Just re-flashed with the current MWC build @10am today. Was searching in the video scope, and saw this crash.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

So here's what's happening:

If an application crashes, apport starts to trace it. This takes a couple of seconds delays the applicationRemoved logic until tracing is finished. During this timeframe the surface of the crashed app is already gone (or at least in a state where we can't screenshot it any more). If the user interacts with unity in a way where it requests a new screenshot (e.g. swiping from an edge) while in this state, it crashed unity too.

Alexandros has proposed a patch to just return an empty screenshot in this case. This works around the issue and just leaves us with a visual glitch (invisible surface floating around) until apport is done with tracing the app. This patch has been merged to the mwc demo ppa.

So right now doing a mwc flash followed by a apt-get update && apt-get upgrade solves this for the MWC image.

Changed in mir:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Michael Zanetti (mzanetti)
milestone: none → 0.1.6
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir/devel at revision None, scheduled for release in mir, milestone Unknown

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
assignee: Michael Zanetti (mzanetti) → Alexandros Frantzis (afrantzis)
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug was fixed in the package mir - 0.1.6+14.04.20140310-0ubuntu1
---------------
mir (0.1.6+14.04.20140310-0ubuntu1) trusty; urgency=medium

Changed in mir (Ubuntu):
importance: Undecided → Critical
status: New → Fix Released
Revision history for this message
Michał Sawicz (saviq) wrote :

I haven't seen that for quite some time, please reopen if you encounter it again.

Changed in unity8:
status: In Progress → Incomplete
Changed in unity8 (Ubuntu):
status: In Progress → Incomplete
assignee: Michał Sawicz (saviq) → nobody
kevin gunn (kgunn72)
Changed in unity8:
status: Incomplete → Invalid
Changed in unity8 (Ubuntu):
status: Incomplete → Invalid
Michał Sawicz (saviq)
no longer affects: unity8
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.