Bug 723912

Summary: [libvirt] libvirtd crash when migrating domain to unreachable destination.
Product: Red Hat Enterprise Linux 6 Reporter: David Naori <dnaori>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: berrange, rwu, weizhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 14:30:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Naori 2011-07-21 14:28:04 UTC
Description of problem:
when migrating domain to unreachable destination - libvirtd crash. 

reproduce steps:
1)run qemu-kvm domain,
2)try do migrating to unreachable destenation.
virsh migrate 2 --live --p2p qemu+tls://1.1.1.1


#0  __pthread_mutex_lock (mutex=0x8) at pthread_mutex_lock.c:50
#1  0x00000034c76de905 in virNetClientLock (client=0x0) at rpc/virnetclient.c:99
#2  virNetClientClose (client=0x0) at rpc/virnetclient.c:273
#3  0x00000034c76d0a0b in doRemoteOpen (conn=0x7f62cc0cb070, priv=0x7f62cc0f8bb0, auth=0x0, flags=0) at remote/remote_driver.c:686
#4  0x00000034c76d24f0 in remoteOpen (conn=0x7f62cc0cb070, auth=0x0, flags=<value optimized out>) at remote/remote_driver.c:801
#5  0x00000034c76a69c5 in do_open (name=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system", auth=0x0, flags=0) at libvirt.c:1054
#6  0x00000034c76a7606 in virConnectOpen (name=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system") at libvirt.c:1208
#7  0x00000000004821b0 in doPeer2PeerMigrate (driver=0x7f62cc011d00, conn=0x7f62c0000af0, vm=0x7f62c400fb00, xmlin=0x0, dconnuri=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system", uri=0x0, cookiein=0x0, cookieinlen=0, 
    cookieout=0x7f62d5081b80, cookieoutlen=0x7f62d5081b8c, flags=3, dname=0x0, resource=0, v3proto=true) at qemu/qemu_migration.c:2213
#8  qemuMigrationPerform (driver=0x7f62cc011d00, conn=0x7f62c0000af0, vm=0x7f62c400fb00, xmlin=0x0, dconnuri=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system", uri=0x0, cookiein=0x0, cookieinlen=0, 
    cookieout=0x7f62d5081b80, cookieoutlen=0x7f62d5081b8c, flags=3, dname=0x0, resource=0, v3proto=true) at qemu/qemu_migration.c:2321
#9  0x0000000000449e13 in qemuDomainMigratePerform3 (dom=0x7f62cc0f88b0, xmlin=0x0, cookiein=<value optimized out>, cookieinlen=0, cookieout=0x7f62d5081b80, cookieoutlen=0x7f62d5081b8c, 
    dconnuri=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system", uri=0x0, flags=3, dname=0x0, resource=0) at qemu/qemu_driver.c:7010
#10 0x00000034c76aeb14 in virDomainMigratePerform3 (domain=0x7f62cc0f88b0, xmlin=0x0, cookiein=0x0, cookieinlen=<value optimized out>, cookieout=<value optimized out>, cookieoutlen=0x7f62d5081b8c, 
    dconnuri=0x7f62cc0caa20 "qemu+tls://camel-vdsc.qa.lab.tlv.redhat.com/system", uri=0x0, flags=3, dname=0x0, bandwidth=0) at libvirt.c:5162
#11 0x000000000041fd02 in remoteDispatchDomainMigratePerform3 (server=<value optimized out>, client=<value optimized out>, hdr=<value optimized out>, rerr=0x7f62d5081c10, args=<value optimized out>, ret=0x7f62cc0dd590) at remote.c:2789
#12 remoteDispatchDomainMigratePerform3Helper (server=<value optimized out>, client=<value optimized out>, hdr=<value optimized out>, rerr=0x7f62d5081c10, args=<value optimized out>, ret=0x7f62cc0dd590) at remote_dispatch.h:2700
#13 0x000000000043ad6e in virNetServerProgramDispatchCall (prog=0x110a420, server=0x1109ae0, client=0x112ff80, msg=0x11937e0) at rpc/virnetserverprogram.c:375
#14 virNetServerProgramDispatch (prog=0x110a420, server=0x1109ae0, client=0x112ff80, msg=0x11937e0) at rpc/virnetserverprogram.c:252
#15 0x000000000043d5c1 in virNetServerHandleJob (jobOpaque=<value optimized out>, opaque=0x1109ae0) at rpc/virnetserver.c:150
#16 0x00000034c764ef3a in virThreadPoolWorker (opaque=0x1109bd0) at util/threadpool.c:98
#17 0x00000034c764e9a2 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:157
#18 0x00000039f20077e1 in start_thread (arg=0x7f62d5082700) at pthread_create.c:301
#19 0x00000039f18e68ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Version-Release number of selected component (if applicable):
libvirt-0.9.3-7.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Berrangé 2011-07-21 14:30:38 UTC
This is just another case of 723843. The source libvirtd process is a *client* of the target libvirtd here, so hitting the same piece of the RPC code as virsh did.

*** This bug has been marked as a duplicate of bug 723843 ***