Bug 1091206
| Summary: | libvirtd crashed after hot-unplug the vcpus which is pinned to host cpus | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Kurik <jkurik> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.6 | CC: | acathrow, dallan, dyuan, eblake, gsun, honzhang, jdenemar, jtomko, mtessun, mzhan, pm-eus, tdosek, xuzhang |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.10.2-29.el6_5.8 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: When unplugging a virtual CPU, libvirt kept a pointer
to freed memory if the CPU was pinned.
Consequence: The daemon crashed when it tried to access this memory.
Fix: Remove the pointer after the memory is freed.
Result: Reading pinning information after unplugging a CPU does not lead to a crash anymore.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-05-27 16:27:07 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1088165 | ||
| Bug Blocks: | |||
|
Description
Jan Kurik
2014-04-25 08:18:19 UTC
Verify this bug with the following package version, it is fixed.
Packages version:
libvirt-0.10.2-29.el6_5.8.x86_64
qemu-kvm-0.12.1.2-2.415.el6_5.9.x86_64
kernel-2.6.32-431.20.2.el6.x86_64
Steps:
1. start one, guest, which contains 2 vcpus.
# virsh start rhel6.5
Domain rhel6.5 started
# virsh dumpxml rhel6.5|grep cpu
<vcpu placement='static' current='2'>4</vcpu>
2. pin the 2nd vcpu to host cpus
# virsh vcpupin rhel6.5 1 0,3
# virsh dumpxml rhel6.5|grep cpu
<vcpu placement='static' current='2'>4</vcpu>
<cputune>
<vcpupin vcpu='1' cpuset='0,3'/>
</cputune>
3. hot-unplug the last vcpu from guest
# virsh setvcpus rhel6.5 1
# virsh dumpxml rhel6.5|grep cpu
<vcpu placement='static' current='1'>4</vcpu>
4. check the libvirtd service status, it is working well. No dead.
# service libvirtd status
libvirtd (pid 2272) is running...
(In reply to Zhang Xuesong from comment #8) > Verify this bug with the following package version, it is fixed. > > Packages version: > libvirt-0.10.2-29.el6_5.8.x86_64 > qemu-kvm-0.12.1.2-2.415.el6_5.9.x86_64 > kernel-2.6.32-431.20.2.el6.x86_64 > > > Steps: > 1. start one, guest, which contains 2 vcpus. > # virsh start rhel6.5 > Domain rhel6.5 started > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='2'>4</vcpu> > > 2. pin the 2nd vcpu to host cpus > # virsh vcpupin rhel6.5 1 0,3 > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='2'>4</vcpu> > <cputune> > <vcpupin vcpu='1' cpuset='0,3'/> > </cputune> > Checking in the guest, and make sure the vcpu number in guest is right. Login the guest, and check the vcpuinfo, # cat /proc/cpuinfo |grep processor |wc -l 2 > 3. hot-unplug the last vcpu from guest > # virsh setvcpus rhel6.5 1 > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='1'>4</vcpu> After hot-unplug. login the guest, and check the vcpuinfo, # cat /proc/cpuinfo |grep processor |wc -l 1 > > 4. check the libvirtd service status, it is working well. No dead. > # service libvirtd status > libvirtd (pid 2272) is running... Ad-hoc testing some other related testing, all of them are working well: 1. check the cpu-stats, vcpuinfo, vcpupin, vcpucount, all of them are working well. # virsh cpu-stats rhel6.5 CPU0: cpu_time 17.710181082 seconds vcpu_time 12.951564011 seconds CPU1: cpu_time 8.207106669 seconds vcpu_time 2.712824892 seconds CPU2: cpu_time 16.484833647 seconds vcpu_time 8.101443002 seconds CPU3: cpu_time 10.336857805 seconds vcpu_time 5.647272634 seconds Total: cpu_time 52.738979203 seconds user_time 3.550000000 seconds system_time 17.980000000 seconds # virsh vcpuinfo rhel6.5 VCPU: 0 CPU: 2 State: running CPU time: 29.4s CPU Affinity: yyyy # virsh vcpupin rhel6.5 VCPU: CPU Affinity ---------------------------------- 0: 0-3 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 1 2. Hot-plug vcpus, the vcpu number in vcpucount is working well. # virsh setvcpus rhel6.5 2 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 2 3. check in the guest, the vcpu number is increased as expected. # cat /proc/cpuinfo |grep processor |wc -l 2 4. hot-unplug vcpus, the vcpu number in vcpucount is working well. # virsh setvcpus rhel6.5 1 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 1 5. check in the guest, the vcpu number is decreased as expected. # cat /proc/cpuinfo |grep processor |wc -l 1 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. http://rhn.redhat.com/errata/RHSA-2014-0560.html |