fwupdmgr refresh shows "Mismatched XML" error in 16.04 Ubuntu

Bug #1829813 reported by Tim Chen
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
fwupd (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Critical
Tim Chen

Bug Description

[Impact]

Execute the `fwupdmgr refresh` command shows "Mismatched XML" message in a fully updated Ubuntu 16.04 desktop,

[Test Case]

To reproduce on any Ubuntu 16.04 classic (Xenial):

#apt install fwupd
#fwupdmgr refresh
failed to update metadata: Failed to parse XML: Mismatched XML

The core snap `uefi-fw-tools` used in Ubuntu Core 16 also affected with same issue.

This is worked in Ubuntu 18.04 (bionic)

#fwupdmgr refresh
Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading… [***************************************]
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc

The `fwupd` classic confined snap also works.

[Regression Potential]

Only affected fwupd in Ubuntu 16.04.

[Additional Info]

===

Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

ii fwupd 0.8.3-0ubuntu4

#fwupdmgr refresh
failed to update metadata: Failed to parse XML: Mismatched XML

Tim Chen (timchen119)
tags: added: xenial
Tim Chen (timchen119)
description: updated
Tim Chen (timchen119)
description: updated
Tim Chen (timchen119)
description: updated
Tim Chen (timchen119)
description: updated
Revision history for this message
Mario Limonciello (superm1) wrote :

That message is coming from appstream-glib, somewhere around here: https://github.com/hughsie/appstream-glib/blob/843caabdeca6ae15f400f38536bc666340c30465/libappstream-glib/as-store.c#L2329

I would recommend to start out with trying a newer appstream-glib to see if that helps.

Revision history for this message
Mario Limonciello (superm1) wrote :

I reported this upstream here: https://github.com/hughsie/lvfs-website/issues/335

It looks like it's related to the metadata being too big.

no longer affects: appstream-glib (Ubuntu)
Changed in fwupd (Ubuntu):
status: New → Triaged
status: Triaged → Fix Released
Changed in fwupd (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Mario Limonciello (superm1) wrote :

So here is the plan.

1) Short term; there is a patch being deployed to LVFS that will limit the number of metadata items to no more than 5 per GUID. This doesn't scale, but will allow current fwupd 0.8.x based installs to work.
2) Longer term; a patch was submitted into fwupd that will make the max size of the metadata 10x.
This needs to be SRU'ed:
https://github.com/hughsie/fwupd/commit/a1e6e7ff254f3409e0bced0fb400073d6e2b96e8

Tim, can you please SRU it and get it into uefi-fw-tools?

Revision history for this message
Mario Limonciello (superm1) wrote :

Once SRU is done, the LVFS workaround will be reverted.

Changed in fwupd (Ubuntu Xenial):
assignee: nobody → Tim Chen (timchen119)
Revision history for this message
Tim Chen (timchen119) wrote :

@Mario
Thanks for the quick resolution, will follow up on this and find sponsor on the Xenial SRU.

As for UC16, I've verified the fix and published uefi-fw-tools snap in beta channel with the fix, will make internally verified, update gated snap and release to stable.

Revision history for this message
Tim Chen (timchen119) wrote :
Tim Chen (timchen119)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

This looks good, sponsored package for xenial (should appear in the queue soon). The regression potential field for the bug is a bit 'poor', but looking at the change itself I guess there's not much regression potential anyway. It seems safe.

Let's wait for someone else from the SRU team to review this upload.

Revision history for this message
Robie Basak (racb) wrote :

> The regression potential field for the bug is a bit 'poor', but looking at the change itself I guess there's not much regression potential anyway. It seems safe.

Maybe we can mitigate by thinking about how to test this. Could you arrange testing with metadata of different sizes (<1Mb, 1Mb<x<10Mb, >10Mb) for example, to make sure that edge cases behave as expected? If that doesn't make sense that's fine, but please explain why.

To avoid holding this up I'll accept now, but please give some thought to what could regression and add that to your SRU verification please.

Changed in fwupd (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Tim, or anyone else affected,

Accepted fwupd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fwupd/0.8.3-0ubuntu5 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

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

Revision history for this message
Harry G McGavran Jr (w5pny) wrote :

I just installed proposed fwupd 0.8.3 on Xenial. The "Mismatched XML" issue
disappeared, fwupdmgr found new firmware. I updated the firmware and everything
seems to work fine. Running fwupdmgr after this process and rebooting seems fine too,
no "Mismatched XML" With the previous version, the "Mismatched XML" issue didn't always
happen, but it's been happening the past week or thereabouts.

If this problem returns, I'll post any issues here.

Revision history for this message
Harry G McGavran Jr (w5pny) wrote :

I haven't been able to find how to set a tag for my post above (#10).
It should have the "verification-done-xenial" tag.

Mathew Hodson (mhodson)
tags: added: verification-needed-done
removed: verification-needed verification-needed-xenial
tags: added: verification-done verification-done-xenial
removed: verification-needed-done
Revision history for this message
Jethro Beekman (jethrogb) wrote :

I was running into this exact issue. I installed the .deb from xenial-proposed and it fixed the issue.

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

This bug was fixed in the package fwupd - 0.8.3-0ubuntu5

---------------
fwupd (0.8.3-0ubuntu5) xenial; urgency=medium

  * debian/patches 0001-Raise-the-metadata-limit-to-10Mb.patch:
    - Raise the metadata limit to 10Mb, fix XML mismatch error while fwupdmgr
      refresh (LP: #1829813)

 -- Jian-Ding Chen <email address hidden> Wed, 22 May 2019 13:44:54 +0800

Changed in fwupd (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for fwupd 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.

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.