Bug 882831
Summary: | virsh cpu-stats return cpuacct parse error with --start option | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yanbing du <ydu> |
Component: | libvirt | Assignee: | Gunannan Ren <gren> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | cwei, dallan, dyuan, gsun, honzhang, mzhan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.0.3-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 11:23:55 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yanbing du
2012-12-03 08:16:42 UTC
patch sent to upstream https://www.redhat.com/archives/libvir-list/2013-February/msg01101.html commit 091831633f91009379ff9daf2dc98f917aefa12f Author: Guannan Ren <gren> Date: Wed Feb 20 19:28:13 2013 +0800 qemu: fix an off-by-one error in qemuDomainGetPercpuStats The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which leads to the off-by-one error in the following for loop. # virsh cpu-stats guest --start 1 error: Failed to virDomainGetCPUStats() error: internal error cpuacct parse error pkgs: libvirt-1.0.3-1.el7.x86_64 qemu-kvm-1.3.0-5.el7.x86_64 kernel-3.8.0-0.38.el7.x86_64 steps: # for i in {0..16}; do echo "############## "$i" #############"; virsh cpu-stats demo --start $i; done ############## 0 ############# CPU0: cpu_time 10.750013952 seconds vcpu_time 0.153921391 seconds CPU1: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU2: cpu_time 0.002319220 seconds vcpu_time 0.001678261 seconds CPU3: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU4: cpu_time 67.009878738 seconds vcpu_time 67.009878738 seconds CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 1 ############# CPU1: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU2: cpu_time 0.002319220 seconds vcpu_time 0.001678261 seconds CPU3: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU4: cpu_time 67.009969579 seconds vcpu_time 67.009969579 seconds CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 2 ############# CPU2: cpu_time 0.002319220 seconds vcpu_time 0.001678261 seconds CPU3: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU4: cpu_time 67.009969579 seconds vcpu_time 67.009969579 seconds CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 3 ############# CPU3: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds CPU4: cpu_time 67.009969579 seconds vcpu_time 67.009969579 seconds CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 4 ############# CPU4: cpu_time 67.010042288 seconds vcpu_time 67.010042288 seconds CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 5 ############# CPU5: cpu_time 0.000966815 seconds vcpu_time 0.000921314 seconds CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 6 ############# CPU6: cpu_time 0.002436784 seconds vcpu_time 0.000350037 seconds CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 7 ############# CPU7: cpu_time 0.021225485 seconds vcpu_time 0.000000000 seconds CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 8 ############# CPU8: cpu_time 1.886871216 seconds vcpu_time 1.886256420 seconds CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 9 ############# CPU9: cpu_time 0.026243930 seconds vcpu_time 0.000000000 seconds CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 10 ############# CPU10: cpu_time 0.000562834 seconds vcpu_time 0.000000000 seconds CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 11 ############# CPU11: cpu_time 0.000080018 seconds vcpu_time 0.000000000 seconds CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 12 ############# CPU12: cpu_time 1.029686845 seconds vcpu_time 1.029035864 seconds CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 13 ############# CPU13: cpu_time 0.028028862 seconds vcpu_time 0.000000000 seconds CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 14 ############# CPU14: cpu_time 0.000328048 seconds vcpu_time 0.000000000 seconds CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 15 ############# CPU15: cpu_time 0.000000000 seconds vcpu_time 0.000000000 seconds ############## 16 ############# also reproduced on libvirt-1.0.2-1.el7.x86_64, so this is fixed. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |