QML cache gets stale too easily

Bug #1444937 reported by Michał Sawicz
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qtdeclarative-opensource-src (Ubuntu)
Confirmed
Medium
Ricardo Mendoza

Bug Description

It's happened many times now that after looking for an issue the source of it ended up to be stale QML cache.

We need the cache to be cleared more aggressively, likely on any QML-related package installation. App-specific cache should be (if it's not) cleared on install (or maybe better - removal) and upgrade.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: libqt5qml5 5.4.1-1ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-13.13-generic 3.19.3
Uname: Linux 3.19.0-13-generic x86_64
ApportVersion: 2.17.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Apr 16 12:25:21 2015
SourcePackage: qtdeclarative-opensource-src
SystemImageInfo:
 current build number: 0
 device name:
 channel: daily
 last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtdeclarative-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

1) for package related upgrades, this is a developer only problem since QML cache is cleared on image updates
2) for app updates, the question is critically relevant right now so it should be double-checked more quickly than trying to address the developer problem

Changed in qtdeclarative-opensource-src (Ubuntu):
assignee: nobody → Ricardo Mendoza (ricmm)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(my guess / vague memory is that app upgrades are also already handled similar to image upgrades, but it's better to check)

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

It really depends on exactly what the problem scenario is. Currently, whenever *any* QML file changes, the whole cache is dropped and rebuilt. This includes SDK and base QML deps, not only files shipped by the app itself.

The only case where it is currently not rebuilt is when a provider library changes its QML bindings ABI. For this we are looking into ways to encode library versions on the magic headers of the cache file, although for now considering libraries are only updated on image upgrade, the cache should ensure validity. The only breaking case is when the developer pushes a new QML plugin with different ABI than what the cache was built against.

So I guess the question is:

What was the scenario/issue that happened which lead to this bug?

Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, we've used an updated set of plugins from a PPA for testing, didn't clean the cache and unity8 as crashing some 30% of the time on startup...

Disabling cache altogether when image writable would be good enough for our case. But then it would mean we're not testing the real thing and could miss issues that would only crop up once cache is enabled again?

Changed in qtdeclarative-opensource-src (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Yeah, while disabling cache when the image is writable is a useful workaround, that could have the bad side effect you described, so probably better to not disable it for now.

Proper fix would be improve the way it encodes library versions and magic header, like ricmm described.

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.