After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352807 - misbehaves with Linux' CPU hotplug/unplug
misbehaves with Linux' CPU hotplug/unplug
Status: RESOLVED OBSOLETE
Product: libgtop
Classification: Core
Component: linux
unspecified
Other All
: Normal normal
: ---
Assigned To: libgtop maintainers
libgtop maintainers
: 732305 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-25 08:41 UTC by Tomasz Torcz
Modified: 2018-01-10 19:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomasz Torcz 2006-08-25 08:41:58 UTC
Please describe the problem:
GNOME System Monitor is totally unaware of CPU Hotplug/Hotremove events.
It also have problem with "sparse" cpu numbers.

Steps to reproduce:
Scenario A:
1. Run System Monitor
2. Unplug CPU (echo 0 > /sys/devices/system/cpu/cpu1/online)

Scenario B:
1. Unplug CPU
2. Run System Monitor
3. Plug CPU (echo 1 > /sys/devices/system/cpu/cpu1/online)

Scenario C:
1. Run System Monitor on 4-way SMP system.
2. Unplug second or third CPU


Actual results:
Scenario A:
Unplugged CPU's line goes flat, but CPU is still displayed

Scenario B:
Freshly plugged-in CPU do not appear in monitor.

Scenario C:
SERIOUS! System Monitor shows only one (if second CPU was unplugged) or
two (if third CPU) CPU's graphs. It doesn't show fourth (and third) CPU's graph.

Expected results:
Scenario A:
Unplugged CPU's label should be grayed-out and percent display should be changed to "offline".

Scenario B:
Freshly plugged CPU should either:
a) appear
b) be un-grayed-out (see Scenario A expected action)

Scenario C:
CPUs 3 and 4 should be shown even if CPU2 is disabled. System Monitor shouldn't stop enumerating CPUs on first offline one.

Does this happen every time?
Yes.

Other information:
Multicore laptops are becoming standard, and power management policy could turn off (unplug) unused CPUs. So this is rather imporant drawback in GNOME System Monitor.
Comment 1 M.Hotzen 2010-02-26 14:07:24 UTC
I can confirm this bug. I've got it with Version 2.28.0-0ubuntu1 on an Intel E5520 and with Version 2.16.0 (CentOS 5.4) on a Tyan VX50. I wonder why it was not fixed although it is known for a long time and pretty sticky over a lot of versions.
Comment 2 Robert Roth 2012-07-22 19:14:06 UTC
I can still reproduce this on Gnome System Monitor git HEAD.
Also see downstream report for ubuntu: https://bugs.launchpad.net/gnome-system-monitor/+bug/810498.
Comment 3 Robert Roth 2012-07-22 19:31:57 UTC
Reassigning this to libgtop, the library getting us the CPU information, as it determines the number of CPUs the following way [1]: starts reading /proc/stat line by line, increases a counter with each line, and checks if the line starts with cpu%d, counter. In case e.g cpu2 is offline, /proc/stat only has cpu0, cpu1, cpu3 on a quad-core, but as line 3 doesn't start with cpu2, but starts with cpu3, it stops counting the number of cores and tells system monitor that there are only 2 cores, cpu0 and cpu1. 

[1] http://git.gnome.org/browse/libgtop/tree/sysdeps/linux/open.c#n82
Comment 4 Robert Roth 2014-06-27 01:22:59 UTC
*** Bug 732305 has been marked as a duplicate of this bug. ***
Comment 5 GNOME Infrastructure Team 2018-01-10 19:45:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgtop/issues/6.