Bug 492349

Summary: Plasma crashed in the background in PowerDevil::Core::unloadAllActiveActions() when user was switched
Product: [Plasma] Powerdevil Reporter: Jonathan <jonathanrobertbell>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: jpetso, jtamate, kde, liangrui.ch, natalie_clarius, nate, stakanov.s
Priority: HI Keywords: drkonqi
Version: 6.1.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.5
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/43977/events/ed729be74d5c44e8b6a542698f5579c6/

Description Jonathan 2024-08-29 05:51:40 UTC
Application: org_kde_powerdevil (6.1.4)

Qt Version: 6.7.2
Frameworks Version: 6.5.0
Operating System: Linux 6.10.6-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.1.4 [CoredumpBackend]

-- Information about the crash:
Previously using Firefox with Youtube, and google search results tab. Closed Firefox and switched users to complete work with Firefox, Edge, Virtman. Return to this user in Plasma and found error in system tray.

The crash can be reproduced sometimes.

-- Backtrace:
Application: KDE Power Management System (org_kde_powerdevil), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
Downloading separate debug info for /usr/lib/org_kde_powerdevil...
[New LWP 1946]
[New LWP 1967]
[New LWP 2018]
[New LWP 2020]
[New LWP 2067]
[New LWP 2019]
[New LWP 1968]
[New LWP 1964]
Downloading separate debug info for /usr/lib/libpthread.so.0...
Downloading separate debug info for /usr/lib/libKF6Crash.so.6...
Downloading separate debug info for /usr/lib/libpowerdevilcore.so.2...
Downloading separate debug info for /usr/lib/libKF6DBusAddons.so.6...
Downloading separate debug info for /usr/lib/libKF6XmlGui.so.6...
Downloading separate debug info for /usr/lib/libKF6GlobalAccel.so.6...
Downloading separate debug info for /usr/lib/libKF6CoreAddons.so.6...
Downloading separate debug info for /usr/lib/libKF6I18n.so.6...
Downloading separate debug info for /usr/lib/libQt6DBus.so.6...
Downloading separate debug info for /usr/lib/libQt6Gui.so.6...
Downloading separate debug info for /usr/lib/libQt6Core.so.6...
Downloading separate debug info for /usr/lib/libc.so.6...
Downloading separate debug info for /usr/lib/libX11.so.6...
Downloading separate debug info for /usr/lib/libPlasmaActivities.so.6...
Downloading separate debug info for /usr/lib/libkworkspace6.so.6...
Downloading separate debug info for /usr/lib/libKF6AuthCore.so.6...
Downloading separate debug info for /usr/lib/libKF6Solid.so.6...
Downloading separate debug info for /usr/lib/libKF6IdleTime.so.6...
Downloading separate debug info for /usr/lib/libKF6Screen.so.8...
Downloading separate debug info for /usr/lib/libKF6Notifications.so.6...
Downloading separate debug info for /usr/lib/libKirigamiPlatform.so.6...
Downloading separate debug info for /usr/lib/libudev.so.1...
Downloading separate debug info for /usr/lib/libxcb.so.1...
Downloading separate debug info for /usr/lib/libddcutil.so.5...
Downloading separate debug info for /usr/lib/libKF6ConfigGui.so.6...
Downloading separate debug info for /usr/lib/libKF6ConfigCore.so.6...
Downloading separate debug info for /usr/lib/libm.so.6...
Downloading separate debug info for /usr/lib/libQt6Xml.so.6...
Downloading separate debug info for /usr/lib/libQt6Network.so.6...
Downloading separate debug info for /usr/lib/libQt6PrintSupport.so.6...
Downloading separate debug info for /usr/lib/libKF6ItemViews.so.6...
Downloading separate debug info for /usr/lib/libKF6IconWidgets.so.6...
Downloading separate debug info for /usr/lib/libKF6ConfigWidgets.so.6...
Downloading separate debug info for /usr/lib/libKF6WidgetsAddons.so.6...
Downloading separate debug info for /usr/lib/libQt6Widgets.so.6...
Downloading separate debug info for /usr/lib/libKF6IconThemes.so.6...
Downloading separate debug info for /usr/lib/libKF6ColorScheme.so.6...
Downloading separate debug info for /usr/lib/libKF6GuiAddons.so.6...
Downloading separate debug info for /usr/lib/libdbus-1.so.3...
Downloading separate debug info for /usr/lib/libEGL.so.1...
Downloading separate debug info for /usr/lib/libfontconfig.so.1...
Downloading separate debug info for /usr/lib/libglib-2.0.so.0...
Downloading separate debug info for /usr/lib/libxkbcommon.so.0...
Downloading separate debug info for /usr/lib/libGLX.so.0...
Downloading separate debug info for /usr/lib/libOpenGL.so.0...
Downloading separate debug info for /usr/lib/libpng16.so.16...
Downloading separate debug info for /usr/lib/libharfbuzz.so.0...
Downloading separate debug info for /usr/lib/libmd4c.so.0...
Downloading separate debug info for /usr/lib/libfreetype.so.6...
Downloading separate debug info for /usr/lib/libz.so.1...
Downloading separate debug info for /usr/lib/libicui18n.so.75...
Downloading separate debug info for /usr/lib/libicuuc.so.75...
Downloading separate debug info for /usr/lib/libsystemd.so.0...
Downloading separate debug info for /usr/lib/libdouble-conversion.so.3...
Downloading separate debug info for /usr/lib/libb2.so.1...
Downloading separate debug info for /usr/lib/libpcre2-16.so.0...
Downloading separate debug info for /usr/lib/libzstd.so.1...
Downloading separate debug info for /lib64/ld-linux-x86-64.so.2...
Downloading separate debug info for /usr/lib/libKF6Service.so.6...
Downloading separate debug info for /usr/lib/libPlasma.so.6...
Downloading separate debug info for /usr/lib/libXau.so.6...
Downloading separate debug info for /usr/lib/libxcb-randr.so.0...
Downloading separate debug info for /usr/lib/libKF6WindowSystem.so.6...
Downloading separate debug info for /usr/lib/libKF6Package.so.6...
Downloading separate debug info for /usr/lib/libQt6WaylandClient.so.6...
Downloading separate debug info for /usr/lib/libwayland-client.so.0...
Downloading separate debug info for /usr/lib/libmount.so.1...
Downloading separate debug info for /usr/lib/libimobiledevice-1.0.so.6...
Downloading separate debug info for /usr/lib/libplist-2.0.so.4...
Downloading separate debug info for /usr/lib/libcanberra.so.0...
Downloading separate debug info for /usr/lib/libQt6QuickControls2.so.6...
Downloading separate debug info for /usr/lib/libQt6Quick.so.6...
Downloading separate debug info for /usr/lib/libQt6Qml.so.6...
Downloading separate debug info for /usr/lib/libcap.so.2...
Downloading separate debug info for /usr/lib/libXdmcp.so.6...
Downloading separate debug info for /usr/lib/libjansson.so.4...
Downloading separate debug info for /usr/lib/libusb-1.0.so.0...
Downloading separate debug info for /usr/lib/libdrm.so.2...
Downloading separate debug info for /usr/lib/libgssapi_krb5.so.2...
Downloading separate debug info for /usr/lib/libbrotlidec.so.1...
Downloading separate debug info for /usr/lib/libproxy.so.1...
Downloading separate debug info for /usr/lib/libcrypto.so.3...
Downloading separate debug info for /usr/lib/libKF6Codecs.so.6...
Downloading separate debug info for /usr/lib/libKF6Archive.so.6...
Downloading separate debug info for /usr/lib/libKF6BreezeIcons.so.6...
Downloading separate debug info for /usr/lib/libGLdispatch.so.0...
Downloading separate debug info for /usr/lib/libexpat.so.1...
Downloading separate debug info for /usr/lib/libpcre2-8.so.0...
Downloading separate debug info for /usr/lib/libgraphite2.so.3...
Downloading separate debug info for /usr/lib/libbz2.so.1.0...
Downloading separate debug info for /usr/lib/libicudata.so.75...
Downloading separate debug info for /usr/lib/libKF6ConfigQml.so.6...
Downloading separate debug info for /usr/lib/libKF6Svg.so.6...
Downloading separate debug info for /usr/lib/libxcb-res.so.0...
Downloading separate debug info for /usr/lib/libXfixes.so.3...
Downloading separate debug info for /usr/lib/libxcb-keysyms.so.1...
Downloading separate debug info for /usr/lib/libwayland-cursor.so.0...
Downloading separate debug info for /usr/lib/libffi.so.8...
Downloading separate debug info for /usr/lib/libblkid.so.1...
Downloading separate debug info for /usr/lib/libimobiledevice-glue-1.0.so.0...
Downloading separate debug info for /usr/lib/libusbmuxd-2.0.so.7...
Downloading separate debug info for /usr/lib/libssl.so.3...
Downloading separate debug info for /usr/lib/libvorbisfile.so.3...
Downloading separate debug info for /usr/lib/libtdb.so.1...
Downloading separate debug info for /usr/lib/libltdl.so.7...
Downloading separate debug info for /usr/lib/libQt6QuickTemplates2.so.6...
Downloading separate debug info for /usr/lib/libQt6QmlModels.so.6...
Downloading separate debug info for /usr/lib/libQt6OpenGL.so.6...
Downloading separate debug info for /usr/lib/libkrb5.so.3...
Downloading separate debug info for /usr/lib/libk5crypto.so.3...
Downloading separate debug info for /usr/lib/libcom_err.so.2...
Downloading separate debug info for /usr/lib/libkrb5support.so.0...
Downloading separate debug info for /usr/lib/libkeyutils.so.1...
Downloading separate debug info for /usr/lib/libresolv.so.2...
Downloading separate debug info for /usr/lib/libbrotlicommon.so.1...
Downloading separate debug info for /usr/lib/libproxy/libpxbackend-1.0.so...
Downloading separate debug info for /usr/lib/libgobject-2.0.so.0...
Downloading separate debug info for /usr/lib/liblzma.so.5...
Downloading separate debug info for /usr/lib/libQt6Svg.so.6...
Downloading separate debug info for /usr/lib/libvorbis.so.0...
Downloading separate debug info for /usr/lib/libogg.so.0...
Downloading separate debug info for /usr/lib/libcurl.so.4...
Downloading separate debug info for /usr/lib/libgio-2.0.so.0...
Downloading separate debug info for /usr/lib/libduktape.so.207...
Downloading separate debug info for /usr/lib/libnghttp3.so.9...
Downloading separate debug info for /usr/lib/libnghttp2.so.14...
Downloading separate debug info for /usr/lib/libidn2.so.0...
Downloading separate debug info for /usr/lib/libssh2.so.1...
Downloading separate debug info for /usr/lib/libpsl.so.5...
Downloading separate debug info for /usr/lib/libgmodule-2.0.so.0...
Downloading separate debug info for /usr/lib/libunistring.so.5...
Downloading separate debug info for /usr/lib/libGLX_nvidia.so.0...
Downloading separate debug info for /usr/lib/libnvidia-glsi.so.560.35.03...
Downloading separate debug info for /usr/lib/libnvidia-tls.so.560.35.03...
Downloading separate debug info for /usr/lib/libnvidia-glcore.so.560.35.03...
Downloading separate debug info for /usr/lib/libXext.so.6...
Downloading separate debug info for /usr/lib/libdl.so.2...
Downloading separate debug info for /usr/lib/librt.so.1...
Downloading separate debug info for /usr/lib/libnvidia-gpucomp.so.560.35.03...
Downloading separate debug info for /usr/lib/qt6/plugins/platforms/libqwayland-generic.so...
Downloading separate debug info for /usr/lib/qt6/plugins/wayland-shell-integration/libxdg-shell.so...
Downloading separate debug info for /usr/lib/qt6/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so...
Downloading separate debug info for /usr/lib/qt6/plugins/wayland-graphics-integration-client/../../../libQt6WaylandEglClientHwIntegration.so.6...
Downloading separate debug info for /usr/lib/qt6/plugins/wayland-graphics-integration-client/../../../libwayland-egl.so.1...
Downloading separate debug info for /usr/lib/libEGL_nvidia.so.0...
Downloading separate debug info for /usr/lib/libnvidia-egl-wayland.so.1...
Downloading separate debug info for /usr/lib/libwayland-server.so.0...
Downloading separate debug info for /usr/lib/libnvidia-eglcore.so.560.35.03...
Downloading separate debug info for /usr/lib/libnvidia-egl-gbm.so.1...
Downloading separate debug info for /usr/lib/libgbm.so.1...
Downloading separate debug info for /usr/lib/libnvidia-egl-xcb.so.1...
Downloading separate debug info for /usr/lib/libX11-xcb.so.1...
Downloading separate debug info for /usr/lib/libxcb-dri3.so.0...
Downloading separate debug info for /usr/lib/libxcb-present.so.0...
Downloading separate debug info for /usr/lib/libnvidia-egl-xlib.so.1...
Downloading separate debug info for /usr/lib/libEGL_mesa.so.0...
Downloading separate debug info for /usr/lib/libglapi.so.0...
Downloading separate debug info for /usr/lib/libxcb-dri2.so.0...
Downloading separate debug info for /usr/lib/libxcb-xfixes.so.0...
Downloading separate debug info for /usr/lib/libxcb-sync.so.1...
Downloading separate debug info for /usr/lib/libxshmfence.so.1...
Downloading separate debug info for /usr/lib/libnvidia-allocator.so.1...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/kauth/backend/kauth_backend_plugin.so...
Downloading separate debug info for /usr/lib/libpolkit-qt6-core-1.so.1...
Downloading separate debug info for /usr/lib/libpolkit-gobject-1.so.0...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/kauth/helper/kauth_helper_plugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/kscreen/KSC_KWayland.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_brightnesscontrolaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_dimdisplayaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_dpmsaction.so...
Downloading separate debug info for /usr/lib/libKF6ScreenDpms.so.8...
Downloading separate debug info for /usr/lib/libxcb-dpms.so.0...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_handlebuttoneventsaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_keyboardbrightnesscontrolaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_powerprofileaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_runscriptaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/powerdevil/action/powerdevil_suspendsessionaction.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/org.kde.kidletime.platforms/KF6IdleTimeWaylandPlugin.so...
Downloading separate debug info for system-supplied DSO at 0x7b6f71c38000...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/lib/org_kde_powerdevil'.
Program terminated with signal SIGSEGV, Segmentation fault.
Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_kill.c...
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7b6f68dd39c0 (LWP 1946))]

