Bug 396730 - Discover crashes when closed while checking for updates
Summary: Discover crashes when closed while checking for updates
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Unclassified
Component: discover (show other bugs)
Version: 5.13.3
Platform: Archlinux Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords: drkonqi
: 399303 399465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-21 15:04 UTC by Patrick Silva
Modified: 2018-10-10 23:57 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 Patrick Silva 2018-07-21 15:04:47 UTC
Application: plasma-discover (5.13.3)

Qt Version: 5.11.1
Frameworks Version: 5.48.0
Operating System: Linux 4.17.6-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
open discover and close it immediately while "cheking for updates" appears in the sidebar.
Plasma shows a crash notification.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Discover (plasma-discover), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f4f08dc7800 (LWP 32579))]

Thread 15 (Thread 0x7f4ea12b2700 (LWP 32649)):
#0  0x00007f4f0434e0f9 in syscall () at /usr/lib/libc.so.6
#1  0x00007f4efea4052d in g_cond_wait_until () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9cb903 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4efe9cbeee in g_async_queue_timeout_pop () at /usr/lib/libglib-2.0.so.0
#4  0x00007f4efea22541 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4efea21a2a in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 14 (Thread 0x7f4eb88cf700 (LWP 32644)):
#0  0x00007f4efea402f4 in g_mutex_unlock () at /usr/lib/libglib-2.0.so.0
#1  0x00007f4efe9f9440 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 13 (Thread 0x7f4eb955a700 (LWP 32638)):
[KCrash Handler]
#6  0x00007f4ebf0c4ac8 in flatpak_installation_list_installed_refs_for_update () at /usr/lib/libflatpak.so.0
#7  0x00007f4ebf54c191 in non-virtual thunk to QtConcurrent::RunFunctionTask<_GPtrArray*>::run() () at /usr/lib/qt/plugins/discover/flatpak-backend.so
#8  0x00007f4f04a5b9f1 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 12 (Thread 0x7f4eb9d5b700 (LWP 32637)):
#0  0x00007f4f00c383f6 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f4f04a641dd in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f4f04a5bc04 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7f4eba55c700 (LWP 32636)):
#0  0x00007f4f04344934 in read () at /usr/lib/libc.so.6
#1  0x00007f4efea3eed1 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f8ff8 in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4efe9f94c6 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f4efe9f98e2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4ebed91348 in  () at /usr/lib/libgio-2.0.so.0
#6  0x00007f4efea21a2a in  () at /usr/lib/libglib-2.0.so.0
#7  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7f4ebad5d700 (LWP 32635)):
#0  0x00007f4f04344934 in read () at /usr/lib/libc.so.6
#1  0x00007f4efea3eed1 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f8ff8 in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4efe9f94c6 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4efe9f9692 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007f4efea21a2a in  () at /usr/lib/libglib-2.0.so.0
#7  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f4ecc8bf700 (LWP 32634)):
#0  0x00007f4f00c383f6 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f4f04a641dd in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f4f04a5bc04 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f4ecd0c0700 (LWP 32633)):
#0  0x00007f4efea402f4 in g_mutex_unlock () at /usr/lib/libglib-2.0.so.0
#1  0x00007f4efe9f93ce in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f4ecdf4b700 (LWP 32632)):
#0  0x00007f4f04348ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f4efe9f9523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f4ed75ef700 (LWP 32631)):
#0  0x00007f4f04348ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f4efe9f9523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f07e5c23b in  () at /usr/lib/libQt5Quick.so.5
#7  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f4edceea700 (LWP 32630)):
#0  0x00007f4f00c37ffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f4eddb85124 in  () at /usr/lib/dri/i965_dri.so
#2  0x00007f4eddb84e18 in  () at /usr/lib/dri/i965_dri.so
#3  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f4eec87a700 (LWP 32617)):
#0  0x00007f4f04344934 in read () at /usr/lib/libc.so.6
#1  0x00007f4efea3eed1 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f8ff8 in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4efe9f94c6 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007f4f055e99c9 in  () at /usr/lib/libQt5Qml.so.5
#9  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f4eed07b700 (LWP 32616)):
#0  0x00007f4f04348ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f4efe9f9523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4efe9f963e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4f04c65054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04c1094c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f04a59a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f4f0693c976 in  () at /usr/lib/libQt5DBus.so.5
#7  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f4ef6172700 (LWP 32598)):
#0  0x00007f4f04348ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f4efe790180 in  () at /usr/lib/libxcb.so.1
#2  0x00007f4efe791e4b in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f4ef8f2122a in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f4f04a63b45 in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f4f00c32075 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f4f0435353f in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f4f08dc7800 (LWP 32579)):
#0  0x00007f4f00c37ffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f4f04a642fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f4f04a5a22b in QThreadPoolPrivate::waitForDone(int) () at /usr/lib/libQt5Core.so.5
#3  0x00007f4f04a5a712 in QThreadPool::waitForDone(int) () at /usr/lib/libQt5Core.so.5
#4  0x00007f4f04a5a75d in QThreadPool::~QThreadPool() () at /usr/lib/libQt5Core.so.5
#5  0x00007f4ebf545fa5 in FlatpakBackend::~FlatpakBackend() (this=0x5586be468510, __in_chrg=<optimized out>) at /usr/src/debug/discover-5.13.3/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:108
#6  0x00007f4ebf5460c9 in FlatpakBackend::~FlatpakBackend() (this=0x5586be468510, __in_chrg=<optimized out>) at /usr/src/debug/discover-5.13.3/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:102
#7  0x00007f4f07ae873e in qDeleteAll<AbstractResourcesBackend* const*>(AbstractResourcesBackend* const*, AbstractResourcesBackend* const*) (end=0x5586bf3b1558, begin=0x5586bf3b1548) at /usr/include/qt/QtCore/qalgorithms.h:317
#8  0x00007f4f07ae873e in qDeleteAll<QVector<AbstractResourcesBackend*> >(QVector<AbstractResourcesBackend*> const&) (c=...) at /usr/include/qt/QtCore/qalgorithms.h:328
#9  0x00007f4f07ae873e in ResourcesModel::~ResourcesModel() (this=0x5586bdf5c620, __in_chrg=<optimized out>) at /usr/src/debug/discover-5.13.3/libdiscover/resources/ResourcesModel.cpp:93
#10 0x00007f4f07ae87aa in ResourcesModel::~ResourcesModel() (this=0x5586bdf5c620, __in_chrg=<optimized out>) at /usr/src/debug/discover-5.13.3/libdiscover/resources/ResourcesModel.cpp:90
#11 0x00007f4f04c3c3f1 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#12 0x00007f4f0621da74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x00007f4f06225341 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007f4f04c11cb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#15 0x00007f4f04c14d4c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#16 0x00007f4f04c18c60 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#17 0x00005586bc37cd76 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/discover-5.13.3/discover/main.cpp:156

