unity8 sometimes hangs on boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Unassigned | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
libusermetrics (Ubuntu) |
Fix Released
|
Critical
|
Pete Woods | ||
lxc-android-config (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
qtbase-opensource-src (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
ubuntu-system-settings-online-accounts (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
unity8 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The following gdbus call is failing with a "Error: Timeout was reached" message:
gdbus call --session --dest com.canonical.
This is being seen on krillin devices starting with image 106 from ubuntu-
A copy of ~/.cache/
I have 3 test cases where the problem was observed:
http://
http://
http://
In all cases, the test is using adt-run (from autopkgtest) to drive a test on the phone device. adt-run uses the above gdbus call to determine if the desktop is active. In all the examples, the device was freshly flashed.
== Test Case ==
# Prepare debugging
adb shell
sudo apt-get clean # so that you wouldn't run out of disk space
sudo apt install qtbase5-dbg libc6-dbg libdbus-
# Add also libusermetrics debug symbols, unless you're testing a PPA version
echo "deb http://
sudo apt-key adv --keyserver keyserver.
sudo apt-get update
sudo apt install libusermetricso
# Start the reboot loop
# This reboots the device in a loop, and if this bug is not fixed by whatever proposed solution, it will hang eventually with Unity 8 having a black background. Other kind of hangs (like just Google logo showing, no adb) are not related to this bug. Current highest amount of reboots without errors is 54, so it's probable a 100 reboots is needed for testing.
bzr branch lp:unity8
cd unity8
while true; do adb shell rm -R "~phablet/
# When it fails
adb shell
sudo gdb -p $(pidof unity8)
bt full
--
At this point, the backtrace should show:
#0 syscall () at ../sysdeps/
#1 0xb6301e12 in _q_futex (op=0, val=3, timeout=0x0, addr=<optimized out>)
at thread/
#2 lockInternal_
at thread/
#3 QBasicMutex:
at thread/
#4 0xb6301eb6 in lock (this=0x1523b44) at thread/qmutex.h:59
#5 lock (timeout=-1, this=0x1523b38) at thread/
#6 QMutex::lock (this=this@
#7 0xb5f39586 in QDBusMutexLocker (m=0x1523d6c, s=0x1523d48,
a=ToggleWat
#8 QDBusDispatchLocker (s=0x1523d48, a=ToggleWatchAc
this=<synthetic pointer>) at qdbusthreaddebu
#9 qDBusRealToggle
at qdbusintegrator
#10 0xb5ae18f6 in ?? () from /lib/arm-
With this, it's know that it was a QDBus locking related problem.
--
---
Timeline/Updates:
2015-02-20: libusermetrics lands, causing (apparently) this boot problem to start happening rarely. http://
2015-03-25: qtbase dbus update to support threads (instead of one main thread) in PPA 018 fixes the boot issue, but autopilot test suites start failing randomly.
2015-03-27: an autopilot fix fixes a simple test case, and seems to fix UITK suite as a whole, but on krillin only
2015-04-10: Further patches from upstream fix all AP tests.
2015-04-23: Upstream continues to work on the patches but they have not yet been merged. AP:s pass, but U1 account gets removed usually after a reboot, even though apps can be installed after adding U1 account flawlessly for the duration of that boot.
Related branches
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Christopher Lee (community): Needs Fixing
-
Diff: 151 lines (+26/-83)2 files modifiedautopilot/introspection/_search.py (+1/-18)
autopilot/tests/unit/test_introspection_search.py (+25/-65)
- PS Jenkins bot: Approve (continuous-integration)
- Albert Astals Cid (community): Abstain
- Thomi Richards: Pending requested
- Leo Arias: Pending requested
- Christopher Lee: Pending requested
-
Diff: 22 lines (+1/-5)1 file modifiedautopilot/introspection/_search.py (+1/-5)
- PS Jenkins bot (community): Approve (continuous-integration)
- Albert Astals Cid (community): Needs Information
- Martin Pitt: Needs Fixing
-
Diff: 62 lines (+52/-0)2 files modifieddebian/tests/control (+17/-0)
debian/tests/doesnt-hang-on-boot (+35/-0)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Unity Team: Pending requested
-
Diff: 83 lines (+9/-9)6 files modifiedsrc/libusermetricsinput/MetricManager.cpp (+2/-1)
src/libusermetricsoutput/UserMetrics.cpp (+2/-1)
src/usermetricsservice/DBusDataSet.cpp (+1/-2)
src/usermetricsservice/DBusDataSource.cpp (+1/-2)
src/usermetricsservice/DBusUserData.cpp (+1/-2)
src/usermetricsservice/main.cpp (+2/-1)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Timo Jyrinki: Needs Fixing
-
Diff: 168 lines (+18/-18)9 files modifiedplugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp (+1/-1)
plugins/Ubuntu/SystemImage/SystemImage.cpp (+1/-1)
plugins/Unity/Session/dbusunitysessionservice.cpp (+4/-4)
plugins/Wizard/System.cpp (+1/-1)
src/libunity8-private/abstractdbusservicemonitor.cpp (+5/-5)
src/libunity8-private/unitydbusobject.cpp (+1/-1)
src/libunity8-private/unitydbusvirtualobject.cpp (+1/-1)
tests/plugins/Unity/Launcher/CMakeLists.txt (+2/-2)
tests/plugins/Unity/Session/CMakeLists.txt (+2/-2)
- PS Jenkins bot (community): Approve (continuous-integration)
- Unity Team: Pending requested
-
Diff: 40 lines (+6/-3)3 files modifiedsrc/usermetricsservice/DBusDataSet.cpp (+2/-1)
src/usermetricsservice/DBusDataSource.cpp (+2/-1)
src/usermetricsservice/DBusUserData.cpp (+2/-1)
- PS Jenkins bot (community): Approve (continuous-integration)
- Timo Jyrinki (community): Approve
-
Diff: 169 lines (+17/-31)8 files modifieddebian/control (+1/-3)
online-accounts-service/main.cpp (+6/-6)
online-accounts-service/ui-proxy.cpp (+2/-0)
online-accounts-ui/main.cpp (+2/-18)
online-accounts-ui/online-accounts-ui.pro (+1/-4)
online-accounts-ui/ui-server.cpp (+2/-0)
tests/online-accounts-service/tst_ui_proxy.cpp (+2/-0)
tests/online-accounts-ui/qml/tst_AuthorizationPage.qml (+1/-0)
Changed in unity8 (Ubuntu): | |
assignee: | Michał Sawicz (saviq) → Albert Astals Cid (aacid) |
status: | Triaged → In Progress |
Changed in qtbase-opensource-src (Ubuntu): | |
status: | New → Incomplete |
Changed in qtbase-opensource-src (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in qtbase-opensource-src (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in qtbase-opensource-src (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in qtbase-opensource-src (Ubuntu): | |
importance: | Undecided → Critical |
description: | updated |
tags: | added: lt-blocker lt-category-visible |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in canonical-devices-system-image: | |
status: | New → In Progress |
importance: | Undecided → Critical |
milestone: | none → ww17-2015 |
Changed in autopilot (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
description: | updated |
Changed in lxc-android-config (Ubuntu): | |
assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
status: | New → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in libusermetrics (Ubuntu): | |
status: | Invalid → In Progress |
importance: | Undecided → Critical |
assignee: | nobody → Pete Woods (pete-woods) |
description: | updated |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
tags: | removed: lt-blocker |
Changed in qtbase-opensource-src (Ubuntu): | |
importance: | High → Medium |
Changed in unity8 (Ubuntu): | |
importance: | High → Undecided |
I just got this after 7 tries. On the screen is the Ubuntu spinner. Here's a stacktrace:
(gdb) bt full linux-gnueabihf /libc.so. 6 :lockInternal( ) (op=0, val=3, timeout=0x0, addr=<optimized out>) at thread/ qmutex_ linux.cpp: 154 :lockInternal( ) (timeout=-1, elapsedTimer=0x0, d_ptr=...) at thread/ qmutex_ linux.cpp: 195 :lockInternal( ) (this=this@ entry=0x132b2e4 ) qmutex_ linux.cpp: 211 qmutex. cpp:628 entry=0x132b414 ) qmutex. cpp:223 Watch(QDBusConn ectionPrivate* , DBusWatch*, int) (m=0x132b414, s=0x132b3f0, a=ToggleWatchAc tion, this=<synthetic pointer>) g_p.h:191
{< QDBusMutexLocke r> = {<QDBusLockerBase> = {<No data fields>}, self = 0x132b3f0, mutex = 0x132b414, action = ToggleWatchAction}, <No data fields>} Watch(QDBusConn ectionPrivate* , DBusWatch*, int) (s=0x132b3f0, a=ToggleWatchAc tion, this=<synthetic pointer>) g_p.h:206
{< QDBusMutexLocke r> = {<QDBusLockerBase> = {<No data fields>}, self = 0x132b3f0, mutex = 0x132b414, action = ToggleWatchAction}, <No data fields>} Watch(QDBusConn ectionPrivate* , DBusWatch*, int) (d=0x132b3f0, watch=0x132c480, fd=41) at qdbusintegrator .cpp:344
{< QDBusMutexLocke r> = {<QDBusLockerBase> = {<No data fields>}, self = 0x132b3f0, mutex = 0x132b414, action = ToggleWatchAction}, <No data fields>} 0x132c3e8) dbus-transport- socket. c:167
socket_ transport = 0x132c3e8 0x132c3e8, flags=1, timeout_ milliseconds= <optimized out>) at ../../dbus/ dbus-transport- socket. c:1210
socket_ transport = 0x132c3e8
poll_timeout = <optimized out> _do_iteration (transport= 0x132c3e8, flags=1, timeout_ milliseconds= -1) at ../../dbus/ dbus-transport. c:1001 n_do_iteration_ unlocked (connection= 0x132c808, pending=<optimized out>, flags=1, timeout_ milliseconds= -1) dbus-connection .c:1227 n_send_ preallocated_ unlocked_ no_update (connection= connection@ entry=0x132c808 , preallocated=0x0, message= message@ entry=0x14ee998 , client_ serial= client_ serial@ entry=0x0) at ../../dbus/ dbus-connection .c:205. ..
#0 0xffffffff in syscall () at /lib/arm-
#1 0xffffffff in QBasicMutex:
addr2 = 0x0
val2 = 0
#2 0xffffffff in QBasicMutex:
#3 0xffffffff in QBasicMutex:
at thread/
#4 0xffffffff in QMutex::lock() (this=0x132b2e4) at thread/qmutex.h:67
self = 0xb6efd410
success = true
current = 0x132b2d8
#5 0xffffffff in QMutex::lock() (timeout=-1, this=0x132b2d8)
at thread/
self = 0xb6efd410
success = true
current = 0x132b2d8
#6 0xffffffff in QMutex::lock() (this=this@
at thread/
current = 0x132b2d8
#7 0xffffffff in qDBusRealToggle
at qdbusthreaddebu
locker =
i = <optimized out>
#8 0xffffffff in qDBusRealToggle
at qdbusthreaddebu
locker =
i = <optimized out>
#9 0xffffffff in qDBusRealToggle
locker =
i = <optimized out>
#10 0xffffffff in check_write_watch (transport=
at ../../dbus/
needed = <optimized out>
transport = 0x132c3e8
#11 0xffffffff in socket_do_iteration (transport=
poll_fd = {fd = 41, events = 0, revents = -16705}
poll_res = <optimized out>
#12 0xffffffff in _dbus_transport
#13 0xffffffff in _dbus_connectio
at ../../dbus/
#14 0xffffffff in _dbus_connectio