Summary: | System Load Viewer, no information | ||
---|---|---|---|
Product: | [Plasma] kdeplasma-addons | Reporter: | Wyatt Childers <kdebugs.81do7> |
Component: | systemloadviewer | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | nate, wadlax |
Priority: | NOR | ||
Version: | 5.17.3 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
a log running the widget from the command line
Set CPUINFOBUFSIZE to 128kb |
Description
Wyatt Childers
2019-12-01 22:53:18 UTC
Created attachment 124251 [details]
a log running the widget from the command line
I confirm, i have the same issue. Proc Ryzen 3900x, 24 "CPUs" KSysGuard shows CPUs load. . As i see in "SystemLoadViewer.qml" plasmoid use sensor "system/cores" to get cores amount and get cores load. But i don't see this sensor in KSysGuard's Sensor Browser . I think the problem may be in buffer size :) File "ksysguardd/Linux/cpuinfo.c": Procedure "processCpuInfo" calculates cores number. Procedure "initCpuInfo" outputs monitor "system/cores" if result of "updateCpuInfo" is good. ( registerMonitor( "system/cores", "integer" ... ) Function "updateCpuInfo" has a check "Internal buffer too small to read ..." and #define CPUINFOBUFSIZE (32 * 1024) . With my 24 cpus, command "cat /proc/cpuinfo > 1.txt" creates a file 35,982 bytes I will try to patch that file (i use Gentoo) and build corrected "kde-plasma/ksysguard" Good, that worked :) I have created a patch, to set buffer size to 128kb "+#define CPUINFOBUFSIZE (128 * 1024)" Applied via Gentoo patch system ( https://wiki.gentoo.org/wiki//etc/portage/patches ) Rebuilt kde-plasma/ksysguard And restarted Plasma. . I can confirm that the problem was in buffer size. Created attachment 124822 [details]
Set CPUINFOBUFSIZE to 128kb
Output of command "/proc/cpuinfo" is written to a buffer with a size of CPUINFOBUFSIZE.
If there is too many processors in the system - old value of 32kb is not enough.
Nice find! Though perhaps it would be better to use a dynamically allocated buffer so this doesn't need manually fixed in the future/people with fewer CPU cores don't pay for RAM they're not using? *** This bug has been marked as a duplicate of bug 384515 *** Yes, it would be better. Though i don't know Cpp so well to implement this. So, just increased that buffer a bit. For me this will do the trick. Weird thing is - bug 384515 was opened in 2017 and still no progress. Afaik now KDE moves to GitLab, then (the move is done) it would be good to implement even a small buffer increase, without full rewrite. |