Bug 405433 - Apper crashes during Arch Linux update
Summary: Apper crashes during Arch Linux update
Status: RESOLVED FIXED
Alias: None
Product: apper
Classification: Applications
Component: general (show other bugs)
Version: 1.0.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords: drkonqi
: 413282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-13 15:23 UTC by Stepan Shabalin
Modified: 2019-10-29 00:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Shabalin 2019-03-13 15:23:26 UTC
Application: apper (1.0.0)

Qt Version: 5.12.1
Frameworks Version: 5.56.0
Operating System: Linux 5.0.0-arch1-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
I tried to update my Arch Linux system and Apper crashed. However, it seems like the update has finished since the CLI tool (pacman) reported that there aren't any updates.

-- Backtrace:
Application: Apper (apper), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1ff343a880 (LWP 6094))]

Thread 4 (Thread 0x7f1fe95d1700 (LWP 6097)):
#0  0x00007f1ff749cafc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f1fe9babc94 in  () at /usr/lib/dri/i965_dri.so
#2  0x00007f1fe9bab9b8 in  () at /usr/lib/dri/i965_dri.so
#3  0x00007f1ff7496a9d in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f1ff7ea9b23 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f1febfff700 (LWP 6096)):
#0  0x00007f1ff7eb7183 in __libc_enable_asynccancel () at /usr/lib/libc.so.6
#1  0x00007f1ff7e9ec0e in poll () at /usr/lib/libc.so.6
#2  0x00007f1ff6f2c690 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007f1ff6f2c77e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007f1ff83d1d04 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f1ff837ab2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f1ff81be569 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#7  0x00007f1ff86cfba6 in  () at /usr/lib/libQt5DBus.so.5
#8  0x00007f1ff81bf96c in  () at /usr/lib/libQt5Core.so.5
#9  0x00007f1ff7496a9d in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007f1ff7ea9b23 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f1ff2425700 (LWP 6095)):
#0  0x00007f1ff7e9ec21 in poll () at /usr/lib/libc.so.6
#1  0x00007f1ff61a1630 in  () at /usr/lib/libxcb.so.1
#2  0x00007f1ff61a32db in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f1ff3007949 in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f1ff81bf96c in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f1ff7496a9d in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f1ff7ea9b23 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f1ff343a880 (LWP 6094)):
[KCrash Handler]
#6  0x00007f1ff9f01873 in  () at /usr/lib/apper/libapper_private.so
#7  0x00007f1ff9efa4eb in PackageModel::clearSelectedNotPresent() () at /usr/lib/apper/libapper_private.so
#8  0x000055e45b24fb2b in  ()
#9  0x00007f1ff83a69d0 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#10 0x00007f1ff9c51e70 in PackageKit::Transaction::finished(PackageKit::Transaction::Exit, unsigned int) () at /usr/lib/libpackagekitqt5.so.1
#11 0x00007f1ff9c56c96 in  () at /usr/lib/libpackagekitqt5.so.1
#12 0x00007f1ff9c54536 in  () at /usr/lib/libpackagekitqt5.so.1
#13 0x00007f1ff83a687c in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#14 0x00007f1ff9c66985 in  () at /usr/lib/libpackagekitqt5.so.1
#15 0x00007f1ff9c68e46 in  () at /usr/lib/libpackagekitqt5.so.1
#16 0x00007f1ff86db9ef in  () at /usr/lib/libQt5DBus.so.5
#17 0x00007f1ff83a7152 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#18 0x00007f1ff8e5ee24 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#19 0x00007f1ff8e666e1 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#20 0x00007f1ff837be99 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#21 0x00007f1ff837ef38 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#22 0x00007f1ff83d2714 in  () at /usr/lib/libQt5Core.so.5
#23 0x00007f1ff6f2a7bf in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#24 0x00007f1ff6f2c739 in  () at /usr/lib/libglib-2.0.so.0
#25 0x00007f1ff6f2c77e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#26 0x00007f1ff83d1ce9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#27 0x00007f1ff837ab2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#28 0x00007f1ff8382e36 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#29 0x000055e45b2403ab in  ()
#30 0x00007f1ff7dd2223 in __libc_start_main () at /usr/lib/libc.so.6
#31 0x000055e45b24049e in _start ()
[Inferior 1 (process 6094) detached]

Reported using DrKonqi
Comment 1 Albert Astals Cid 2019-03-21 22:11:14 UTC
Git commit d486706f3e9f7eefa4d44cd5ace34eeaf7ba2ceb by Albert Astals Cid, on behalf of Alexander Kernozhitsky.
Committed on 21/03/2019 at 22:11.
Pushed by aacid into branch 'master'.

Prevent crashing Apper on PackageModel::clearSelectedNotPresent()

Summary:
m_checkedPackages.erase() is called, but the iterator is not increased, therefore on the next iteration we use an invalid iterator
Related: bug 401461, bug 402170

Test Plan: I just rebuilt Apper, ran it and installed the updates with it. The bug does not appear.

Reviewers: dantti, apol

Reviewed By: dantti

Differential Revision: https://phabricator.kde.org/D19951

M  +1    -1    libapper/PackageModel.cpp

https://commits.kde.org/apper/d486706f3e9f7eefa4d44cd5ace34eeaf7ba2ceb
Comment 2 Patrick Silva 2019-10-29 00:14:31 UTC
*** Bug 413282 has been marked as a duplicate of this bug. ***