Bug 503880

Summary: Run KRunner runners out-of-process so they can't take down Plasmashell if and when they crash
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Application Menu (Kicker) widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: nate
Priority: NOR Keywords: drkonqi
Version First Reported In: 6.3.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/129825/events/57faed88781c43cb919d4f0d9e32c677/
Attachments: New crash information added by DrKonqi

Description Patrick Silva 2025-05-07 10:45:23 UTC
Application: plasmashell (6.3.4)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.0
Frameworks Version: 6.13.0
Operating System: Linux 6.14.5-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.3.4 [CoredumpBackend]

-- Information about the crash:
open Kickoff, start to type in the search field, Plasma crashes

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  std::char_traits<char>::assign (__c1=@0x7ffc7c4028f0: 0 '\000', __c2=<error reading variable: Cannot access memory at address 0x0>) at /usr/include/c++/15.1.1/bits/char_traits.h:352
#6  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy (__d=0x7ffc7c4028f0 "", __s=0x0, __n=1) at /usr/include/c++/15.1.1/bits/basic_string.h:451
#7  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<true> (this=0x7ffc7c4028e0, __str=0x0, __n=0) at /usr/include/c++/15.1.1/bits/basic_string.tcc:298
#8  0x0000727a2049b461 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7ffc7c4028e0, __str=<optimized out>, this=<optimized out>, __str=<optimized out>) at /usr/include/c++/15.1.1/bits/basic_string.h:617
#9  __static_initialization_and_destruction_0 () at ../internfile/internfile.cpp:1207


