/usr/bin/appstreamcli:5:g_variant_new_parsed_va:g_variant_builder_add_parsed:as_content_rating_to_variant:as_component_to_variant:as_cache_file_save

Bug #1792537 reported by errors.ubuntu.com bug bridge
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
appstream (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Olivier Tilloy

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding appstream. This problem was most recently seen with package version 0.12.2-2, the problem page at https://errors.ubuntu.com/problem/fca706c9b229ddb2bae3fa59877eee4f98f69366 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

This crash happens when trying to upgrade a fully up-to-date bionic machine to cosmic. appstreamcli crashes with the following error, thus aborting the upgrade process:

    E:Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi', E:Sub-process retrened an error code

[Impact]

* As of today, users upgrading from bionic to cosmic will see the upgrade process abort early on because of this crash. This is most likely caused by malformed appstream metadata, so the issue might go away if that metadata is fixed at some point. In the meantime, this completely prevents bionic→cosmic upgrades.

* The fix is upstream (https://github.com/ximion/appstream/commit/734e9da66bf12fcaa94c10465db2dcf8bb2b94cb) and in the cosmic version of appstream

[Test Case]

1. On a fresh bionic installation, change bionic to cosmic in sources.list
2. Run apt update

This use case happens when the user does a release upgrade.

[Regression potential]

This patch affects the way appstream metadata is parsed to build a representation in memory. Potential regressions may happen if the parser is fed invalid/malformed metadata with unexpected types. That's actually the cause of the crash itself, so we cannot assume that it won't happen again with differently malformed metadata.

There doesn't appear to be specific tests associated to that crash in the upstream commit that fixes it, so there's no guarantee it won't regress in the future.

[Other Info]

According to errors.ubuntu.com the crash still happens in cosmic with appstream 0.12.2-2, which would imply that the patch does not fix all occurrences of the problem.
However according to Laney this data is not always accurate, sometimes crashes which happen around an upgrade are reported against the new version mistakenly.

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

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

Changed in appstream (Ubuntu):
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce the crash when attempting the bionic→cosmic upgrade in a VM.

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

I installed the appstream package from the cosmic repository (0.12.2-2) in my bionic VM, and the crash went away. Looks like this might be https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906538, reported upstream as https://github.com/ximion/appstream/issues/198 and fixed with https://github.com/ximion/appstream/commit/734e9da66bf12fcaa94c10465db2dcf8bb2b94cb.

description: updated
Changed in appstream (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
tags: added: rls-cc-incoming
tags: added: rls-bb-incoming
removed: rls-cc-incoming
Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Iain Lane (laney) wrote :

it is uploaded, thanks. I suggest adding a [Regression potential] section to please the SRU team.

https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in appstream (Ubuntu):
status: Triaged → Fix Released
Changed in appstream (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon)
description: updated
Changed in appstream (Ubuntu Bionic):
importance: Undecided → High
description: updated
Revision history for this message
Olivier Tilloy (osomon) wrote :

I built appstream with the attached debdiff in a PPA, updated my bionic VM with that PPA and was able to successfully upgrade it to cosmic afterwards.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted appstream into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/appstream/0.12.0-3ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in appstream (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Olivier Tilloy (osomon) wrote :

Successfully tested appstream 0.12.0-3ubuntu1 from bionic-proposed in an up-to-date bionic VM, and I can confirm the issue is fixed.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for appstream has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package appstream - 0.12.0-3ubuntu1

---------------
appstream (0.12.0-3ubuntu1) bionic; urgency=medium

  * cache-explicit-variants.patch: fix crash when upgrading from bionic
    to cosmic (LP: #1792537)

 -- Olivier Tilloy <email address hidden> Fri, 14 Sep 2018 10:59:05 +0200

Changed in appstream (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
pratheepan thevadasan (pradrego) wrote :

Hi,
I'm trying to go from bionic to cosmic and I'm receiving the appstream error. I've checked my version of appstream and its 0.12.0-3. Is there anything else I can try ?

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.