Bug 410678 - Internal buffer too small to read \'/proc/cpuinfo\'
Summary: Internal buffer too small to read \'/proc/cpuinfo\'
Status: RESOLVED DUPLICATE of bug 384515
Alias: None
Product: ksysguard
Classification: Applications
Component: ksysguard (show other bugs)
Version: 5.16.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-07 02:40 UTC by Bill
Modified: 2019-08-07 08:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fixed with huge CPUINFOBUFSIZE number. (59.50 KB, image/png)
2019-08-07 02:40 UTC, Bill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill 2019-08-07 02:40:52 UTC
Created attachment 121989 [details]
Fixed with huge CPUINFOBUFSIZE number.

SUMMARY
Ksysguard cannot parse cpu info on CPUs with lots of cores. Cannot see pretty CPU Freq turbo graphs on Ryzen 9.

STEPS TO REPRODUCE
1. Buy Ryzen 9 or Threadripper 12 core and above
2. Prevent your wallet from filing divorce papers. (optional)
3. Run Ksysguard
4. Check system log file for errors

OBSERVED RESULT
Internal buffer too small to read \'/proc/cpuinfo\'

EXPECTED RESULT
Should be able to see CPU Frequency and add to graph

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Latest version compiled on ARCH

ADDITIONAL INFORMATION

See ./ksysguard/ksysguardd/Linux/cpuinfo.c:43: CPUINFOBUFSIZE
For my 3900X CPU it reads about 1504 char per CPU core when you read proc/cpuinfo. While this is fixed by setting a huge number for CPUINFOBUFSIZE I recommend that either you increase the array based on number of CPUs, or use a smaller buffer and re-use it for each CPU.
Otherwise the huge size for CPUINFOBUFSIZE to accommodate new CPUs (128 threads) would be a pretty big silly number.

After changing CPUINFOBUFSIZE and make install I can see the purdy graph attached. Next stop moar overclocking...

Bill
Comment 1 Christoph Feck 2019-08-07 08:47:30 UTC

*** This bug has been marked as a duplicate of bug 384515 ***