Bug 496032

Summary: Multiple ksystemstats crashes when changing sensor widget settings
Product: [Plasma] plasmashell Reporter: Luis <stereomato>
Component: System MonitorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: ahiemstra, notmart, pallaswept
Priority: NOR    
Version: 6.2.2   
Target Milestone: 1.0   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Luis 2024-11-10 00:26:55 UTC
SUMMARY
A myriad of ksystemstats crashes upon trying to change Total CPU Usage/Memory Usage/Hard Disk Activity sensors.

STEPS TO REPRODUCE
1. Add any system monitor widget to the task bar
2. Modify it, by adding or removing sensors from the active sensors bar.
3. Witness the crashes

OBSERVED RESULT
Crashes, the sensor widgets all stop working.

EXPECTED RESULT
No crashes, sensors still work.

SOFTWARE/OS VERSIONS
Operating System: NixOS 24.11
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-zen1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i5-12500H
Memory: 11.4 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1605ZA_X1605ZA
System Version: 1.0

ADDITIONAL INFORMATION
This has happened across distros (arch, fedora, nixos), more commonly reproduced by adding the group cpu usage to the total cpu usasge widget. Also, doing that would for some reason... add ever single sensor available too.
Comment 1 pallaswept 2024-11-12 06:09:19 UTC
I already have a widget showing CPU, memory and temp. I tried adding the group CPU usage as you suggested, and it went fine, but yes, it added each CPU metric from the group, rather than the group's total. I removed it and tried again, it went fine again, so I cancelled out and told it to discard my changes. It did not, they were still there. 

I kept trying to repro this for you. Simply opening the 'All' group, not selecting any metric to add, I hadn't even gotten that far, it instantly added every single metric to the widget, and the widget itself went blank. I assume it crashed because of having an insane number of metrics added at once, and since you're adding the group and the group is adding each metric, there's a large number there, too... 

I cancelled out, it prompted me, I told it to discard my changes.... And it didn't, crashed, and deleted my working widget settings. 

Perhaps you might be so kind as to remove your reddit post asking other people to try this. You have a (kind-of) reproduction now, and it would suck for someone else to break their plasma and have to restore from backups.
Comment 2 pallaswept 2024-11-12 06:17:22 UTC
Well, good news, it didn't delete my config... it just froze the whole of plasma. My widget is OK, but after a nasty unclean shutdown/forced reboot... So, probably would still be nice to not suggest that people try this :D
Comment 3 Luis 2024-11-12 14:10:07 UTC
(In reply to pallaswept from comment #2)
> Well, good news, it didn't delete my config... it just froze the whole of
> plasma. My widget is OK, but after a nasty unclean shutdown/forced reboot...
> So, probably would still be nice to not suggest that people try this :D

I added a disclaimer saying this could wreck their plasma setup, and to try using a different user account or a VM
Comment 4 pallaswept 2024-11-13 06:20:06 UTC
Good on ya mate.

So I was thinking, since mine doesn't crash immediately, maybe I could set mine up for you, and copy/paste the config in here. 

I noticed something while I checked out the config. I have some leftover entries in there from the failure above. Under the [SensorColors] entry, the leftover entries have a color of "invalid". Do you see that, too? Maybe it's normal, I don't know.
Comment 6 pallaswept 2024-11-13 14:59:36 UTC
(In reply to Arjen Hiemstra from comment #5)
> This should be fixed in 6.2.3

Thanks Arjen!