Created attachment 139928 [details] dump from journalctl SUMMARY ksystemstats keeps crashing on every login or when starting manually via: systemctl --user start plasma-ksystemstats.service STEPS TO REPRODUCE Just login to a new plasma session from sddm OBSERVED RESULT Ksystemstats coredumps few times (after some retries) and system monitor sensors are not available. EXPECTED RESULT Ksystemstats should start SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.22.3 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION I'm sorry. I'm unable to distinguish since when, because of the Arch package ksystemstats was unistalled since its introduction for high cpu consumption...
Are you able to get debug symbols for ksystemstats/build it yourself to see where exactly in the lmsensors plugin it is crashing?
Created attachment 139948 [details] coredump dump
Hello. Yes, it is easy in archlinux. I can provide binaries. And the full coredump too, if you tell me, how to get it from systemd... :-)
FYI: (gdb) frame 0 #0 SensorsFeatureSensor::update (this=0x561ebef6e9c0) at /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp:142 142 in /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp (gdb) p m_valueFeature $1 = (const sensors_subfeature *) 0x0
Thanks!
You're welcome!
(Damned procrastination!) (gdb) p *this->m_chipName $3 = {prefix = 0x561ebee811a0 "fam15h_power", bus = {type = 2, nr = 0}, addr = 196, path = 0x561ebee811c0 "/sys/class/hwmon/hwmon4"} ... Thread 1 "ksystemstats" hit Breakpoint 1, makeSensorsFeatureSensor (chipName=0x5555555a7e90, feature=0x5555555b0300, parent=0x5555556809a0) at /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp:100 (gdb) p valueFeature $1 = (const sensors_subfeature *) 0x0 (gdb) p *chipName $2 = {prefix = 0x5555555a81a0 "fam15h_power", bus = {type = 2, nr = 0}, addr = 196, path = 0x5555555a81c0 "/sys/class/hwmon/hwmon4"} (gdb) p *feature $3 = {name = 0x5555555b0320 "power1", number = 0, type = SENSORS_FEATURE_POWER, first_subfeature = 0, padding1 = 0} lm_sensors-3.6.0.r41.g31d1f125-1 (without debug symbols, of course :-/ )
So I assume this returned nullptr https://invent.kde.org/plasma/ksystemstats/-/blob/master/plugins/lmsensors/SensorsFeatureSensor.cpp#L99 We should test if we have found a valueFeature below the switch. Wanna submit a merge request for it, since you did the investigation? Out of interest could you paste the output of sensors on your system?
As You can see above, the valueFeature is NULL on the next line after sensors_get_subfeature(). And I can't see anything what would fill it later. But to be sure: (gdb) br 121 Breakpoint 3 at 0x7ffff2a01c41: file /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp, line 121. (gdb) c Continuing. Thread 1 "ksystemstats" hit Breakpoint 2, makeSensorsFeatureSensor (chipName=0x5555555a7e90, feature=0x5555555b0300, parent=0x5555556809a0) at /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp:121 121 in /usr/src/debug/ksystemstats-5.22.3/plugins/lmsensors/SensorsFeatureSensor.cpp (gdb) p valueFeature $4 = (const sensors_subfeature *) 0x0
I don't understand, what is the meaning of the "submit a merge request". I'm sorry, I'm not a KDE programmer nor a community programmer. And I'm fighting with the English language too! :-o
Is this enough, or do You know a better way? # sensors -u iwlwifi_1-virtual-0 Adapter: Virtual device temp1: temp1_input: 51.000 fam15h_power-pci-00c4 Adapter: PCI adapter power1: power1_average: 0.000 power1_crit: 14.961 power1_average_interval: 0.010 BAT0-acpi-0 Adapter: ACPI interface in0: in0_input: 16.398 amdgpu-pci-0100 Adapter: PCI adapter vddgfx: in0_input: 0.806 edge: temp1_input: 56.000 temp1_crit: 104000.000 temp1_crit_hyst: -273.150 power1: power1_average: 2774.162 power1_cap: 35.000 k10temp-pci-00c3 Adapter: PCI adapter temp1: temp1_input: 58.000 temp1_max: 70.000 temp1_crit: 95.000 temp1_crit_hyst: 90.000 radeon-pci-0008 Adapter: PCI adapter temp1: temp1_input: 58.000 temp1_crit: 120.000 temp1_crit_hyst: 90.000 acpitz-acpi-0 Adapter: ACPI interface temp1: temp1_input: 58.000 temp1_crit: 255.000
> I don't understand, what is the meaning of the "submit a merge request" Basically if you want to submit a fix for this crash :) >fam15h_power-pci-00c4 >Adapter: PCI adapter >power1: > power1_average: 0.000 > power1_crit: 14.961 > power1_average_interval: 0.010 It indeed has no power1_input, interesting (the same for the one from amdgpu)
Thanks for the explanation! No, thanks for that offer very much, but I'm just the reporter here, you're the programmer! I want to have this problem fixed and I will help You as much as I can do... But no any commits from my side! :-D
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/8
Git commit 70550a94e1752a8adad577574ab3b051088f5a61 by David Redondo. Committed on 09/07/2021 at 12:36. Pushed by davidre into branch 'master'. Don't crash if there's no input subfeature Apaprently not all sensors have an "input" subfeature for example some can only have an "average" subfeature. FIXED-IN:5.22.4 M +4 -0 plugins/lmsensors/SensorsFeatureSensor.cpp https://invent.kde.org/plasma/ksystemstats/commit/70550a94e1752a8adad577574ab3b051088f5a61
Git commit 782dbe81acaa3d364d12c1e42e44fc90c447df22 by David Redondo. Committed on 15/07/2021 at 13:45. Pushed by davidre into branch 'Plasma/5.22'. Don't crash if there's no input subfeature Apaprently not all sensors have an "input" subfeature for example some can only have an "average" subfeature. FIXED-IN:5.22.4 (cherry picked from commit 70550a94e1752a8adad577574ab3b051088f5a61) M +4 -0 plugins/lmsensors/SensorsFeatureSensor.cpp https://invent.kde.org/plasma/ksystemstats/commit/782dbe81acaa3d364d12c1e42e44fc90c447df22
*** Bug 440261 has been marked as a duplicate of this bug. ***