Red Hat Bugzilla – Bug 1329819
virsh nodecpumap --pretty shows wrong result on machine with many cores
Last modified: 2016-11-03 14:43:44 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.
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
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