Bug 509293
Summary: | virsh vol-key volname "Segmentation fault" | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alex Jia <ajia> | ||||
Component: | libvirt | Assignee: | Laine Stump <laine> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 5.4 | CC: | crobinso, hbrock, jialiu, veillard, virt-maint, xen-maint, yoyzhang | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-03-30 08:11:01 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: | |||||||
Attachments: |
|
Description
Alex Jia
2009-07-02 03:37:43 UTC
Reproduced the problem. Stack trace is: (gdb) bt #0 strcmp () at ../sysdeps/x86_64/strcmp.S:30 #1 0x000000000040580b in vshCommandOpt () at virsh.c:6512 #2 vshCommandOptString (cmd=<value optimized out>, name=0x0, found=0x7fff55862e84) at virsh.c:6547 #3 0x00000000004083b8 in vshCommandOptVolBy (ctl=0x7fff55863130, cmd=0x22319d0, optname=0x41600b "vol", pooloptname=0x0, name=0x0, flag=4) at virsh.c:6756 #4 0x00000000004085db in cmdVolKey (ctl=0x7fff55863130, cmd=0x22319d0) at virsh.c:4665 #5 0x0000000000411f47 in vshCommandRun (ctl=0x7fff55863130, cmd=0x22319d0) at virsh.c:6810 #6 0x00000000004130d6 in main (argc=3, argv=0x7fff55863288) at virsh.c:7763 Current language: auto; currently asm (gdb) Created attachment 377340 [details] patch to eliminate the segfault This bug has already been fixed upstream: http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=544cd630 A patch relative to libvirt-0.6.3 is attached. libvirt-0.6.3-24.el5 has been built in dist-5E-qu-candidate with the fixes Daniel segfault has been fixed,but still exist the following issues: 1.virsh vol-key voluuid? [root@dhcp-66-70-91 xml]# virsh help vol-key NAME vol-key - convert a vol UUID to vol key SYNOPSIS vol-key <vol> OPTIONS <vol> vol uuid I use uuidgen to generate a uuid,then editing it to volume xml file,such as: <volume> <name>virtimage</name> <uuid>192912a7-8e17-4d15-a90f-cd8792f90951</uuid> <key>/var/lib/libvirt/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>2210500608</allocation> <target> <path>/var/lib/libvirt/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume> and create successfully the volume from the xml into a existent nfspool,then I use "virsh vol-dumpxml" to check the vol information,but "uuid" is nonexistent. How I to use 'vol-key' option?after I tried the following operations,I list all pool met a error: [root@dhcp-66-70-91 xml]# virsh vol-key virtimage error: failed to get vol 'virtimage' error: this function is not supported by the hypervisor: virStorageVolLookupByPath [root@dhcp-66-70-91 xml]# virsh vol-key nfspool virtimage error: unexpected data 'virtimage' [root@dhcp-66-70-91 xml]# virsh vol-key /var/lib/libvirt/images/virtimage error: failed to get vol '/var/lib/libvirt/images/virtimage' error: this function is not supported by the hypervisor: virStorageVolLookupByPath [root@dhcp-66-70-91 xml]# virsh pool-list --all error: Failed to list active pools error: this function is not supported by the hypervisor: virConnectNumOfStoragePools additional information: [root@dhcp-66-70-91 xml]# virsh help pool-list NAME pool-list - list pools SYNOPSIS pool-list [--inactive] [--all] DESCRIPTION Returns list of pools. OPTIONS --inactive list inactive pools --all list inactive & active pools [root@dhcp-66-70-91 xml]# uname -a Linux dhcp-66-70-91.nay.redhat.com 2.6.18-164.el5xen #1 SMP Tue Aug 18 15:59:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-91 xml]# rpm -qa|grep libvirt libvirt-debuginfo-0.6.3-25.el5 libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 In fact,after issuing these virsh command,libvirt daemon is dead. [root@dhcp-66-70-91 xml]# service libvirtd status libvirtd dead but pid file exists Storage volumes are not identified by UUID, their unique element is 'key', listed in the XML. Trying to add a UUID element to the XML will be rightly ignored. But we should try to find the source of the libvirtd crash. How are you 'editing' the volume XML? Are you doing vol-dumpxml; <edit file>; vol-create? An exact sequence of steps of how you are getting the current crash would be helpful. 1) This is a separate issue from the original bug, and should be reported as a new BZ (with a link back to this one). If the original issue is solved, this bug should be closed. This will make it clear which patch is fixing which crash. 2) As Cole suggested, the exact sequence of commmands that got to the crash would be very useful. If it can be reproduced using a volume on a local disk, all the better. 3) In addition, if you can run libvirtd under gdb, and capture a stack trace when it crashes, that would also be very helpful. 1.Cole, I have provided 'editing' volume XML description,please see the above example section,and did virsh vol-dumpxml generating the result is the same to it(except don't exist uuid block).meanwhile did virsh vol-create also used the volume XML. In addition,I try to create a local dir type pool,but the issues can't be reproduced: [root@dhcp-66-70-91 libvirt]# virsh pool-create pool-dir.xml Pool dirpool created from pool-dir.xml [root@dhcp-66-70-91 libvirt]# virsh pool-list Name State Autostart ----------------------------------------- default active yes dirpool active no [root@dhcp-66-70-91 libvirt]# virsh vol-create dirpool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-91 libvirt]# virsh vol-list dirpool Name Path ----------------------------------------- virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh vol-key virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path [root@dhcp-66-70-91 libvirt]# virsh vol-key nfspool virtimage error: unexpected data 'virtimage' [root@dhcp-66-70-91 libvirt]# virsh vol-key /var/lib/libvirt/images/virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh pool-list --all Name State Autostart ----------------------------------------- dirpool active no [root@dhcp-66-70-91 libvirt]# service libvirtd status libvirtd (pid 26572) is running... 2.Laine,yup,you are right,I should report a new bug,and I think virsh vol-delete operation lead to libvirt daemon dead. BTW,I don't know why I haven't permission change bug status to verified. Verified this bug PASS with libvirt-0.6.3-29.el5 on RHEL5.5-Server-x86_64-kvm Verified this bug PASS with libvirt-0.6.3-31.el5 on RHEL5.5-Server-x86_64-kvm Verified this bug PASS with libvirt-0.6.3-31.el5 on RHEL5.5-Server-x86_64-xen An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0205.html |