Bug 422855 - Crashes in flatpak_installation_list_installed_refs() while logging in / auto restore of apps
Summary: Crashes in flatpak_installation_list_installed_refs() while logging in / auto...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 5.19.0
Platform: unspecified Linux
: HI crash
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: drkonqi
: 437145 438414 438501 454471 456397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-12 07:09 UTC by iGadget
Modified: 2022-10-13 16:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iGadget 2020-06-12 07:09:16 UTC
Application: plasma-discover (5.19.0)

Qt Version: 5.14.2
Frameworks Version: 5.70.0
Operating System: Linux 5.3.0-51-generic x86_64
Windowing system: X11
Distribution: KDE neon User Edition 5.19

-- Information about the crash:
- What I was doing when the application crashed:

Nothing. The system had cold-booted, I had just logged in and as all my applications were being restored, this crash occured.

-- Backtrace:
Application: Discover (plasma-discover), signal: Segmentation fault

[KCrash Handler]
#4  flatpak_dir_list_refs (self=self@entry=0x0, kind=kind@entry=0x7f17deb98e9f "app", refs_out=refs_out@entry=0x7f17c88dba80, cancellable=cancellable@entry=0x7f1808004da0, error=error@entry=0x7f17c88dbba0) at common/flatpak-dir.c:6249
#5  0x00007f17deb51578 in flatpak_installation_list_installed_refs (self=self@entry=0x55937527c100, cancellable=cancellable@entry=0x7f1808004da0, error=error@entry=0x7f17c88dbba0) at common/flatpak-installation.c:908
#6  0x00007f17deb539c2 in flatpak_installation_list_installed_refs_for_update (self=0x55937527c100, cancellable=0x7f1808004da0, error=error@entry=0x7f17c88dbba0) at common/flatpak-installation.c:1087
#7  0x00007f17dede7c82 in FlatpakBackend::<lambda()>::operator() (__closure=0x5593781ec338) at ./libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:815
#9  QtConcurrent::RunFunctionTask<_GPtrArray*>::run (this=0x5593781ec310) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentrunbase.h:108
#10 0x00007f181eadc382 in QThreadPoolThread::run (this=0x559376563a10) at thread/qthreadpool.cpp:99
#11 0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559376563a10) at thread/qthread_unix.cpp:342
#12 0x00007f181a9126db in start_thread (arg=0x7f17c88dc700) at pthread_create.c:463
#13 0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f181853775f in g_cond_wait () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f0875 in g_main_context_wait () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f18184f1903 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f17cb4ee401 in fwupd_client_update_metadata () from /usr/lib/x86_64-linux-gnu/libfwupd.so.2
#5  0x00007f17cb71804b in FwupdBackend::refreshRemote (backend=0x559376d1e7b0, remote=remote@entry=0x7f17a846c400, cacheAge=cacheAge@entry=86400, cancellable=0x55937527bda0) at ./libdiscover/backends/FwupdBackend/FwupdBackend.cpp:341
#6  0x00007f17cb719218 in FwupdBackend::<lambda()>::operator() (__closure=0x55937603f7e8) at ./libdiscover/backends/FwupdBackend/FwupdBackend.cpp:446
#8  QtConcurrent::RunFunctionTask<_GPtrArray*>::run (this=0x55937603f7c0) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentrunbase.h:108
#9  0x00007f181eadc382 in QThreadPoolThread::run (this=0x559376d0bf00) at thread/qthreadpool.cpp:99
#10 0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559376d0bf00) at thread/qthread_unix.cpp:342
#11 0x00007f181a9126db in start_thread (arg=0x7f17c98de700) at pthread_create.c:463
#12 0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f181ead7e06 in get_thread_data () at thread/qthread_unix.cpp:173
#2  QThreadData::current (createIfNecessary=createIfNecessary@entry=true) at thread/qthread_unix.cpp:220
#3  0x00007f181ed27e21 in postEventSourcePrepare (timeout=0x0, s=0x7f17b4003ad0) at kernel/qeventdispatcher_glib.cpp:253
#4  postEventSourceCheck (source=0x7f17b4003ad0) at kernel/qeventdispatcher_glib.cpp:270
#5  0x00007f18184f0fe1 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f18184f1570 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f17b4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#9  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f17ca0dec60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#10 0x00007f181ead7757 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#11 0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559375e60520) at thread/qthread_unix.cpp:342
#12 0x00007f181a9126db in start_thread (arg=0x7f17ca0df700) at pthread_create.c:463
#13 0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f05e4 in g_main_context_release () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f1586 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f18184f1962 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f1817477276 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007f1818519175 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f181a9126db in start_thread (arg=0x7f17cb4e1700) at pthread_create.c:463
#7  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f1721 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f1818519175 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f181a9126db in start_thread (arg=0x7f17d6547700) at pthread_create.c:463
#5  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f0fe1 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f1570 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f17d8000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f17dfffec60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#6  0x00007f181ead7757 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#7  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559376b8f430) at thread/qthread_unix.cpp:342
#8  0x00007f181a9126db in start_thread (arg=0x7f17dffff700) at pthread_create.c:463
#9  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f181e3bc0c9 in __GI___libc_read (fd=15, buf=0x7f17e9acca50, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#2  0x00007f18185362b0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f18184f10b7 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f18184f1570 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f17e0000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f17e9accc60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#8  0x00007f181ead7757 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#9  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559376adfbb0) at thread/qthread_unix.cpp:342
#10 0x00007f181a9126db in start_thread (arg=0x7f17e9acd700) at pthread_create.c:463
#11 0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f15c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f17e4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f17f337bbf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f181ead7757 in QThread::exec (this=this@entry=0x55937690be80) at thread/qthread.cpp:536
#6  0x00007f18222b6b06 in QQuickPixmapReader::run (this=0x55937690be80) at util/qquickpixmapcache.cpp:987
#7  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x55937690be80) at thread/qthread_unix.cpp:342
#8  0x00007f181a9126db in start_thread (arg=0x7f17f337c700) at pthread_create.c:463
#9  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x5593753aa0b8, cond=0x5593753aa0e0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x5593753aa0e0, mutex=0x5593753aa0b8) at pthread_cond_wait.c:655
#3  0x00007f17f6156ecb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f17f6156ac7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f181a9126db in start_thread (arg=0x7f17f4bfa700) at pthread_create.c:463
#6  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f15c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f17f8000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f1804ffac40, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f181ead7757 in QThread::exec (this=this@entry=0x559375280620) at thread/qthread.cpp:536
#6  0x00007f1820009fc5 in QQmlThreadPrivate::run (this=0x559375280620) at qml/ftw/qqmlthread.cpp:155
#7  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x559375280620) at thread/qthread_unix.cpp:342
#8  0x00007f181a9126db in start_thread (arg=0x7f1804ffb700) at pthread_create.c:463
#9  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f18184f15c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18184f16dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f181ed277cb in QEventDispatcherGlib::processEvents (this=0x7f1800000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f181ecc6d2a in QEventLoop::exec (this=this@entry=0x7f180620bc30, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f181ead7757 in QThread::exec (this=this@entry=0x7f1820e4ada0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:536
#6  0x00007f1820bd2555 in QDBusConnectionManager::run (this=0x7f1820e4ada0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#7  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x7f1820e4ada0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:342
#8  0x00007f181a9126db in start_thread (arg=0x7f180620c700) at pthread_create.c:463
#9  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  0x00007f1817df6747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f1817df836a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f1810e86fd0 in QXcbEventQueue::run (this=0x55937521a370) at qxcbeventqueue.cpp:228
#4  0x00007f181ead8c2c in QThreadPrivate::start (arg=0x55937521a370) at thread/qthread_unix.cpp:342
#5  0x00007f181a9126db in start_thread (arg=0x7f180e4b8700) at pthread_create.c:463
#6  0x00007f181e3cd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x559376be1390, cond=0x559376be13b8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x559376be13b8, mutex=0x559376be1390) at pthread_cond_wait.c:655
#3  0x00007f181eadf1db in QWaitConditionPrivate::wait (deadline=..., this=0x559376be1390) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=this@entry=0x559376bc8cc0, mutex=mutex@entry=0x559376bc8c98, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007f181eadb8f7 in QThreadPoolPrivate::waitForDone (this=this@entry=0x559376bc8c40, timer=...) at thread/qthreadpool.cpp:311
#6  0x00007f181eadbd26 in QThreadPoolPrivate::waitForDone (this=0x559376bc8c40, msecs=msecs@entry=-1) at thread/qthreadpool.cpp:321
#7  0x00007f181eadbda9 in QThreadPool::waitForDone (this=this@entry=0x559376bdd450, msecs=msecs@entry=-1) at thread/qthreadpool.cpp:693
#8  0x00007f181eadbdcc in QThreadPool::~QThreadPool (this=0x559376bdd450, __in_chrg=<optimized out>) at thread/qthreadpool.cpp:473
#9  0x00007f17dede1493 in FlatpakBackend::~FlatpakBackend (this=0x559376bdd3f0, __in_chrg=<optimized out>) at ./libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:124
#10 0x00007f17dede1549 in FlatpakBackend::~FlatpakBackend (this=0x559376bdd3f0, __in_chrg=<optimized out>) at ./libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:133
#11 0x00007f18228d356e in qDeleteAll<QTypedArrayData<AbstractResourcesBackend*>::const_iterator> (end=..., begin=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:320
#12 qDeleteAll<QVector<AbstractResourcesBackend*> > (c=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:328
#13 ResourcesModel::~ResourcesModel (this=0x559375349f10, __in_chrg=<optimized out>) at ./libdiscover/resources/ResourcesModel.cpp:124
#14 0x00007f18228d3639 in ResourcesModel::~ResourcesModel (this=0x559375349f10, __in_chrg=<optimized out>) at ./libdiscover/resources/ResourcesModel.cpp:125
#15 0x00007f181ecfb5a5 in QObject::event (this=0x559375349f10, e=0x559376c06aa0) at kernel/qobject.cpp:1326
#16 0x00007f18204aa9ac in QApplicationPrivate::notify_helper (this=this@entry=0x559375216e20, receiver=receiver@entry=0x559375349f10, e=e@entry=0x559376c06aa0) at kernel/qapplication.cpp:3685
#17 0x00007f18204b1bb0 in QApplication::notify (this=0x7ffd092a9f30, receiver=0x559375349f10, e=0x559376c06aa0) at kernel/qapplication.cpp:3431
#18 0x00007f181ecc84a8 in QCoreApplication::notifyInternal2 (receiver=0x559375349f10, event=0x559376c06aa0) at kernel/qcoreapplication.cpp:1075
#19 0x00007f181ecc867e in QCoreApplication::sendEvent (receiver=receiver@entry=0x559375349f10, event=event@entry=0x559376c06aa0) at kernel/qcoreapplication.cpp:1470
#20 0x00007f181eccb121 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=52, data=0x559375212220) at kernel/qcoreapplication.cpp:1815
#21 0x00007f181eccb6b8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=52) at kernel/qcoreapplication.cpp:1674
#22 0x00007f181eccb701 in QCoreApplicationPrivate::execCleanup (this=<optimized out>) at kernel/qcoreapplication.cpp:1405
#23 0x00007f181ecd04b9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1387
#24 0x0000559373e8f592 in main (argc=<optimized out>, argv=<optimized out>) at ./discover/main.cpp:184

Possible duplicates by query: bug 419597, bug 419062, bug 418815, bug 417102, bug 416448.

Reported using DrKonqi
Comment 1 Nate Graham 2021-06-10 16:03:47 UTC
*** Bug 437145 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2021-06-10 16:03:57 UTC
*** Bug 438414 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-06-15 23:28:10 UTC
*** Bug 438501 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-05-27 14:30:06 UTC
*** Bug 454471 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2022-07-06 14:48:35 UTC
*** Bug 456397 has been marked as a duplicate of this bug. ***
Comment 6 Aleix Pol 2022-10-13 15:34:40 UTC
This crash should be fixed as of
https://invent.kde.org/plasma/discover/commit/c237403e3c9d1dcfbe79bd1528921f9b728c0582

I'm surprised though that nobody mentions how this occurs when shutting Discover down as it's triggered by ~FlatpakBackend.

I see there's some duplicates that refer to FwupdBackend which had a similar problem and we solved them there by using async APIs and keeping the logic on the main thread.