Reported using DrKonqi
Comment 1 Aleix Pol 2018-07-25 13:09:05 UTC
Git commit f55fd33c294284a0a1e64c0c7c626e3bb0f853d4 by Aleix Pol.
Committed on 25/07/2018 at 13:07.
Pushed by apol into branch 'master'.

Flatpak: Make sure we cancel ongoing transactions on shutdown

Otherwise they may stay dangling, leading to a crash.

M  +3    -3    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://commits.kde.org/discover/f55fd33c294284a0a1e64c0c7c626e3bb0f853d4
Comment 2 Aleix Pol 2018-10-09 11:07:32 UTC
*** Bug 399303 has been marked as a duplicate of this bug. ***
Comment 3 Aleix Pol 2018-10-09 11:08:06 UTC
*** Bug 399465 has been marked as a duplicate of this bug. ***
Comment 4 Aleix Pol 2018-10-10 23:57:08 UTC
Git commit 9a8f22b373095cabdb1c033709ac4c8d22ed5ea7 by Aleix Pol.
Committed on 10/10/2018 at 23:55.
Pushed by apol into branch 'Plasma/5.14'.

flatpak: wait for threads to finish before closing completely

M  +1    -0    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://commits.kde.org/discover/9a8f22b373095cabdb1c033709ac4c8d22ed5ea7