[TOPBLOCKER] QML cache not regenerated correctly on image update

Bug #1394380 reported by Bill Filler
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
android (Ubuntu)
Invalid
Critical
Unassigned
lxc-android-config (Ubuntu)
Fix Released
Critical
Oliver Grawert
lxc-android-config (Ubuntu RTM)
Fix Released
Critical
Oliver Grawert

Bug Description

image rtm-proposed 166

Multiple problems here, due to the fact that oxide was updated (a new release) and webrowser-app was updated

1) webbrowser-app cache was not updated on the image upgrade in .cache/QML/Apps/webbrowser-app and
desktop versions of web pages are displayed until the cache is destroyed or regenerated. Try cnn.com or nytimes.com

2) no webbapps cache is regenerated, so launching of the webapps displays wrong pages (.cache/QML/Apps/*webapps*) due to stale cache. You can try Google Maps for an example. Deleting the cache makes them work again properly.

Expected Results:
- after image upgrade, either all of the apps should be regenerated smartly, or we should blow away all of the caches to prevent an issue when a library (like oxide) is upgraded and causes an invalid cache.

Bill Filler (bfiller)
Changed in android (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Oliver Grawert (ogra) wrote :

below upstart job for lxc-android-config (untested yet) that should be shipped as /etc/init/boot-hooks/wipe-qml-cache.conf:

# This allows wiping of the complete QML app cache on OTA upgrades
start on boot-hooks WHEN=new-version

pre-start script
    rm -rf /home/*/.cache/QML/Apps/*
end script

Changed in lxc-android-config (Ubuntu):
importance: Undecided → Critical
Changed in lxc-android-config (Ubuntu RTM):
importance: Undecided → Critical
Changed in lxc-android-config (Ubuntu):
assignee: nobody → Oliver Grawert (ogra)
Changed in lxc-android-config (Ubuntu RTM):
assignee: nobody → Oliver Grawert (ogra)
Changed in lxc-android-config (Ubuntu):
status: New → Confirmed
Changed in lxc-android-config (Ubuntu RTM):
status: New → Confirmed
Revision history for this message
Oliver Grawert (ogra) wrote :

teh above should be sufficient as a quick fix to wipe the cache on every OTA

Changed in android (Ubuntu):
status: New → Invalid
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

We actually have logic in place to smartly remove the cache when an app gets updated, this is just a bug that seems to happen with webapps in general.

tags: added: rtm14
Revision history for this message
Oliver Grawert (ogra) wrote :

that might be, but what if we change the format of teh cache content, what if we get another category of apps that behave the same... i belive invalidating the cache after system upgrades is a good thing to prevent us from any such possibilities

Revision history for this message
Olivier Tilloy (osomon) wrote :

My understanding of how the QML cache works is that if a QML file has changed, the app’s cache is invalidated and regenerated. If this doesn’t work, this is a bug in the cache mechanism itself. That said, with the latest image upgrade, webbrowser-app and webapp-container didn’t change (there was one change merged, but it only touched the autopilot tests). What changed is the version of oxide (from 1.2.5 to 1.3.4), but oxide is pure C++, there’s no raw QML involved, so I don’t see how the cache could possibly be impacted by this change. Unless I misunderstand how the cache works.

Revision history for this message
Ricardo Mendoza (ricmm) wrote :

Olivier and I had a chat already on IRC about this, to sum it up:

This situation happens because there was no change in the actual QML files, however an underlying QML plugin did change. In my opinion, this change comes with an ABI break and there was no version bump for it. Had there been a version bump, com.canonical.Oxide would've gone from 1.0 to 1.x and the QML file would've changed, thus wiping the cache.

In details, the ABI break is probably a change in the vtable for the plugin. Changing the ordering of property helpers and invokables result in different property IDs in the cache, this breaks the precompiled QML because it expects things in the wrong place.

This however is not something we can fully rely on as there will always be situations when an ABI breakage lands in the archive; so I vote to go with ogra's OTA hook for wiping all application caches.

Revision history for this message
Oliver Grawert (ogra) wrote :

added top blocker status since it is considered to go in before the golden milestone

summary: - QML cache not regenerated correctly on image update
+ [TOPBLOCKER] QML cache not regenerated correctly on image update
tags: added: lt-blocker lt-category-visible
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc-android-config - 0.212

---------------
lxc-android-config (0.212) vivid; urgency=medium

  * add OTA upstart job that wipes the QML cache after each system upgrade
    (LP: #1394380)
 -- Oliver Grawert <email address hidden> Thu, 20 Nov 2014 14:06:05 +0100

Changed in lxc-android-config (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Olivier Tilloy (osomon) wrote :

For those who wonder why this issue wasn’t caught by silo testing before landing, this is because when installing an updated deb package from a PPA, the timestamp of all the files it installs gets updated, therefore triggering a cache invalidation, whereas an image update only touches the files that changed.

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

This bug was fixed in the package lxc-android-config - 0.208rtm6

---------------
lxc-android-config (0.208rtm6) 14.09; urgency=medium

  * add OTA upstart job that wipes the QML cache after each system upgrade
    (LP: #1394380)
 -- Oliver Grawert <email address hidden> Thu, 20 Nov 2014 13:47:18 +0100

Changed in lxc-android-config (Ubuntu RTM):
status: Confirmed → Fix Released
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.