Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.
Fixed upstream:
commit 3a703b8120d9f996840bd315b6f74c45a7e98aad
Author: Peter Krempa <pkrempa>
Date: Mon Apr 25 10:38:01 2016 +0200
virsh: host: Use bitmap size in bytes rather than bit count
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
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
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.