Summary: | drkonqi-pk-debug-installer crashes in libappstreamqt | ||
---|---|---|---|
Product: | [KDE Neon] neon | Reporter: | Malte S. Stretz <mss> |
Component: | general | Assignee: | Neon Bugs <neon-bugs> |
Status: | REPORTED --- | ||
Severity: | crash | CC: | jr, mashkal2000, nate, neon-bugs, sitter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
URL: | https://github.com/ximion/appstream/issues/528 | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=473017 https://bugs.kde.org/show_bug.cgi?id=474295 https://bugs.kde.org/show_bug.cgi?id=432305 https://bugs.kde.org/show_bug.cgi?id=474540 |
||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Malte S. Stretz
2023-09-11 11:28:31 UTC
root@neon:~# apt show drkonqi-pk-debug-installer libappstreamqt2 libqt5core5a Package: drkonqi-pk-debug-installer Version: 0.1+p22.04+vrelease+git20230906.2256-0 Priority: optional Section: kde Maintainer: Neon CI <neon@kde.org> Installed-Size: 304 kB Depends: packagekit, libappstreamqt2 (>= 0.16.2), libc6 (>= 2.34), libkf5coreaddons5, libkf5declarative5, libkf5i18n5, libpackagekitqt5-1 (>= 1.0.2), libqt5core5a (>= 5.15.10+p22.04+vrelease+git20230830.0028), libqt5gui5 (>= 5.15.10+p22.04+vrelease+git20230830.0028), libqt5qml5 (>= 5.15.10+p22.04+vrelease+git20230830.0107), libqt5widgets5 (>= 5.15.10+p22.04+vrelease+git20230830.0028), libstdc++6 (>= 5) Conflicts: kubuntu-debug-installer Replaces: kubuntu-debug-installer Homepage: https://www.kde.org Download-Size: 54.0 kB APT-Manual-Installed: no APT-Sources: http://archive.neon.kde.org/user jammy/main amd64 Packages Description: Debug package installer for DrKonqi crash reporting This installer permits drkonqi, KDE's automatic backtrace and bug report utility, to find and install missing debug symbols, so that backtraces become more useful. Package: libappstreamqt2 Version: 0.16.2-0xneon+22.04+jammy+release+build18 Priority: optional Section: libs Source: appstream-qt5 Maintainer: Neon CI <neon@kde.org> Installed-Size: 324 kB Depends: libappstream4 (>= 0.16.2), libc6 (>= 2.14), libgcc-s1 (>= 3.3.1), libglib2.0-0 (>= 2.62), libqt5core5a (>= 5.15.10+p22.04+vrelease+git20230830.0028), libstdc++6 (>= 5) Homepage: https://www.freedesktop.org/wiki/Distributions/AppStream/ Download-Size: 73.7 kB APT-Manual-Installed: no APT-Sources: http://archive.neon.kde.org/user jammy/main amd64 Packages Description: Qt5 library to access AppStream services Package: libqt5core5a Version: 5.15.10+p22.04+vrelease+git20230906.2346-0 Priority: optional Section: libs Source: qtbase-opensource-src Maintainer: Neon CI <neon@kde.org> Installed-Size: 5828 kB Provides: qtbase-abi-5-15-5 Depends: shared-mime-info, libc6 (>= 2.35), libdouble-conversion3 (>= 2.0.0), libgcc-s1 (>= 3.4), libglib2.0-0 (>= 2.22.0), libicu70 (>= 70.1-1~), libpcre2-16-0 (>= 10.22), libstdc++6 (>= 11), libsystemd0, libzstd1 (>= 1.4.0), zlib1g (>= 1:1.1.4) Recommends: qttranslations5-l10n Suggests: libthai0 Breaks: libqt5scintilla2-12v5 (<< 2.9.2+dfsg-2~), libqtcore4 (<< 4:4.8.7+dfsg-20~) Replaces: libqtcore4 (<< 4:4.8.7+dfsg-20~) Homepage: https://www.qt.io/developers/ Download-Size: 1801 kB APT-Manual-Installed: no APT-Sources: http://archive.neon.kde.org/user jammy/main amd64 Packages Description: Qt 5 core module This commit seems related https://invent.kde.org/system/drkonqi-pk-debug-installer/-/commit/2a0fe5e364b0ae1c7f8acf2b45f0ff66050df325 "it is unclear why the component would be invalid" -- I can reproduce this reliably with the current Live ISO, maybe that will clear this up. I filed an upstream bug at https://github.com/ximion/appstream/issues/528 @Harald: Sorry for adding you to the CC list but I think I found the root cause and I found something odd in the existing code.
The cause seems to be that no component org.kde.neon.com.ubuntu.ddebs exists:
# appstreamcli get org.kde.neon.com.ubuntu.ddebs
Unable to find component with ID 'org.kde.neon.com.ubuntu.ddebs'!
I have no idea why the pool returns items nevertheless and te lib shouldn't crash but I filed that upstream.
The odd thing I noticed is in the code blow where it says "ensure distros use valid ids". Why is it checking the length of components when in the line above components is extended by matchedComponents? Shouldn't the Q_ASSERT look at matchedComponents just after it was retrieved instead? Or if this is really intended should it be moved after the loop?
> QList<AppStream::Component> components;
> for (const auto &id : ids) {
> const auto matchedComponents = pool.componentsById(id);
> components += matchedComponents;
>
> Q_ASSERT(components.count() == 1); // ensure distros use valid ids
> const auto &component = matchedComponents.at(0);
> Q_ASSERT(component.isValid()); // we've seen crash reports that indicated invalid components, unclear why. verify them for now.
> qWarning() << component.toString();
> qWarning() << component.packageNames();
> Q_ASSERT(component.kind() == AppStream::Component::KindRepository);
> }
>
I think I shouldn't have filed that upstream bug since I think this is the bug in this code (quoted from my comment on the upstream bug report):
> This is release code so the Q_ASSERTs are probably not doing anything. So the components.count() == 1 isn't catching a zero element list being added before. And matchedComponents.at(0) would violate the requirement that the index must exist in the list, ie. it could return anything which wouldn't be caught by the next Q_ASSERT either. So the next line would be the first actual request to that invalid value.
I also found out why the component is not found and opened bug 474402 for that issue. (In reply to Malte S. Stretz from comment #6) > I also found out why the component is not found and opened bug 474402 for > that issue. Sorry, copy and paste error, that should have been bug 474540. *** Bug 490627 has been marked as a duplicate of this bug. *** |