Phone reboots after removing and installing scope

Bug #1450493 reported by Marcus Tomlinson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-api (Ubuntu)
Confirmed
Undecided
Marcus Tomlinson

Bug Description

Once I’ve finished running / debugging my scope (i.e. I hit the stop button), the phone returns to the home scope, then after approx. 10s, the phone reboots (I mean, back to the boot screen, not just a unity crash).

Revision history for this message
Zoltan Balogh (bzoltan) wrote :

With all good intention to fix this problem I wonder what the SDK has to do with this problem. What happens on the SDK side is not more then removing the scope in a conventional way.

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

I can reproduce this behaviour. It does not happen everytime though.
However the SDK is not doing anything special when stopping a scope. It does uninstall the click package and sends
a DBUS message to show the homescreen again.

This must be a problem of a underlying system (scopes registry, unity, ...), a quick look through the logfiles
did not help much. But I wonder what could trigger a full reboot.

Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

I can reproduce the problem almost 100 percent in the latest SDK release. Please help to fix it. Thanks!

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

It seems this issue can be reproduced with the following script without the qtc involved: http://pastebin.ubuntu.com/11761687/

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Looks like the culprit is the last line of the script: pkcon remove "untitled.zeller-benjamin;0.1;armhf;local:click"

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

Retargeting to unity-scopes-api. I was able to reproduce the problem with this script: http://pastebin.ubuntu.com/11761687/ as well as uninstalling a scope from the store (imgur scope). It is not directly related to the qtcreator plugin.

affects: qtcreator-plugin-ubuntu (Ubuntu) → unity-scopes-api (Ubuntu)
Changed in unity-scopes-api (Ubuntu):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

I've attached a .zip containing a scope click package and a install_loop.sh script that installs and uninstalls the click every 15s. After a few installs, the phone reboots. (Tested on mako 234)

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Added 'sudo dmesg' for every step performed by Marcus' script. The last thing reported by dmesg before it reboots is apparmor related:

[ 573.731268] type=1400 audit(1435068499.118:64): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.ubuntu.clock_clock_3.3.280.1" pid=9132 comm="apparmor_parser"
[ 573.749397] type=1400 audit(1435068499.138:65): apparmor="STATUS" operation="profile_load" profile="unconfined" name="newsagg.marcustomlinson_newsagg_0.1" pid=9132 comm="apparmor_parser"
[ 590.941583] type=1400 audit(1435068516.345:66): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.ubuntu.clock_clock_3.3.280.1" pid=9470 comm="apparmor_parser"

Revision history for this message
Alejandro J. Cura (alecu) wrote :

I'm running Marcus' script on krillin (wily r119), no crashes after 15 install/uninstall loops.
Seems to be an issue only with mako.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Hmmm, just tried the same thing with an app click package, and no crash. (zip attached)

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Adding 'sudo dmesg' to the app install loop script now produces:

[ 1823.580344] type=1400 audit(1435070740.169:104): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=22736 comm="apparmor_parser"
[ 1859.959133] type=1400 audit(1435070776.548:105): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=23161 comm="apparmor_parser"
[ 1896.309873] type=1400 audit(1435070812.897:106): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=23571 comm="apparmor_parser"
[ 1932.570364] type=1400 audit(1435070849.156:107): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=24012 comm="apparmor_parser"
[ 1968.891988] type=1400 audit(1435070885.474:108): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=24403 comm="apparmor_parser"
[ 2005.267205] type=1400 audit(1435070921.853:109): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=24849 comm="apparmor_parser"
[ 2041.485609] type=1400 audit(1435070958.072:110): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="com.viclog.hodor_hodor_0.2" pid=25284 comm="apparmor_parser"

Firstly, why is profile_replace called so often for one package. Secondly, looking at the dmesg output from the scope click install loop, why does "com.ubuntu.clock_clock_3.3.280.1" get updated? When installing/uninstalling the app we only see profile_replace calls against "com.viclog.hodor_hodor_0.2"

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Hmmm, ok so it looks every time the app installs, another profile_replace call shows up in dmesg.

So after the first install: 1 profile_replace call is shown.
Then when its uninstalled: still 1 profile_replace call is shown.
Then it is installed again: now 2 profile_replace calls are shown.
etc...

summary: - Phone reboots after scope run session
+ Phone reboots after removing and installing scope
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Looking further into this issue, it actually looks related to this bug: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1470750

This reboot issue seems to occur on the nexus but not the bq. The bug above describes behaviour experienced on the arale and bq when uninstalling a scope, so that leads me to believe the reboot does not occur on arale either.

Basically, upon uninstalling a scope we see the scope registry process CPU usage shoot up. On the nexus, after a short time of eating the CPU like this, the phone reboots. If however, I stop the registry process somewhere between the uninstall and where I'd expect a reboot, the phone does not reboot.

Therefore, I believe if we fix bug #1470750, we fix this one.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

I have just confirmed that this bug is directly related to bug #1470750. The proposed fix for that bug fixes this one. Marking as duplicate.

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.