https://bugs.kde.org/show_bug.cgi?id=526705

            Bug ID: 526705
           Summary: Discover crashes in UpdateModel::totalUpdatesCount()
                    after fwupd firmware updates fail
    Classification: Applications
           Product: Discover
      Version First 6.7.5
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Updates
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 196866
  --> https://bugs.kde.org/attachment.cgi?id=196866&action=edit
Full backtrace (all threads)

DESCRIPTION:
STEPS TO REPRODUCE
1. Have only fwupd firmware updates pending (in my case: Dell WD19S dock
components and a System Firmware/BIOS capsule for a Dell Latitude 5420). No
PackageKit or Flatpak updates are pending.
2. Open Discover > Updates and click "Update All".
3. The firmware updates fail (dock: "failed to erase bank ... USB error: Pipe
error"; BIOS: "/boot/efi does not have sufficient space").

OBSERVED RESULT
Discover crashes with SIGSEGV a few seconds after the failures. It happens
every time.

EXPECTED RESULT
Discover shows the failed updates as errors and does not crash.

ANALYSIS
The crash is at libdiscover/UpdateModel/UpdateModel.cpp:342 in
totalUpdatesCount(), on `item->resource()->packageName()`. It is triggered from
~ResultsStream() -> QObject::destroyed -> a QML binding re-reading
totalUpdatesCount, so m_updateItems seems to still hold an UpdateItem whose
resource was already destroyed.
This looks related to Bug 522255 (crash in UpdateModel::setResources(), fixed
in 6.7.4 by "UpdatesModel: Remove destroyed resources"), but it still happens
in 6.7.5 through totalUpdatesCount(). The fwupd failure itself is likely Bug
505354 (interactive WD19 dock updates not handled in Discover).

Relevant log lines:
Fwupd Error 5 failed to write-firmware: failed to erase bank: failed after 5
retries: failed to SetReport: USB error: Pipe error [-9]
Fwupd Error 10 /boot/efi does not have sufficient space, required 54.0 MB, need
additional 30.2 MB
fwupd: Device not supported: Package level of Dell dock is not updatable as
requires a non-generic request
KCrash: Application 'plasma-discover' crashing... crashRecursionCounter = 2

Crashing thread (symbolized; full backtrace of all threads attached):
#5  UpdateModel::totalUpdatesCount (this=<optimized out>) at
libdiscover/UpdateModel/UpdateModel.cpp:342
#6  UpdateModel::qt_static_metacall (...) at moc_UpdateModel.cpp:153
#7  QQmlPropertyData::readProperty (...)
...
#22 QQuickAction::enabledChanged (...)
...
#47 QObject::destroyed (...)
#48 QObject::~QObject (...)
#49 ResultsStream::~ResultsStream (...) at
libdiscover/resources/AbstractResourcesBackend.cpp:70
#50 QObject::event (...)   [DeferredDelete]

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.5 (plasma-discover-6.7.5-1.fc44)
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
fwupd: 2.1.8
PackageKit: 1.4.0
Kernel: 7.2.8-200.fc44.x86_64
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Hardware: Dell Latitude 5420 (Intel Iris Xe), Dell WD19S dock.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to