Bug 467455

Summary: gnome-system-monitor shows incorrect CPU count
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: gnome-system-monitorAssignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: jturner, kem, sandmann, yaneti
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-03 01:23:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 438944, 465130    
Attachments:
Description Flags
gnome-system-monitor.png
none
/proc/cpuinfo
none
libgtop fix/workaround none

Description James Laska 2008-10-17 15:08:58 UTC
Created attachment 320675 [details]
gnome-system-monitor.png

Description of problem:

gnome-system-monitor lists only 6 CPU's under the System tab.  /proc/cpuinfo shows 8.

Version-Release number of selected component (if applicable):
gnome-system-monitor-2.24.0-3.fc10.i386
kernel-2.6.27.2-23.rc1.fc10.i686


How reproducible:
100%

Steps to Reproduce:
1. Launch gnome-system-monitor
2. Select System tab
  
Actual results:

See screenshot attached

Expected results:

See /proc/cpuinfo attached

Additional info:

Comment 1 James Laska 2008-10-17 15:14:28 UTC
Created attachment 320677 [details]
/proc/cpuinfo

Comment 2 Yanko Kaneti 2008-10-21 10:17:48 UTC
Created attachment 320996 [details]
libgtop fix/workaround

I've tracked this to libtop deficiency reading larger /proc/cpuinfo.
This minimal libgtop patch fixes/workarounds it for me.

Comment 3 Søren Sandmann Pedersen 2008-10-31 17:38:07 UTC
Yanko, while using g_file_get_contents() is better in principle, I don't see why it would help here since the /proc/cpuinfo in question is only ~5K and so fits within the 16K buffer.

(Also the patch needs to free the returned contents).

Comment 4 Yanko Kaneti 2008-10-31 23:24:45 UTC
Soren, I tried to explain it in the upstream bugreport. The way libgtop tries to read the file (single read) comes up short, around 4K, it has to be read again to get the next part and libgtop doesn't do that.  I've been told this is to be expected when reading /proc files, something about kernel page size. 
libgtops file_to_buffer needs to get smarter about this or it should just drop the whole thing and use glib which manages to get the whole file contents in tact.

Comment 5 Fedora Update System 2008-11-10 02:39:37 UTC
libgtop2-2.22.3-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/libgtop2-2.22.3-2.fc9

Comment 6 Fedora Update System 2008-11-12 02:57:24 UTC
libgtop2-2.22.3-2.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libgtop2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-9579

Comment 7 Bug Zapper 2008-11-26 03:57:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Fedora Update System 2008-12-03 01:23:16 UTC
libgtop2-2.22.3-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2008-12-07 04:14:52 UTC
libgtop2-2.24.0-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.