[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 Arjen Hiemstra changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/ksystemstats/commit/9967 |ma/ksystemstats/commit/d6b5 |0f3a2ec04037da341e5ae11cbc4 |d4aa7ac95712c1602deb9d2df4b |81c799f35 |6d4d8a878 --- Comment #10 from Arjen Hiemstra --- Git commit d6b5d4aa7ac95712c1602deb9d2df4b6d4d8a878 by Arjen Hiemstra. Committed on 26/01/2023 at 13:21. Pushed by ahiemstra into branch 'master'. Ensure we only ever use tick differences that don't exceed the total We know they'll be wrong if they exceed the total. M +2-2plugins/cpu/usagecomputer.cpp https://invent.kde.org/plasma/ksystemstats/commit/d6b5d4aa7ac95712c1602deb9d2df4b6d4d8a878 -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 --- Comment #9 from postix --- I meant of course ``` if (tickDiff < totalDiff && tickDiff > 0) { ``` -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 --- Comment #8 from postix --- Maybe a saver check would be ``` if (tickDiff > totalDiff && totalDiff > 0) { return 100.0 * tickDiff / totalDiff; } return 0.0; ``` -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 postix changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED Version|5.23.5 |5.25.2 --- Comment #7 from postix --- Unfortunately I can reproduce it again while doing some backup to some USB attached HDD, now on Plasma 5.25.5. -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 Nate Graham changed: What|Removed |Added Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/ksystemstats/commit/f3f5 |ma/ksystemstats/commit/9967 |09fca64f6806f5e2533b5e7ab79 |0f3a2ec04037da341e5ae11cbc4 |07a7e6746 |81c799f35 --- Comment #6 from Nate Graham --- Git commit 99670f3a2ec04037da341e5ae11cbc481c799f35 by Nate Graham, on behalf of Arjen Hiemstra. Committed on 04/02/2022 at 15:51. Pushed by ngraham into branch 'Plasma/5.24'. CPU Plugin: Prevent integer overflow of total usage In some cases, the values we read from the system can result in a negative difference to the previous values. This was already guarded partially, but only for system/user/wait usage. Total usage would still be able to go negative, resulting in overflow of the total usage. Instead, ensure that all the differences are always at least 0, so if we add things together we aren't adding negatives. FIXED-IN: 5.24.1 (cherry picked from commit f3f509fca64f6806f5e2533b5e7ab7907a7e6746) M +16 -7plugins/cpu/usagecomputer.cpp https://invent.kde.org/plasma/ksystemstats/commit/99670f3a2ec04037da341e5ae11cbc481c799f35 -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 Nate Graham changed: What|Removed |Added Version Fixed In||5.24.1 Status|ASSIGNED|RESOLVED Latest Commit||https://invent.kde.org/plas ||ma/ksystemstats/commit/f3f5 ||09fca64f6806f5e2533b5e7ab79 ||07a7e6746 Resolution|--- |FIXED --- Comment #5 from Nate Graham --- Git commit f3f509fca64f6806f5e2533b5e7ab7907a7e6746 by Nate Graham, on behalf of Arjen Hiemstra. Committed on 04/02/2022 at 15:50. Pushed by ngraham into branch 'master'. CPU Plugin: Prevent integer overflow of total usage In some cases, the values we read from the system can result in a negative difference to the previous values. This was already guarded partially, but only for system/user/wait usage. Total usage would still be able to go negative, resulting in overflow of the total usage. Instead, ensure that all the differences are always at least 0, so if we add things together we aren't adding negatives. FIXED-IN: 5.24.1 M +16 -7plugins/cpu/usagecomputer.cpp https://invent.kde.org/plasma/ksystemstats/commit/f3f509fca64f6806f5e2533b5e7ab7907a7e6746 -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 Bug Janitor Service changed: What|Removed |Added Ever confirmed|0 |1 Status|REPORTED|ASSIGNED --- Comment #4 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/32 -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 postix changed: What|Removed |Added Attachment #146237|0 |1 is obsolete|| --- Comment #3 from postix --- Created attachment 146240 --> https://bugs.kde.org/attachment.cgi?id=146240=edit Plot 1 -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 --- Comment #2 from postix --- Created attachment 146237 --> https://bugs.kde.org/attachment.cgi?id=146237=edit Plot 1 (In reply to Arjen Hiemstra from comment #1) > Can you run `watch -n 0.5 cat /proc/stat` and see if the values jump back at > some point? Yes, I have collected the data via `watch -n 0.1 "(date && cat /proc/stat) >> procstat.log` with higher resolution than probably needed. The data I have plotted graphically via a Python script and if I did not make a mistake [1] there are several negative values. While I had recorded the data set, I counted about 4 possible overflows. [1] https://paste.debian.net/plainh/8f3de29c -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 --- Comment #1 from Arjen Hiemstra --- CPU usage is calculated by reading `/proc/stat` and subtracting the previous value from the current value. The sudden large value suggests that suddenly the new value is less than the previous value, which would lead to integer overflow like that. Can you run `watch -n 0.5 cat /proc/stat` and see if the values jump back at some point? -- You are receiving this mail because: You are watching all bug changes.
[plasma-systemmonitor] [Bug 448626] When slowly copying files via KIO sometimes CPU spikes to non-sense values for a fraction of a second
https://bugs.kde.org/show_bug.cgi?id=448626 postix changed: What|Removed |Added CC||pos...@posteo.eu -- You are receiving this mail because: You are watching all bug changes.