Application: plasma-discover (5.27.3) Qt Version: 5.15.8 Frameworks Version: 5.104.0 Operating System: Linux 5.19.0-35-generic x86_64 Windowing System: X11 Distribution: KDE neon 5.27 DrKonqi: 5.27.3 [KCrashBackend] -- Information about the crash: I open it on the home section and it crashes. Seems that for some reason, to get past it, I have to click the tray icon to show updates and then click home. Really weird. The crash can be reproduced every time. -- Backtrace: Application: Discover (plasma-discover), signal: Segmentation fault [KCrash Handler] #4 0x00007f22defc511c in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/packagekit-backend.so #5 0x00007f22defc5180 in PackageKitBackend::resolvePackages(QStringList const&) () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/packagekit-backend.so #6 0x00007f22defc7d4f in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/packagekit-backend.so #7 0x00007f22defcc11d in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/packagekit-backend.so #8 0x00007f2337ce9ade in QObject::event(QEvent*) (this=0x557f99058a30, e=0x7f22ac01b000) at kernel/qobject.cpp:1347 #9 0x00007f233976c793 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x557f99058a30, e=0x7f22ac01b000) at kernel/qapplication.cpp:3640 #10 0x00007f2337cbc07a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x557f99058a30, event=0x7f22ac01b000) at kernel/qcoreapplication.cpp:1064 #11 0x00007f2337cbf167 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x557f98f43c00) at kernel/qcoreapplication.cpp:1821 #12 0x00007f2337d16487 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x557f99021ff0) at kernel/qeventdispatcher_glib.cpp:277 #13 0x00007f23365c7d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #14 0x00007f233661c6c8 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #15 0x00007f23365c53e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #16 0x00007f2337d15ad8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557f99026ee0, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #17 0x00007f2337cba99b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd73f2d7d0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #18 0x00007f2337cc2f34 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #19 0x0000557f979b5c63 in () #20 0x00007f2337229d90 in __libc_start_call_main (main=main@entry=0x557f979b5340, argc=argc@entry=1, argv=argv@entry=0x7ffd73f2dab8) at ../sysdeps/nptl/libc_start_call_main.h:58 #21 0x00007f2337229e40 in __libc_start_main_impl (main=0x557f979b5340, argc=1, argv=0x7ffd73f2dab8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd73f2daa8) at ../csu/libc-start.c:392 #22 0x0000557f979b66a5 in () [Inferior 1 (process 5601) detached] The reporter indicates this bug may be a duplicate of or related to bug 467188. Reported using DrKonqi
Found a temporary fix to this. Seems like when Discover starts with the default 'browse' mode, it crashes. So, out of this list I pulled: Available modes: * Browsing * Installed * Search * Update * Sources * About All those options work except browsing. Browsing mode will just crash Discover. I just edited shortcut in the menu to this: plasma-discover --mode search And now Discover works.
*** Bug 469422 has been marked as a duplicate of this bug. ***
*** Bug 466702 has been marked as a duplicate of this bug. ***
*** Bug 472898 has been marked as a duplicate of this bug. ***
*** Bug 473584 has been marked as a duplicate of this bug. ***
*** Bug 474046 has been marked as a duplicate of this bug. ***
*** Bug 467068 has been marked as a duplicate of this bug. ***
*** Bug 474764 has been marked as a duplicate of this bug. ***
Git commit 2e52e7c9aa44ca1b3f5009fd7e6daf66fc8d31a6 by Harald Sitter. Committed on 06/10/2023 at 13:14. Pushed by sitter into branch 'master'. packagekit: hold stream in a qpointer there is a very awkward race condition involving streams during initialization. if any of the (KNS) backends fail to initialize and become invalid they will eventually trigger `ResourcesModel::callerFetchingChanged` which will discard the now invalid backends and emit `backendsChanged` which will trigger `ResourcesProxyModel::invalidateFilter` which then may end up deleting the current stream ``` if (m_currentStream) { qCWarning(LIBDISCOVER_LOG) << "last stream isn't over yet" << m_filters << this; delete m_currentStream; ``` this is in so far problematic as we "schedule" lambda executions in the packagekit backend (most prominently in `PackageKitBackend::search`) with lambdas that hold the stream. these lambdas will eventually run on since-deleted stream objects and best case fall into a nullptr but more regularly just fall into a ditch of random memory until undefined behavior bites us Related: bug 465711, bug 473921 M +31 -8 libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp https://invent.kde.org/plasma/discover/-/commit/2e52e7c9aa44ca1b3f5009fd7e6daf66fc8d31a6
Git commit 107716c0b3a9e2dc4ac569ca002ee71dc59baa0d by Harald Sitter. Committed on 06/10/2023 at 13:16. Pushed by sitter into branch 'Plasma/5.27'. packagekit: hold stream in a qpointer there is a very awkward race condition involving streams during initialization. if any of the (KNS) backends fail to initialize and become invalid they will eventually trigger `ResourcesModel::callerFetchingChanged` which will discard the now invalid backends and emit `backendsChanged` which will trigger `ResourcesProxyModel::invalidateFilter` which then may end up deleting the current stream ``` if (m_currentStream) { qCWarning(LIBDISCOVER_LOG) << "last stream isn't over yet" << m_filters << this; delete m_currentStream; ``` this is in so far problematic as we "schedule" lambda executions in the packagekit backend (most prominently in `PackageKitBackend::search`) with lambdas that hold the stream. these lambdas will eventually run on since-deleted stream objects and best case fall into a nullptr but more regularly just fall into a ditch of random memory until undefined behavior bites us Related: bug 465711, bug 473921 (cherry picked from commit 2e52e7c9aa44ca1b3f5009fd7e6daf66fc8d31a6) M +31 -8 libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp https://invent.kde.org/plasma/discover/-/commit/107716c0b3a9e2dc4ac569ca002ee71dc59baa0d
*** Bug 475429 has been marked as a duplicate of this bug. ***
*** Bug 475526 has been marked as a duplicate of this bug. ***
*** Bug 476835 has been marked as a duplicate of this bug. ***
*** Bug 482259 has been marked as a duplicate of this bug. ***
*** Bug 494186 has been marked as a duplicate of this bug. ***
*** Bug 495478 has been marked as a duplicate of this bug. ***
*** Bug 495007 has been marked as a duplicate of this bug. ***