Reported using DrKonqi
Comment 1 Patrick Silva 2025-05-07 10:45:26 UTC
Created attachment 181026 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nate Graham 2025-05-07 15:08:20 UTC
Thread 1 (Thread 0x727b32109a40 (LWP 1201)):
[KCrash Handler]
#5  std::char_traits<char>::assign (__c1=@0x7ffc7c4028f0: 0 '\000', __c2=<error reading variable: Cannot access memory at address 0x0>) at /usr/include/c++/15.1.1/bits/char_traits.h:352
#6  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy (__d=0x7ffc7c4028f0 "", __s=0x0, __n=1) at /usr/include/c++/15.1.1/bits/basic_string.h:451
#7  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<true> (this=0x7ffc7c4028e0, __str=0x0, __n=0) at /usr/include/c++/15.1.1/bits/basic_string.tcc:298
#8  0x0000727a2049b461 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7ffc7c4028e0, __str=<optimized out>, this=<optimized out>, __str=<optimized out>) at /usr/include/c++/15.1.1/bits/basic_string.h:617
#9  __static_initialization_and_destruction_0 () at ../internfile/internfile.cpp:1207
#10 0x0000727a2049e0c3 in _sub_I_65535_0.0 () at /usr/lib/librecoll.so.39
#11 0x0000727b3ade92f7 in call_init (l=<optimized out>, argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-init.c:74
#12 call_init (l=<optimized out>, argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-init.c:26
#13 0x0000727b3ade93cd in _dl_init (main_map=0x5da7c1f84d80, argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-init.c:121
#14 0x0000727b3ade64b5 in __GI__dl_catch_exception (exception=exception@entry=0x0, operate=operate@entry=0x727b3adf0160 <call_dl_init>, args=args@entry=0x7ffc7c402f50) at dl-catch.c:215
#15 0x0000727b3adf00c9 in dl_open_worker (a=a@entry=0x7ffc7c402f50) at dl-open.c:799
#16 0x0000727b3ade6416 in __GI__dl_catch_exception (exception=exception@entry=0x7ffc7c402f30, operate=operate@entry=0x727b3adf0000 <dl_open_worker>, args=args@entry=0x7ffc7c402f50) at dl-catch.c:241
#17 0x0000727b3adf04de in _dl_open (file=0x5da7c4c9b090 "/usr/lib/qt6/plugins/kf6/krunner/krunner_recoll.so", mode=-2147479551, caller_dlopen=0x727b381d297f <QLibraryPrivate::load()+2063>, nsid=-2, argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-open.c:874
#18 0x0000727b378a1b34 in dlopen_doit (a=a@entry=0x7ffc7c403200) at dlopen.c:56
#19 0x0000727b3ade6416 in __GI__dl_catch_exception (exception=exception@entry=0x7ffc7c403140, operate=0x727b378a1ad0 <dlopen_doit>, args=0x7ffc7c403200) at dl-catch.c:241
#20 0x0000727b3ade6569 in _dl_catch_error (objname=0x7ffc7c4031a8, errstring=0x7ffc7c4031b0, mallocedp=0x7ffc7c4031a7, operate=<optimized out>, args=<optimized out>) at dl-catch.c:260
#21 0x0000727b378a1623 in _dlerror_run (operate=operate@entry=0x727b378a1ad0 <dlopen_doit>, args=args@entry=0x7ffc7c403200) at dlerror.c:138
#22 0x0000727b378a1beb in dlopen_implementation (file=<optimized out>, mode=<optimized out>, dl_caller=<optimized out>) at dlopen.c:71
#23 ___dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:81
#24 0x0000727b381d297f in QLibraryPrivate::load_sys (this=0x5da7c501bcb0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qlibrary_unix.cpp:199
#25 QLibraryPrivate::load (this=this@entry=0x5da7c501bcb0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qlibrary.cpp:537
#26 0x0000727b381d3c8f in QLibraryPrivate::loadPlugin (this=0x5da7c501bcb0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qlibrary.cpp:589
#27 0x0000727b37fccf6d in QPluginLoader::load (this=0x7ffc7c4035e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qpluginloader.cpp:182
#28 QPluginLoader::load (this=0x7ffc7c4035e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qpluginloader.cpp:173
#29 QPluginLoader::instance (this=0x7ffc7c4035e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/plugin/qpluginloader.cpp:141
#30 0x0000727b39f91792 in KPluginFactory::loadFactory (data=...) at /usr/src/debug/kcoreaddons/kcoreaddons-6.13.0/src/lib/plugin/kpluginfactory.cpp:40
#31 0x0000727a89e3b0a2 in KPluginFactory::instantiatePlugin<KRunner::AbstractRunner> (data=..., parent=0x5da7c2e61870, args=...) at /usr/include/KF6/KCoreAddons/kpluginfactory.h:376
#32 KRunner::RunnerManagerPrivate::loadInstalledRunner (this=this@entry=0x5da7c4b90d40, pluginMetaData=...) at /usr/src/debug/krunner/krunner-6.13.0/src/runnermanager.cpp:187
#33 0x0000727a89e3c6bc in KRunner::RunnerManagerPrivate::loadRunners (this=0x5da7c4b90d40, singleRunnerId=...) at /usr/src/debug/krunner/krunner-6.13.0/src/runnermanager.cpp:157
#34 0x0000727a89e3d626 in KRunner::RunnerManager::runners (this=0x5da7c2e61870) at /usr/src/debug/krunner/krunner-6.13.0/src/runnermanager.cpp:456
#35 0x0000727a89e528f7 in operator() (__closure=<optimized out>) at /usr/src/debug/krunner/krunner-6.13.0/src/model/resultsmodel.cpp:290
#36 operator() (__closure=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:116
#37 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, KRunner::ResultsModel::ResultsModel(const KConfigGroup&, const KConfigGroup&, QObject*)::<lambda()> >::call(KRunner::ResultsModel::ResultsModel(const KConfigGroup&, const KConfigGroup&, QObject*)::<lambda()>&, void**)::<lambda()> > (args=<optimized out>, fn=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:65
#38 QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, KRunner::ResultsModel::ResultsModel(const KConfigGroup&, const KConfigGroup&, QObject*)::<lambda()> >::call (f=<optimized out>, arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:115
#39 QtPrivate::FunctorCallable<KRunner::ResultsModel::ResultsModel(const KConfigGroup&, const KConfigGroup&, QObject*)::<lambda()> >::call<QtPrivate::List<>, void> (f=<optimized out>, arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:337
#40 QtPrivate::QCallableObject<KRunner::ResultsModel::ResultsModel(const KConfigGroup&, const KConfigGroup&, QObject*)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:547
#41 0x0000727b37fa54aa in QObject::event (this=0x5da7c4bca570, e=0x5da7c5164660) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1431
#42 0x0000727b3a0fed9e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5da7c4bca570, e=0x5da7c5164660) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3301
#43 0x0000727b37f5a018 in QCoreApplication::notifyInternal2 (receiver=0x5da7c4bca570, event=event@entry=0x5da7c5164660) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#44 0x0000727b37f5a3f2 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x5da7c5164660) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546
#45 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5da7bd4cf4a0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1879
#46 0x0000727b381cfea8 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1733
#47 postEventSourceDispatch (s=s@entry=0x5da7bd4d77e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#48 0x0000727b36a671e4 in g_main_dispatch (context=0x727b2c000f00) at ../glib/glib/gmain.c:3398
#49 0x0000727b36acae97 in g_main_context_dispatch_unlocked (context=0x727b2c000f00) at ../glib/glib/gmain.c:4249
#50 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x727b2c000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4314
#51 0x0000727b36a66615 in g_main_context_iteration (context=0x727b2c000f00, may_block=1) at ../glib/glib/gmain.c:4379
#52 0x0000727b381cd59d in QEventDispatcherGlib::processEvents (this=0x5da7bd4d7f60, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#53 0x0000727b37f65376 in QEventLoop::processEvents (this=0x7ffc7c403fa0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104
#54 QEventLoop::exec (this=0x7ffc7c403fa0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186
#55 0x0000727b37f5d159 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:77
#56 0x0000727b3a0fb14a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2568
#57 0x00005da7af3871cb in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace/plasma-workspace-6.3.4/shell/main.cpp:191

