https://bugs.kde.org/show_bug.cgi?id=493519

            Bug ID: 493519
           Summary: chargethresholdhelper crashed in
                    ChargeThresholdHelper::getthreshold with Plasma 6.1.90
    Classification: Plasma
           Product: Powerdevil
           Version: 6.1.90
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: matt.fagn...@bell.net
                CC: natalie_clar...@yahoo.de
  Target Milestone: ---

SUMMARY

I booted the Fedora Rawhide KDE live image
Fedora-KDE-Live-x86_64-Rawhide-20240922.n.0.iso in a QEMU/KVM VM in GNOME Boxes
in a Fedora 41 KDE installation. Plasma 6.1.90 on Wayland started.
chargethresholdhelper crashed twice in ChargeThresholdHelper::getthreshold
during Plasma startup when it was run automatically by
dbus-:1.3-org.kde.powerdevil.chargethresholdhelper@0.service. 

Core was generated by `/usr/libexec/kf6/kauth/chargethresholdhelper'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055c549d06abe in ChargeThresholdHelper::getthreshold (this=<optimized
out>, args=...)
    at
/usr/src/debug/powerdevil-6.1.90-1.fc42.x86_64/daemon/chargethresholdhelper_linux.cpp:132
132         const int stopThreshold = *stopThresholdIt;
[Current thread is 1 (Thread 0x7f8117cc3980 (LWP 2469))]

(gdb) bt
#0  0x000055c549d06abe in ChargeThresholdHelper::getthreshold (this=<optimized
out>, args=...)
    at
/usr/src/debug/powerdevil-6.1.90-1.fc42.x86_64/daemon/chargethresholdhelper_linux.cpp:132
#1  ChargeThresholdHelper::qt_static_metacall (_o=<optimized out>,
_id=<optimized out>, _a=0x7ffffe4ded00, _c=<optimized out>)
    at
/usr/src/debug/powerdevil-6.1.90-1.fc42.x86_64/redhat-linux-build/daemon/chargethresholdhelper_autogen/include/moc_chargethresholdhelper.cpp:111
#2  0x00007f81176fd8f1 in QMetaMethodInvoker::invokeImpl (self=...,
target=0x55c56f2ae600,
connectionType=connectionType@entry=Qt::DirectConnection,
    paramCount=paramCount@entry=2, parameters=parameters@entry=0x7ffffe4ded00,
typeNames=0x7ffffe4ded10, metaTypes=0x7ffffe4ded20)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qmetaobject.cpp:2754
#3  0x00007f81176fe3f1 in QMetaMethod::invokeImpl (self=..., target=<optimized
out>, connectionType=connectionType@entry=Qt::DirectConnection,
    paramCount=paramCount@entry=2, parameters=parameters@entry=0x7ffffe4ded00,
typeNames=0x7ffffe4ded10, metaTypes=0x7ffffe4ded20)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qmetaobject.cpp:2592
#4  0x00007f8105090f4a in QMetaMethod::invoke<KAuth::ActionReply,
QMetaMethodArgument> (c=<optimized out>, this=<optimized out>, obj=<optimized
out>, r=...)
    at /usr/include/qt6/QtCore/qmetaobject.h:148
#5  KAuth::DBusHelperProxy::performAction (this=<optimized out>, action=...,
details=..., arguments=..., fdArguments=..., callerID=...)
    at
/usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/src/backends/dbus/DBusHelperProxy.cpp:283
#6  0x00007f8105091e06 in Kf6authAdaptor::performAction (callerID=...,
this=0x55c56f2b2800, action=..., details=..., arguments=..., fdArguments=...)
    at
/usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/redhat-linux-build/src/kf6authadaptor.cpp:39
#7  Kf6authAdaptor::qt_static_metacall (_o=_o@entry=0x55c56f2b2800,
_id=_id@entry=1, _a=_a@entry=0x7ffffe4def88, _c=<optimized out>)
    at
/usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/redhat-linux-build/src/moc_kf6authadaptor.cpp:145
#8  0x00007f8105092220 in Kf6authAdaptor::qt_static_metacall
(_o=0x55c56f2b2800, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffffe4def88)
    at
/usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/redhat-linux-build/src/moc_kf6authadaptor.cpp:138
#9  Kf6authAdaptor::qt_metacall (this=0x55c56f2b2800,
_c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffffe4def88)
    at
/usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/redhat-linux-build/src/moc_kf6authadaptor.cpp:182
#10 0x00007f8116f6b421 in QDBusConnectionPrivate::deliverCall
(this=this@entry=0x7f8100009250, object=object@entry=0x55c56f2b2800, msg=...,
metaTypes=..., slotIdx=5)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1007
#11 0x00007f8116f6ec48 in QDBusConnectionPrivate::activateCall
(this=this@entry=0x7f8100009250, object=0x55c56f2b2800, flags=...,
flags@entry=..., msg=...)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/dbus/qdbusintegrator.cpp:909
#12 0x00007f8116f6f341 in QDBusConnectionPrivate::activateObject
(this=0x7f8100009250, node=..., msg=..., pathStartPos=<optimized out>)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1484
#13 0x00007f8116f7226a in QDBusActivateObjectEvent::placeMetaCall
(this=0x7f810000ece0)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1604
--Type <RET> for more, q to quit, c to continue without paging--c
#14 0x00007f811773dd4b in QObject::event (this=0x55c56f2f3b30,
e=0x7f810000ece0) at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qobject.cpp:1452
#15 0x00007f81176e6de9 in doNotify (receiver=0x55c56f2f3b30,
event=0x7f810000ece0)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1243
#16 QCoreApplication::notify (this=<optimized out>, receiver=0x55c56f2f3b30,
event=0x7f810000ece0)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1226
#17 QCoreApplication::notifyInternal2 (receiver=0x55c56f2f3b30,
event=0x7f810000ece0)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#18 0x00007f81176e706d in QCoreApplication::sendEvent (receiver=<optimized
out>, event=<optimized out>)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1583
#19 0x00007f81176eabd1 in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x55c56f2ae6a0)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1940
#20 0x00007f81176eae7d in QCoreApplication::sendPostedEvents
(receiver=<optimized out>, event_type=<optimized out>)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1797
#21 0x00007f81179d586f in postEventSourceDispatch (s=0x55c56f2afee0) at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#22 0x00007f81168f660c in g_main_context_dispatch_unlocked.lto_priv () from
/lib64/libglib-2.0.so.0
#23 0x00007f8116956b78 in g_main_context_iterate_unlocked.isra () from
/lib64/libglib-2.0.so.0
#24 0x00007f81168f7b03 in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#25 0x00007f81179d5023 in QEventDispatcherGlib::processEvents
(this=0x55c56f2afb60, flags=...)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#26 0x00007f81176f3b43 in QEventLoop::exec (this=this@entry=0x7ffffe4df820,
flags=..., flags@entry=...)
    at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/global/qflags.h:34
#27 0x00007f81176ef9fc in QCoreApplication::exec () at
/usr/src/debug/qt6-qtbase-6.7.2-6.fc42.x86_64/src/corelib/global/qflags.h:74
#28 0x00007f8117df89e4 in KAuth::HelperSupport::helperMain (argc=<optimized
out>, argv=<optimized out>, id=<optimized out>, responder=<optimized out>)
    at /usr/src/debug/kf6-kauth-6.6.0-1.fc42.x86_64/src/helpersupport.cpp:101
#29 0x00007f81170121c8 in __libc_start_call_main () from /lib64/libc.so.6
#30 0x00007f811701228b in __libc_start_main_impl () from /lib64/libc.so.6
#31 0x000055c549d03d85 in _start ()

The pointers stopThresholdIt and stopThresholds in
ChargeThresholdHelper::getthreshold looked invalid.

(gdb) p *stopThresholdIt
Attempt to take address of value not located in memory.
(gdb) p stopThresholdIt
$2 = <optimized out>

(gdb) p stopThresholds
$1 = {d = {d = 0x55c56f2fadd0}}
(gdb) p *stopThresholds
Attempt to take address of value not located in memory.

chargethresholdhelper crashed with the same trace when I selected Power
Management in System Settings. This problem happened on 4/4 boots with this
image in VMs and on bare metal. I didn't see this problem with Plasma 6.1.5 or
earlier.

STEPS TO REPRODUCE
1. Boot a Fedora 41 KDE installation
2. Log in to Plasma 6.1.5 on Wayland
3. Download the Fedora Rawhide KDE live image
Fedora-KDE-Live-x86_64-Rawhide-20240922.n.0.iso from
https://koji.fedoraproject.org/koji/buildinfo?buildID=2550880
4. Install GNOME Boxes if it isn't already with sudo dnf install gnome-boxes
5. Start GNOME Boxes
6. Boot Fedora-KDE-Live-x86_64-Rawhide-20240922.n.0.iso in a QEMU/KVM VM in
GNOME Boxes

OBSERVED RESULT
chargethresholdhelper crashed in ChargeThresholdHelper::getthreshold with
Plasma 6.1.90

EXPECTED RESULT
chargethresholdhelper shouldn't have crashed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Rawhide/42
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to