[libvirt] Run libvirtd from git: virsh hangs

Daniel P. Berrangé berrange at redhat.com
Thu Apr 5 15:15:58 UTC 2018


On Thu, Apr 05, 2018 at 06:11:44PM +0300, Mathieu Tarral wrote:
> > You can enable debugging for virsh too:
> >
> > LIBVIRT_DEBUG=1 ./tools/virsh list --all
> >
> > Alternatively, you can run the libvirtd under strace to see if it
> > accepts() the connection request. Seems like virsh is trying to connect
> > to a different socket than libvirtd is listening to.
> 
> I can see the socket being created by libvirtd in /var/run/libvirt/libvirt-sock.
> 
> And as i start virsh (the system one) as root, it tries to open a
> connection to 'qemu:///system'
> 
> Now, i tried to monitor what virsh was trying to do with strace, as
> you suggested, using
> sudo strace -v -y -yy -s 4096 virsh list --all
> 
> connect(5<UNIX:[16655541]>, {sa_family=AF_UNIX,

> You can see that it successfully connects to the libvirt.sock, and
> then it polls on the socket (5).

That'll be waiting for a response from libvirtd I presume

> 
> So i tried to strace libvirtd too:

[snip]

strace isn't very helpful for debugging hangs - better to connect to
libvirtd with GDB and get a stack trace of all threads, using

  (gdb)  thread apply all bt

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list