Reported using DrKonqi
Comment 3 Nate Graham 2025-05-07 15:09:06 UTC
#17 0x0000727b3adf04de in _dl_open (file=0x5da7c4c9b090 "/usr/lib/qt6/plugins/kf6/krunner/krunner_recoll.so", mode=-2147479551, caller_dlopen=0x727b381d297f <QLibraryPrivate::load()+2063>, nsid=-2, argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-open.c:874

Is krunner_recoll an external/3rd-party KRunner plugin?
Comment 4 Patrick Silva 2025-05-07 15:11:58 UTC
(In reply to Nate Graham from comment #3)
> #17 0x0000727b3adf04de in _dl_open (file=0x5da7c4c9b090
> "/usr/lib/qt6/plugins/kf6/krunner/krunner_recoll.so", mode=-2147479551,
> caller_dlopen=0x727b381d297f <QLibraryPrivate::load()+2063>, nsid=-2,
> argc=2, argv=0x7ffc7c4043c8, env=0x5da7bd4d48b0) at dl-open.c:874
> 
> Is krunner_recoll an external/3rd-party KRunner plugin?

Yes. Plasma stopped crashing after disabling it in Plasma Search KCM.
Comment 5 Nate Graham 2025-05-07 17:05:56 UTC
So there are two things going on here, then.

First of all, the plugin shouldn't crash! Please report this to the author of the plugin.

But a crashing plugin shouldn't be able to take down all of Plasma. We should consider running KRUnner runners out of the main plasmashell process. I'll change the bug report to be about that.
Comment 6 Patrick Silva 2025-05-07 18:05:14 UTC
I have updated to recoll 1.43.2-1 a few minutes ago; now  the crash is no longer reproducible.