Summary: | ksystemstats segfaults on start inLmSensorsPlugin::update() | ||
---|---|---|---|
Product: | [Applications] plasma-systemmonitor | Reporter: | Maximiliano Bertacchini <maxiberta> |
Component: | general | Assignee: | KSysGuard Developers <ksysguard-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ahiemstra, nate, notmart, plasma-bugs |
Priority: | NOR | ||
Version: | 5.21.90 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/ksystemstats/commit/be6a4b3aa80c67aacf61618293b9ec2aacf374d9 | Version Fixed In: | 5.22 |
Sentry Crash Report: |
Description
Maximiliano Bertacchini
2021-05-23 01:04:53 UTC
seems specifoc to lmsensors (In reply to Marco Martin from comment #1) > seems specifoc to lmsensors Indeed. Removing the lmsensors plugin from "/usr/lib/x86_64-linux-gnu/qt5/plugins/ksystemstats" unlocks both plasma-systemmonitor and kstatsviewer. Managed to debug a locally compiled build and pinpointed the crash to sensors of type SENSORS_FEATURE_IN and SENSORS_FEATURE_CURR. So that if makeSensorsFeatureSensor() returns nullptr on those types, ksystemstats works fine with all the other sensors in my system (2 fans and a lot of temperatures). Alternatively, it also works if SensorsFeatureSensor::update() returns immediately on feature names "in0_input" or "curr1_input". Just in case, the output of `sensors` on my laptop: $ sensors ucsi_source_psy_USBC000:001-isa-0000 Adapter: ISA adapter in0: 0.00 V (min = +0.00 V, max = +0.00 V) curr1: 3.00 A (max = +0.00 A) thinkpad-isa-0000 Adapter: ISA adapter fan1: 2477 RPM fan2: 2188 RPM temp1: +41.0°C temp2: +41.0°C temp3: +0.0°C temp4: +0.0°C temp5: +0.0°C temp6: +0.0°C temp7: +0.0°C temp8: +0.0°C temp9: +0.0°C temp10: +0.0°C temp11: +1.0°C temp12: +0.0°C temp13: +13.0°C temp14: +0.0°C temp15: +0.0°C temp16: +0.0°C coretemp-isa-0000 Adapter: ISA adapter Package id 0: +43.0°C (high = +100.0°C, crit = +100.0°C) Core 0: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 1: +41.0°C (high = +100.0°C, crit = +100.0°C) Core 2: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 3: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 4: +41.0°C (high = +100.0°C, crit = +100.0°C) Core 5: +41.0°C (high = +100.0°C, crit = +100.0°C) BAT0-acpi-0 Adapter: ACPI interface in0: 16.14 V ucsi_source_psy_USBC000:002-isa-0000 Adapter: ISA adapter in0: 0.00 V (min = +0.00 V, max = +0.00 V) curr1: 0.00 A (max = +0.00 A) iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +32.0°C pch_cannonlake-virtual-0 Adapter: Virtual device temp1: +46.0°C nvme-pci-0200 Adapter: PCI adapter Composite: +44.9°C (low = -5.2°C, high = +79.8°C) (crit = +84.8°C) acpitz-acpi-0 Adapter: ACPI interface temp1: +41.0°C (crit = +128.0°C) Nice work! Would you like to submit a merge request to fix it? (In reply to Nate Graham from comment #5) > Nice work! Would you like to submit a merge request to fix it? I'd love to, but... I don't yet understand the real issue, let alone how to fix it :) (other than the hack of just ignoring those sensor types). Will keep looking at libsensors internals for now. Git commit 6be954add10b934f3683bc599849e0fee1da140d by David Redondo. Committed on 25/05/2021 at 07:43. Pushed by davidre into branch 'master'. Init lib sensors centrally in the daemon Initing muliple times in the same process leads to crashes. M +1 -1 autotests/CMakeLists.txt M +0 -1 plugins/cpu/linuxcpuplugin.cpp M +0 -4 plugins/lmsensors/lmsensors.cpp M +6 -0 src/CMakeLists.txt M +10 -0 src/daemon.cpp https://invent.kde.org/plasma/ksystemstats/commit/6be954add10b934f3683bc599849e0fee1da140d Git commit be6a4b3aa80c67aacf61618293b9ec2aacf374d9 by David Redondo. Committed on 27/05/2021 at 10:06. Pushed by davidre into branch 'Plasma/5.22'. Init lib sensors centrally in the daemon Initing muliple times in the same process leads to crashes. (cherry picked from commit 6be954add10b934f3683bc599849e0fee1da140d) M +1 -1 autotests/CMakeLists.txt M +0 -1 plugins/cpu/linuxcpuplugin.cpp M +0 -4 plugins/lmsensors/lmsensors.cpp M +6 -0 src/CMakeLists.txt M +10 -0 src/daemon.cpp https://invent.kde.org/plasma/ksystemstats/commit/be6a4b3aa80c67aacf61618293b9ec2aacf374d9 |