Bug 435063

Summary: System Monitor reposts its own cpu usage incorrectly after click on "Discard changes" button
Product: [Applications] plasma-systemmonitor Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2021-03-28 13:33:24 UTC
Created attachment 137131 [details]
screenshot

STEPS TO REPRODUCE
1. open System Monitor
2. click on "Edit page" button in the upper right corner
3. click on "Discard changes" button on top

OBSERVED RESULT
cpu usage of System Monitor reported in Overview page is wrong.
System Activity app launched with ctrl+esc shortcut reports correct cpu usage.
Please see the attached screenshot.

EXPECTED RESULT
System  Monitor should report the cpu usage of any app correctly.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Arjen Hiemstra 2021-04-14 11:05:31 UTC
I can confirm this, unfortunately I have no idea what's happening here.
Comment 2 David Edmundson 2021-04-14 12:59:00 UTC
I believe fixed by: https://invent.kde.org/plasma/libksysguard/-/merge_requests/146
Comment 3 David Edmundson 2021-04-14 15:38:52 UTC
Git commit 2a5482a6a7bcac83c697a4642bcb946ba9646093 by David Edmundson.
Committed on 14/04/2021 at 15:38.
Pushed by davidedmundson into branch 'master'.

Flush process cache after fetching a CGroup's PIDs

The process cache turns a PID into a KSysguard::Process* to save lookups
in each data fetch.

Once we update the applications pids this needs resetting.

M  +1    -0    processcore/cgroup_data_model.cpp

https://invent.kde.org/plasma/libksysguard/commit/2a5482a6a7bcac83c697a4642bcb946ba9646093