You have been subscribed to a public bug:

I'm running Ubuntu 22.04.5 LTS with KDE (sometimes called Kubuntu).
After getting a list of proposed SW updates and allowing them via the
standard Software Center (Plasma Discover), Discover crashed. The
automatic bug reporting triggered, but failed to capture a crash dump
for unknown reasons and would not proceed, so this is reported manually.

When I restarted Discover, it crashed again. Rebooted, and it still
crashed. The crash was not limited to Discover, but also happened if I
ran "apt-get update". The error message pointed to the appstreamcli
utility crashing with a segmentation fault, so I also tried to run
"appstreamcli status". It also crashed with the following output (the
GLib-CRITICAL part being identical to the one I saw with "apt-get
update", not sure about the parenthesized expression at the start of the
error message):

AppStream Status:
Version: 0.15.2
OS metadata sources:
 Software catalog data
 Group: os-catalog
  /var/lib/swcatalog/yaml
    • YAML:  15
  /var/cache/app-info/xmls
    • Collection XML:  0
  /var/lib/swcatalog/icons
    • Iconsets:
        ubuntu-jammy-security-main
        ubuntu-jammy-main
        ubuntu-jammy-security-restricted
        ubuntu-jammy-security-universe
        ubuntu-jammy-security-multiverse
        ubuntu-jammy-universe
        ubuntu-jammy-multiverse
        ubuntu-jammy-updates-main
        ubuntu-jammy-updates-restricted
        ubuntu-jammy-updates-universe
        ubuntu-jammy-updates-multiverse
        ubuntu-jammy-backports-main
        ubuntu-jammy-backports-restricted
        ubuntu-jammy-backports-universe
        ubuntu-jammy-backports-multiverse

 Data from locally installed software
 Group: local-metainfo
  /usr/share/applications
    • Desktop Entry:  152
  /usr/share/metainfo
    • MetaInfo XML:  134

Other metadata sources:
 Group: flatpak-flathub-x86_64
  /var/lib/flatpak/appstream/flathub/x86_64/active
    • Collection XML:  1
  /var/lib/flatpak/appstream/flathub/x86_64/active/icons
    • Iconsets:
        128x128
        64x64
        flatpak

Summary:
(appstreamcli:18919): GLib-CRITICAL **: 04:09:35.743: g_strsplit: assertion 
'string != NULL' failed
Segmentation fault (core dumped)

I'm not familiar with appstream at all, only having used it indirectly through 
the standard software update mechanism, but I suspected some kind of corruption 
of its datafiles, and managed to trace it to
/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz. If I moved 
the file away, the crashes went away in all cases (Discover, apt-get, 
appstreamcli). The file didn't appear to be truncated or visibly corrupt after 
uncompressing it (47 MB in size over almost 700000 lines so not easy to check 
completely), but I tried refreshing it with "flatpak update --appstream". This 
recreated the file in a fresh directory (adjusting the active symlink to point 
at it) but the contents was the same and the crashes were the same. This was 
with the current metadata from Flathub on June 16 2026.

Bisecting the file, I managed to narrow the problem down to one specific
component, named MegaMesh. It's component declaration starts like this:

<component type="desktop-application">
    <id>net.atns.MegaMesh</id>
    <name>MegaMesh</name>
    <summary>3D model viewer</summary>
    <project_license>GPL-3.0-or-later</project_license>

...and inside it, the following lines seems to be what triggered the
crash inside appstreamcli:

    <tags>
      <tag>3D</tag>
      <tag>model</tag>
      <tag>viewer</tag>
      <tag>obj</tag>
      <tag>vulkan</tag>
    </tags>


It is the only component using that particular syntax, and removing these tags 
from the component is enough to stop the crashes (although I suspect they will 
reappear when the metadata is refreshed the next time). The <tags> syntax is 
only used for one other component, "Missingno", with a somewhat different 
syntax, and that component didn't trigger the crash:

    <tags>
      <tag namespace="flathub">emulator</tag>
    </tags>

Maybe it's the absence of a namespace in the crashing case? Or that
there are multiple <tag> instances within the <tags>?

I'm attaching a bisected XML file that can be used to trigger the bug in
a more convenient way, e.g. via the command "appstreamcli convert
bisected_appstream.xml bisected_appstream.yaml".

I realize that Flathub is not enabled by default in Ubuntu 22.04.5, but
as the crash prevents software updates for the entire system, not just
Flathub packages, the effects of the bug are pretty severe for a still-
supported LTS release. Here's the version info:

> lsb_release -rd
Description:    Ubuntu 22.04.5 LTS
Release:        22.04

> apt-cache policy appstream
appstream:
  Installed: 0.15.2-2
  Candidate: 0.15.2-2
  Version table:
 *** 0.15.2-2 500
        500 http://se.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: appstream (Ubuntu)
     Importance: Undecided
         Status: New

-- 
appstreamcli segmentation fault prevents SW updates
https://bugs.launchpad.net/bugs/2156906
You received this bug notification because you are a member of Ubuntu Desktop 
Bugs, which is subscribed to appstream in Ubuntu.

-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to