RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 950855 - Libvirtd will be crashed while connect the hypervisor with the remote host and with the wrong qemu URI
Summary: Libvirtd will be crashed while connect the hypervisor with the remote host an...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-11 05:49 UTC by zhenfeng wang
Modified: 2014-06-18 00:49 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.0.5-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:15:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The gdb info about libvirtd crash (10.52 KB, text/plain)
2013-04-11 05:52 UTC, zhenfeng wang
no flags Details

Description zhenfeng wang 2013-04-11 05:49:44 UTC
Description of problem:
Libvirtd will be crashed while connect the hypervisor with the remote host and with the wrong qemu URI

Version-Release number of selected component (if applicable):
libvirt-1.0.4-1.el7.x86_64
qemu-kvm-1.4.0-2.el7.x86_64
kernel-3.9.0-0.rc3.44.el7.x86_64
How reproducible:
100%

Steps
1 Prepare two rhel7 host,HostA and HostB , then start the libvirtd service on the two hosts
2 Connect the hypervisor from HostA to HostB,the libvirtd service on HostB will be crashed
HostA# virsh -c qemu+ssh://xx.xx.xx.xx(HostB‘s ip)
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list --all
root.xx.xx's password:
error: failed to connect to the hypervisor
error: no valid connection
error: End of file while reading data: : Input/output error
virsh # list --all
root.xx.xx's password: 
error: failed to connect to the hypervisor
error: no valid connection
error: End of file while reading data: 2013/04/11 13:25:41 socat[25004] E connect(3, AF=1 "/var/run/libvirt/libvirt-sock", 31): Connection refused: Input/output error

3.Check the libvirtd service on the hostB
HostB# virsh list --all
error: failed to connect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

HostB# ps aux|grep libvirtd
root     23080  0.0  0.0 112632   916 pts/0    S+   11:24   0:00 grep --color=auto libvirtd
HostB# systemctl status libvirtd
libvirtd.service - Virtualization daemon
          Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
          Active: failed (Result: core-dump) since Thu 2013-04-11 11:23:56 CST; 22s ago
         Process: 22790 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=dumped, signal=SEGV)
          CGroup: name=systemd:/system/libvirtd.service
                  └─2585 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf

Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com libvirtd[22790]: 2013-04-11 03:23:56.207+000...
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com systemd[1]: libvirtd.service: main process ...V
Apr 11 11:23:56 intel-8400-8-1.englab.nay.redhat.com systemd[1]: Unit libvirtd.service entered f...e

4.Test this senario on two rhel6 hosts,the libvirtd won't be crashed, and it will report the following error
# virsh -c qemu+ssh://10.66.6.57
root.6.57's password:
error: internal error no QEMU URI path given, try qemu:///system
error: failed to connect to the hypervisor

5.Test this senario from rhel6 to rhel7 got the same result with step 3
6.Test this senario from rhel7 to rhel6 got the same result with step 4

Actual results:
The libvirtd crashed

Expected results:
The libvirtd shouldn't be crashed and should report an proper error

Comment 1 zhenfeng wang 2013-04-11 05:52:04 UTC
Created attachment 733993 [details]
The gdb info about libvirtd crash

Comment 3 Ján Tomko 2013-04-11 09:43:10 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-April/msg00857.html

Comment 4 Ján Tomko 2013-04-11 09:49:40 UTC
Fixed upstream by:
commit 74bff2509080912ea8abf1de8fd95fa2412b659a
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-04-11 11:37:25 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2013-04-11 11:41:22 +0200

    qemu: fix crash in qemuOpen
    
    If the path part of connection URI is not present, cfg is used
    unitialized.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=950855

Comment 5 zhe peng 2013-05-07 03:10:08 UTC
can reporduce with libvirt-1.0.4-1.el7.x86_64
verify with build:
libvirt-1.0.5-1.el7.x86_64

step:
1 Prepare two rhel7 host,HostA and HostB , then start the libvirtd service on the two hosts
2 Connect the hypervisor from HostA to HostB.
# virsh -c qemu+ssh://10.66.71.219
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list --all
The authenticity of host '10.66.71.219 (10.66.71.219)' can't be established.
RSA key fingerprint is b6:3d:90:68:cf:11:39:67:12:68:16:09:3b:76:4e:48.
Are you sure you want to continue connecting (yes/no)? yes
root.71.219's password: 
error: failed to connect to the hypervisor
error: no valid connection
error: internal error no QEMU URI path given, try qemu:///system

virsh # list --all
root.71.219's password: 
error: failed to connect to the hypervisor
error: no valid connection
error: internal error no QEMU URI path given, try qemu:///system

check hostB libvirt:
#systemctl status libvirtd
libvirtd.service - Virtualization daemon
	  Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
	  Active: active (running) since Tue 2013-05-07 05:24:24 EDT; 2min 32s ago
	Main PID: 18748 (libvirtd)
	  CGroup: name=systemd:/system/libvirtd.service
		  ├─ 1407 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf
		  ├─11038 /usr/libexec/qemu-kvm -name win7 -S -M pc-i440fx-1.4 -m 2048 -smp 4,sockets=4,cores=1,threads=1 -uuid 8a66c9e4-78d7-7...
		  ├─13194 /usr/libexec/qemu-kvm -name demo1 -S -M pc-i440fx-1.4 -m 512 -smp 1,sockets=1,cores=1,threads=1 -uuid f7844589-5ec4-2...
		  ├─18708 /usr/libexec/qemu-kvm -name bb -S -machine pc-1.3,accel=kvm,usb=off -m 512 -smp 1,sockets=1,cores=1,threads=1 -uuid 3...
		  └─18748 /usr/sbin/libvirtd

libvirtd not crash. verification passed.

Comment 6 Ludek Smid 2014-06-13 10:15:56 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.