Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1329819 - virsh nodecpumap --pretty shows wrong result on machine with many cores
virsh nodecpumap --pretty shows wrong result on machine with many cores
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: pre-dev-freeze
: 7.3
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-23 09:55 EDT by Hao Liu
Modified: 2016-11-03 14:43 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-1.3.4-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:43:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Hao Liu 2016-04-23 09:55:43 EDT
Description of problem:
virsh nodecpumap --pretty shows wrong result on machine with many cores

Version-Release number of selected component (if applicable):
libvirt-1.3.3-2.el7.x86_64

How reproducible:


Steps to Reproduce:
On a machine with many CPU cores exists.

# virsh nodecpumap --pretty
CPUs present:   120
CPUs online:    120
CPU map:        0-119,192,196,199,258,262,264,267,269-270,272-273,276-278,284-286,290-291,293-294,296,301-302,304,307-310,314,316,318,320,322,325-326,331-334,338,340-342,802-803,805,807-809,813-814,816-818,821-822,825,828-829,831,833,836


Expected results:
CPU map:        0-119

Additional info:
In tools/virsh-host.c: cmdNodeCpuMap
        char *str = virBitmapDataToString(cpumap, cpunum);
The second argument cpunum is in bit, but virBitmapDataToString requires
len in bytes.
Comment 2 Peter Krempa 2016-04-25 07:33:49 EDT
Fixed upstream:

commit 3a703b8120d9f996840bd315b6f74c45a7e98aad
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Mon Apr 25 10:38:01 2016 +0200

    virsh: host: Use bitmap size in bytes rather than bit count
Comment 4 Jingjing Shao 2016-08-19 22:20:56 EDT
verify this bug as below

# rpm -q libvirt
libvirt-2.0.0-4.el7.x86_64

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                240
On-line CPU(s) list:   0-239
Thread(s) per core:    2
Core(s) per socket:    15
Socket(s):             8
NUMA node(s):          8
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Model name:            Intel(R) Xeon(R) CPU E7-2890 v2 @ 2.80GHz
Stepping:              7
CPU MHz:               1237.687
BogoMIPS:              5600.56
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              38400K
NUMA node0 CPU(s):     0-14,120-134
NUMA node1 CPU(s):     15-29,135-149
NUMA node2 CPU(s):     30-44,150-164
NUMA node3 CPU(s):     45-59,165-179
NUMA node4 CPU(s):     60-74,180-194
NUMA node5 CPU(s):     75-89,195-209
NUMA node6 CPU(s):     90-104,210-224
NUMA node7 CPU(s):     105-119,225-239

# virsh nodecpumap --pretty
CPUs present:   240
CPUs online:    240
CPU map:        0-239

The result is as expected. so I change the status to verified
Comment 6 errata-xmlrpc 2016-11-03 14:43:44 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html

Note You need to log in before you can comment on or make changes to this bug.