Bug 921387
| Summary: | libvirtd crashes when deleting logical storage pool | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Brian Kruger <bek> | ||||||
| Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 6.4 | CC: | acathrow, chhu, cwei, dallan, dyuan, jdenemar, lnovich, mkletzan, mzhan, zpeng | ||||||
| Target Milestone: | rc | Keywords: | Upstream | ||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | libvirt-0.10.2-19.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: |
Cause: There was invalid use-after-free in logical storage backed.
Consequence: Sometimes, when deleting logical storage pool, the daemon crashed.
Fix: The pointer was cleared after free'd.
Result: Deleting logical volumes works correctly.
|
Story Points: | --- | ||||||
| Clone Of: | |||||||||
| : | 921480 (view as bug list) | Environment: | |||||||
| Last Closed: | 2013-11-21 08:50:34 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: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 921480 | ||||||||
| Attachments: |
|
||||||||
|
Description
Brian Kruger
2013-03-14 05:44:16 UTC
There are two issues here. First one is that virt-install tries to create a sparse logical volume (which is not a good idea since it won't work out of the box) and I'll clone this bug to virt-install to solve it. The other issue is a libvirt bug causing libvirtd to crash when you try to delete the pool. Hello, step 4 doesn't make sense for me. Are you trying to create a VG on an LV and missed 'pvcreate /dev/sys/vg001' command between steps 3 and 4? Thanks for the clarification. With OS install, we have it automated to allocate X amount to each slice (/, /var, /home, etc...) on install. /home is done last and the remaineder is done then. The script I have, resizes /home down to $SIZE (50 gigs) and leaves the rest for allocation to a LVM slice for VM Guest usage. No pvcreate is done since /home was already part of a LVM and space was just given back and can be used for whatever from what I understand. (another slice, snapshots, etc). This procedure does work with 0.9.* and below. If you have an alternate suggestion I would be happy to try it. Could you try this with libvirt-0.10.2-18.el6_4.2 ? Libvirt shouldn't fail, however, the volume will be only one extent in size. If this is true, the fix is on its way. But if it still fails, there is another problem. Thanks for checking that. Created attachment 915683 [details]
Comment
(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).
Moving to POST:
commit 2d73f2120f2073bff9e311626f6b6febcfc1e290
Author: Martin Kletzander <mkletzan>
Date: Thu Mar 28 16:36:50 2013 +0100
storage: Avoid double virCommandFree in virStorageBackendLogicalDeletePool
According to comment1, try to verify the issue: "libvirt bug causing libvirtd to crash when you try to delete the pool." For the issue: "virt-install tries to create a sparse logical volume (which is not a good idea since it won't work out of the box)", will be verified in the cloned bug ? Reproduce with libvirt-0.10.2-18.el6.x86_64. Verified with the packages: libvirt-0.10.2-19.el6.x86_64 Test steps: 1. cd /tmp 2. #yes| sudo lvreduce --size 30G --resizefs --force /dev/mapper/vg_intelq8200novt86-lv_home 3. #lvcreate vg_intelq8200novt86 -n vg001 -l 100%FREE Logical volume "vg001" created 4. #vgcreate vg001 /dev/vg_intelq8200novt86/vg001 Volume group "vg001" successfully created 5. #service libvirtd restart 6. #virsh pool-define-as --name vg001 --type logical --target /dev/vg001 Pool vg001 defined 7. #virsh pool-start vg001 Pool vg001 started 8. #virsh pool-autostart vg001 Pool vg001 marked as autostarted # virsh pool-list --all Name State Autostart ----------------------------------------- default active yes vg001 active yes 9. #virt-install --name testhost --ram 1024 --disk pool=vg001,size=10 --boot network,hd,menu=on --graphics none --network network=default,mac=52:54:00:15:15:4A --vcpus 2 --os-variant=rhel6 --location http://rhel6-url ---------------------------------------------------------------------- Starting install... Retrieving file .treeinfo... | 3.5 kB 00:00 ... Retrieving file file vmlinuz... | 7.7 MB 00:00 ... Retrieving file initrd.img... | 60 MB 00:00 ... Allocating 'testhost1.img' | 10 GB 00:00 Creating domain... | 0 B 00:00 Connected to domain testhost1 Escape character is ^] Didn't met error below: --------------------------------------------------------------------- internal error Child process (/sbin/lvchange -aln vg001/testhost.img) unexpected exit status 5: One or more specified logical volume(s) not found. -------------------------------------------------------------------- Then stop the installation programe. Remove pool: 1. # virsh pool-destroy vg001 Pool vg001 destroyed 2. # virsh pool-delete vg001 Pool vg001 deleted 3. # service libvirtd status libvirtd (pid 9430) is running... 4. check the log:/var/log/libvirt/libvirtd.log, no libvirtd segfaults. 5. # virsh pool-undefine vg001 Pool vg001 has been undefined Test results: After running pool-delete, libvirtd is still running, without crash. Command work well. Yes, the virt-install part will be verified in the virt-install bug. 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/RHBA-2013-1581.html |