Cannot QML trace cores :(
Downloading source file /usr/src/debug/glibc/glibc/misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S...
Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_create.c...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/dbus/qdbusconnectionmanager.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp...
Downloading source file /usr/src/debug/glib2/build/../glib/glib/gmain.c...
Downloading source file /usr/src/debug/glibc/glibc/io/../sysdeps/unix/sysv/linux/poll.c...
Downloading source file /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp...
Downloading source file /usr/src/debug/glib2/build/../glib/glib/gthread.c...
Downloading source file /usr/src/debug/ddcutil/ddcutil-2.1.4/src/ddc/ddc_watch_displays.c...
Downloading source file /usr/src/debug/glibc/glibc/misc/../sysdeps/posix/usleep.c...
Downloading source file /usr/src/debug/glibc/glibc/posix/../sysdeps/unix/sysv/linux/nanosleep.c...
Downloading source file /usr/src/debug/glibc/glibc/time/../sysdeps/unix/sysv/linux/clock_nanosleep.c...
Downloading source file /usr/src/debug/glib2/build/../glib/gio/gdbusprivate.c...
Downloading source file /usr/src/debug/glib2/build/../glib/glib/gthreadpool.c...
Downloading source file /usr/src/debug/glib2/build/../glib/glib/gasyncqueue.c...
Downloading source file /usr/src/debug/glib2/build/../glib/glib/gthread-posix.c...
Downloading source file /usr/src/debug/glibc/glibc/misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp...
Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_cond_wait.c...
Downloading source file /usr/src/debug/glibc/glibc/nptl/futex-internal.c...
Downloading source file /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilapp.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/dbus/qdbusintegrator.cpp...
Downloading source file /usr/src/debug/powerdevil/build/daemon/powerdevilcore_autogen/include/moc_powerdevilpolicyagent.cpp...
Downloading source file /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilpolicyagent.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h...
Downloading source file /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilcore.cpp...
[Current thread is 1 (Thread 0x7b6f68dd39c0 (LWP 1946))]

Thread 8 (Thread 0x7b6f63a006c0 (LWP 1964)):
#0  0x00007b6f70d1a63d in __GI___poll (fds=0x575349e2e280, nfds=4, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007b6f6ef70e0d in g_main_context_poll_unlocked (priority=2147483647, context=0x7b6f5c000c80, timeout=<optimized out>, fds=0x575349e2e280, n_fds=4) at ../glib/glib/gmain.c:4521
#2  g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7b6f5c000c80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4212
#3  0x00007b6f6ef0d795 in g_main_context_iteration (context=0x7b6f5c000c80, may_block=1) at ../glib/glib/gmain.c:4282
#4  0x00007b6f709a82bd in QEventDispatcherGlib::processEvents (this=0x7b6f5c000b70, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#5  0x00007b6f7074ff66 in QEventLoop::processEvents (this=0x7b6f639ffb20, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#6  QEventLoop::exec (this=0x7b6f639ffb20, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:182
#7  0x00007b6f7083d650 in QThread::exec (this=this@entry=0x7b6f718d2b20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#8  0x00007b6f71849f0e in QDBusConnectionManager::run (this=0x7b6f718d2b20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qt6-base/qtbase/src/dbus/qdbusconnectionmanager.cpp:144
#9  0x00007b6f708cd237 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:326
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#11 QThreadPrivate::start (arg=0x7b6f718d2b20 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS__q_manager> >::instance()::holder>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:285
#12 0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#13 0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 7 (Thread 0x7b6f626006c0 (LWP 1968)):
#0  0x00007b6f70d1a63d in __GI___poll (fds=fds@entry=0x7b6f625ffb60, nfds=nfds@entry=2, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007b6f6e25b257 in poll (__fds=0x7b6f625ffb60, __nfds=2, __timeout=-1) at /usr/include/bits/poll2.h:39
#2  QtWaylandClient::EventThread::run (this=0x5753498a60a0) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:182
#3  0x00007b6f708cd237 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:326
#4  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#5  QThreadPrivate::start (arg=0x5753498a60a0) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:285
#6  0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7  0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 6 (Thread 0x7b6f58e006c0 (LWP 2019)):
#0  0x00007b6f70d1a63d in __GI___poll (fds=0x575349e2f020, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007b6f6ef70e0d in g_main_context_poll_unlocked (priority=2147483647, context=0x575349e2eda0, timeout=<optimized out>, fds=0x575349e2f020, n_fds=1) at ../glib/glib/gmain.c:4521
#2  g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x575349e2eda0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4212
#3  0x00007b6f6ef0d795 in g_main_context_iteration (context=0x575349e2eda0, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4282
#4  0x00007b6f6ef0d7f2 in glib_worker_main (data=<optimized out>) at ../glib/glib/gmain.c:6442
#5  0x00007b6f6ef3e1b6 in g_thread_proxy (data=0x575349e2efc0) at ../glib/glib/gthread.c:835
#6  0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7  0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 5 (Thread 0x7b6f4f4006c0 (LWP 2067)):
#0  0x00007b6f70cf0733 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7b6f4f3ffb00, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#1  0x00007b6f70cfc827 in __GI___nanosleep (req=req@entry=0x7b6f4f3ffb00, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x00007b6f70d27f9a in usleep (useconds=useconds@entry=200000) at ../sysdeps/posix/usleep.c:31
#3  0x00007b6f7003c992 in ddc_watch_displays_using_udev (data=<optimized out>) at ddc/ddc_watch_displays.c:975
#4  ddc_watch_displays_using_udev (data=<optimized out>) at ddc/ddc_watch_displays.c:923
#5  0x00007b6f6ef3e1b6 in g_thread_proxy (data=0x575349fbfd10) at ../glib/glib/gthread.c:835
#6  0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7  0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 4 (Thread 0x7b6f4fe006c0 (LWP 2020)):
#0  0x00007b6f70d1a63d in __GI___poll (fds=0x7b6f3c000b90, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007b6f6ef70e0d in g_main_context_poll_unlocked (priority=2147483647, context=0x575349fb5270, timeout=<optimized out>, fds=0x7b6f3c000b90, n_fds=2) at ../glib/glib/gmain.c:4521
#2  g_main_context_iterate_unlocked.isra.0 (context=0x575349fb5270, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4212
#3  0x00007b6f6ef0efa7 in g_main_loop_run (loop=0x575349fb50c0) at ../glib/glib/gmain.c:4419
#4  0x00007b6f691c5d04 in gdbus_shared_thread_func (user_data=0x575349fb5240) at ../glib/gio/gdbusprivate.c:284
#5  0x00007b6f6ef3e1b6 in g_thread_proxy (data=0x575349e3dab0) at ../glib/glib/gthread.c:835
#6  0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7  0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 3 (Thread 0x7b6f598006c0 (LWP 2018)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007b6f6ef69eb0 in g_cond_wait (cond=0x575349ff7a18, mutex=0x575349ff7a10) at ../glib/glib/gthread-posix.c:1552
#2  0x00007b6f6eed695c in g_async_queue_pop_intern_unlocked (queue=0x575349ff7a10, wait=1, end_time=-1) at ../glib/glib/gasyncqueue.c:375
#3  0x00007b6f6ef437f7 in g_thread_pool_spawn_thread (data=<optimized out>) at ../glib/glib/gthreadpool.c:297
#4  0x00007b6f6ef3e1b6 in g_thread_proxy (data=0x575349e2ea30) at ../glib/glib/gthread.c:835
#5  0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#6  0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 2 (Thread 0x7b6f630006c0 (LWP 1967)):
#0  0x00007b6f70c9fa19 in __futex_abstimed_wait_common64 (private=0, futex_word=0x5753498b36a4, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5753498b36a4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007b6f70c9fa9f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5753498b36a4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007b6f70ca2479 in __pthread_cond_wait_common (cond=0x5753498b3678, mutex=<optimized out>, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x5753498b3678, mutex=<optimized out>) at pthread_cond_wait.c:618
#5  0x00007b6f708d1c60 in QWaitConditionPrivate::wait (this=0x5753498b3650, deadline=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:102
#6  QWaitCondition::wait (this=this@entry=0x575349896ad0, mutex=mutex@entry=0x575349896ac8, deadline=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:180
#7  0x00007b6f6e25b1ef in QtWaylandClient::EventThread::waitForReading (this=0x575349896a90) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:216
#8  QtWaylandClient::EventThread::run (this=0x575349896a90) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:177
#9  0x00007b6f708cd237 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:326
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#11 QThreadPrivate::start (arg=0x575349896a90) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:285
#12 0x00007b6f70ca339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#13 0x00007b6f70d2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 1 (Thread 0x7b6f68dd39c0 (LWP 1946)):
[KCrash Handler]
#5  0x00007b6f71b81d6b in PowerDevil::Core::unloadAllActiveActions (this=this@entry=0x5753497e6df0) at /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilcore.cpp:1000
#6  0x00007b6f71b84a21 in PowerDevil::Core::loadProfile (this=<optimized out>, force=true) at /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilcore.cpp:353
#7  0x00007b6f707a3397 in QtPrivate::QSlotObjectBase::call (this=0x575349cf7030, r=0x5753497e6df0, a=0x7ffdce2879c0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:469
#8  doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4086
#9  0x00007b6f71b9bcd5 in PowerDevil::PolicyAgent::sessionActiveChanged (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/powerdevil/build/daemon/powerdevilcore_autogen/include/moc_powerdevilpolicyagent.cpp:307
#10 0x00007b6f71b92eb4 in PowerDevil::PolicyAgent::onActiveSessionChanged (this=0x575349980f00, ifaceName=<optimized out>, changedProps=<optimized out>, invalidatedProps=<optimized out>) at /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilpolicyagent.cpp:369
#11 0x00007b6f71ba58a2 in PowerDevil::PolicyAgent::qt_metacall (this=0x575349980f00, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7ffdce287c58) at /usr/src/debug/powerdevil/build/daemon/powerdevilcore_autogen/include/moc_powerdevilpolicyagent.cpp:279
#12 0x00007b6f718588bd in QDBusConnectionPrivate::deliverCall (this=0x7b6f5c0095e0, object=0x575349980f00, msg=..., metaTypes=..., slotIdx=16) at /usr/src/debug/qt6-base/qtbase/src/dbus/qdbusintegrator.cpp:1007
#13 0x00007b6f7078d89f in QObject::event (this=0x575349980f00, e=0x7b6f5c034f10) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1452
#14 0x00007b6f70745aa8 in QCoreApplication::notifyInternal2 (receiver=0x575349980f00, event=event@entry=0x7b6f5c034f10) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1142
#15 0x00007b6f70745e6b in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7b6f5c034f10) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1583
#16 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5753498a27c0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1940
#17 0x00007b6f709aa00c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1797
#18 postEventSourceDispatch (s=0x5753498a4e60) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#19 0x00007b6f6ef0e299 in g_main_dispatch (context=0x7b6f5c000f00) at ../glib/glib/gmain.c:3344
#20 0x00007b6f6ef70ec7 in g_main_context_dispatch_unlocked (context=0x7b6f5c000f00) at ../glib/glib/gmain.c:4152
#21 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7b6f5c000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
#22 0x00007b6f6ef0d795 in g_main_context_iteration (context=0x7b6f5c000f00, may_block=1) at ../glib/glib/gmain.c:4282
#23 0x00007b6f709a82bd in QEventDispatcherGlib::processEvents (this=0x5753498a4860, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#24 0x00007b6f7074ff66 in QEventLoop::processEvents (this=0x7ffdce288280, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#25 QEventLoop::exec (this=0x7ffdce288280, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:182
#26 0x00007b6f7074a11d in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#27 0x000057533ec16726 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/powerdevil/powerdevil-6.1.4/daemon/powerdevilapp.cpp:135

Reported using DrKonqi
Comment 1 Nate Graham 2024-09-04 03:57:13 UTC
*** Bug 492494 has been marked as a duplicate of this bug. ***
Comment 2 TraceyC 2024-09-12 15:07:38 UTC
*** Bug 493015 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-09-18 20:56:32 UTC
Sentry said this showed up in Plasma 6.1.2. https://invent.kde.org/plasma/powerdevil/-/commit/d91bc62fa6ff93ac62ded148fee3722deab41442 was shipped in that release and looks like it could be relevant.
Comment 4 Jakob Petsovits 2024-09-18 21:18:05 UTC
(In reply to Nate Graham from comment #3)
> Sentry said this showed up in Plasma 6.1.2.
> https://invent.kde.org/plasma/powerdevil/-/commit/
> d91bc62fa6ff93ac62ded148fee3722deab41442 was shipped in that release and
> looks like it could be relevant.

Also relevant though: https://invent.kde.org/plasma/powerdevil/-/commit/7a929fa01ed036f60c5a15c72416b4e40eb03160

Which according to its linked bug reports shipped in 6.1.4.
Comment 5 Nate Graham 2024-11-05 20:30:28 UTC
*** Bug 495856 has been marked as a duplicate of this bug. ***
Comment 6 Filip 2024-11-12 11:22:17 UTC
*** Bug 496146 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-11-13 16:33:24 UTC
*** Bug 496203 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2024-11-25 20:52:04 UTC
*** Bug 496637 has been marked as a duplicate of this bug. ***
Comment 9 Bug Janitor Service 2024-12-16 21:06:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/478
Comment 10 Jakob Petsovits 2024-12-17 02:36:00 UTC
Git commit 41b4ca1dc515b1e44b31f6c4b5eadeb8571cd8f8 by Jakob Petsovits.
Committed on 17/12/2024 at 02:33.
Pushed by jpetso into branch 'master'.

daemon: Don't crash in PowerDevil::Core::unloadAllActiveActions()

Commit 584cfdf0 introduced the daemon's ability to remove actions
from `Core::m_actionPool` if they become unsupported at runtime.
Commit 7a929fa0 fixed some resulting crashes by also cleaning up
related map/set elements that contained this action.
That was not enough, we got lots of crashes coming in since then.

The (many) remaining crashes happened in `unloadAllActiveActions()`,
which cycles through `Core::m_activeActions` and accesses the
corresponding action pointer in `m_actionPool`. The implication is
that `m_activeActions` contains action IDs that are not present
in `m_actionPool`. And indeed, commit 7a929fa0 missed cleaning up
the action ID corresponding to the now-unsupported action.

With the dangling ID removed, PowerDevil should finally stop crashing.

SENTRY: FALLTHROUGH-30F

M  +4    -4    daemon/powerdevilcore.cpp

https://invent.kde.org/plasma/powerdevil/-/commit/41b4ca1dc515b1e44b31f6c4b5eadeb8571cd8f8
Comment 11 Jakob Petsovits 2024-12-17 02:54:56 UTC
Git commit 29f9b949c3ad75f11499825c79ba2a39344a26b0 by Jakob Petsovits.
Committed on 17/12/2024 at 02:50.
Pushed by jpetso into branch 'Plasma/6.2'.

daemon: Don't crash in PowerDevil::Core::unloadAllActiveActions()

Commit 584cfdf0 introduced the daemon's ability to remove actions
from `Core::m_actionPool` if they become unsupported at runtime.
Commit 7a929fa0 fixed some resulting crashes by also cleaning up
related map/set elements that contained this action.
That was not enough, we got lots of crashes coming in since then.

The (many) remaining crashes happened in `unloadAllActiveActions()`,
which cycles through `Core::m_activeActions` and accesses the
corresponding action pointer in `m_actionPool`. The implication is
that `m_activeActions` contains action IDs that are not present
in `m_actionPool`. And indeed, commit 7a929fa0 missed cleaning up
the action ID corresponding to the now-unsupported action.

With the dangling ID removed, PowerDevil should finally stop crashing.

SENTRY: FALLTHROUGH-30F


(cherry picked from commit 41b4ca1dc515b1e44b31f6c4b5eadeb8571cd8f8)

Co-authored-by: Jakob Petsovits <jpetso@petsovits.com>

M  +4    -4    daemon/powerdevilcore.cpp

https://invent.kde.org/plasma/powerdevil/-/commit/29f9b949c3ad75f11499825c79ba2a39344a26b0