Red Hat Bugzilla – Bug 842208
"Segmentation fault" when use virsh command with vdsm installed
Last modified: 2013-02-21 02:19:25 EST
Description of problem: "Segmentation fault" when use virsh list with vdsm Version-Release number of selected component (if applicable): # rpm -qa libvirt kernel qemu-kvm-rhev vdsm spice-server kernel-2.6.32-280.el6.x86_64 spice-server-0.10.1-10.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.297.el6_3.x86_64 libvirt-0.9.13-3.el6.x86_64 vdsm-4.9.6-21.0.el6_3.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare a host registering to rhevm 2. Install a vm use rhevm in the host 3. Set up a Certificate Authority (CA) 1) # certtool --generate-privkey > cakey.pem 2) self-sign cakey.pem by creating a file with the signature details called ca.info containing: cn = 10.66.93.59 ca cert_signing_key 3) # certtool --generate-self-signed --load-privkey cakey.pem --template ca.info --outfile cacert.pem 4. Create vdsm certificates 1) certtool --generate-privkey > vdsmkey.pem 2) sign that key with the CA's private key by first creating a template file called vdsm.info organization = Red Hat cn = 10.66.93.59 tls_www_server encryption_key signing_key 3) # certtool --generate-certificate --load-privkey vdsmkey.pem --load-ca-certificate cacert.pem --load-ca-privkey cakey.pem --template vdsm.info --outfile vdsmcert.pem 5. # cat /etc/libvirt/qemu.conf dynamic_ownership=0 # by vdsm spice_tls=1 # by vdsm spice_tls_x509_cert_dir="/etc/pki/vdsm/libvirt-spice" # by vdsm 6. # cat /etc/sysconfig/libvirtd LIBVIRTD_ARGS=--listen # by vdsm DAEMON_COREFILE_LIMIT=unlimited # by vdsm 7.#cat /etc/libvirt/libvirtd.conf listen_addr="0.0.0.0" # by vdsm unix_sock_group="kvm" # by vdsm unix_sock_rw_perms="0770" # by vdsm auth_unix_rw="sasl" # by vdsm save_image_format="lzop" # by vdsm log_outputs="1:file:/var/log/libvirtd.log" # by vdsm log_filters="1:libvirt 3:event 3:json 1:util 1:qemu" # by vdsm ca_file="/etc/pki/vdsm/certs/cacert.pem" # by vdsm cert_file="/etc/pki/vdsm/certs/vdsmcert.pem" # by vdsm key_file="/etc/pki/vdsm/keys/vdsmkey.pem" # by vdsm (Note: make sure all the *.pem files should be existed in the corresponding dirs, refer to the setup steps to generate the pem file) 8. # initctl restart libvirtd 9. # echo redhat | saslpasswd2 -p -a libvirt test 10. # virsh list --all or other virsh commands Actual results: Segmentation fault Expect result: Give "Please enter your authentication name: Please enter your password: " if input right name and password, virsh commands will work well. additional : libvirt-0.9.10-21.el6_3.3 works well, so should be set as regression. and I cat the debug info in libvirtd.log like: # cat /var/log/libvirtd.log 2012-07-23 05:28:22.891+0000: 23258: debug : virDomainInterfaceStats:7186 : dom=0x7fc4100c08d0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c), path=vnet0, stats=0x7fc431e1db00, size=64 2012-07-23 05:28:22.892+0000: 23258: debug : virDomainFree:2261 : dom=0x7fc4100c08d0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c) 2012-07-23 05:28:27.893+0000: 23256: debug : virDomainGetInfo:4181 : dom=0x7fc418000aa0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c), info=0x7fc43321fb10 2012-07-23 05:28:27.893+0000: 23256: debug : qemudGetProcessInfo:1178 : Got status for 15631/0 user=1491 sys=1360 cpu=0 rss=122245 2012-07-23 05:28:27.893+0000: 23256: debug : virDomainFree:2261 : dom=0x7fc418000aa0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c) 2012-07-23 05:28:27.894+0000: 23257: debug : virDomainInterfaceStats:7186 : dom=0x7fc41c0020a0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c), path=vnet0, stats=0x7fc43281eb00, size=64 2012-07-23 05:28:27.894+0000: 23257: debug : virDomainFree:2261 : dom=0x7fc41c0020a0, (VM: name=qe-com, uuid=f01d2507-c798-4b68-b9f7-466b09c9fe6c) 2012-07-23 05:28:28.457+0000: 23251: error : virNetSocketReadWire:1003 : End of file while reading data: Input/output error 2012-07-23 05:28:28.457+0000: 23251: debug : virFileClose:70 : Closed fd 25
Not every new crash is a regression. Removing the keyword.
Patches has been posted upstream: https://www.redhat.com/archives/libvir-list/2012-July/msg01234.html
Patches have been commited upstream, moving to POST: commit 5eef74320b0bb9e604400168e0896c5ac527abef Author: Martin Kletzander <mkletzan@redhat.com> Date: Tue Jul 24 16:08:46 2012 +0200 fixed SegFault in virauth
Verified with libvirt-0.10.0-0rc0.el6: As steps in Description: # virsh list --all Please enter your authentication name: test Please enter your password: Id Name State ---------------------------------------------------- 1 install running # virsh dumpxml install Please enter your authentication name: test Please enter your password: <domain type='kvm' id='1'> <name>install</name> <uuid>4953872c-f24d-4a42-beda-91f9a05b6cd6</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>1</vcpu> <cputune> <shares>1020</shares> </cputune> ..... virsh commands work well, no "Segmentation fault". So setting 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. http://rhn.redhat.com/errata/RHSA-2013-0276.html