[libvirt] Disconnected from qemu, keepalive timeout

Martin Kletzander mkletzan at redhat.com
Thu Jul 14 07:34:33 UTC 2016


On Thu, Jul 14, 2016 at 06:11:48AM +0000, Nir Levy wrote:
>Thanks you,
>
>Yes, indeed after virsh start.
>That's will surely help.
>
>I am really struggling to understand how eventually the libvirt is managing the qemu via its fd's
>I can see that virsh is launching qemu right after:
>execve(binary, cmd->args, cmd->env);
>

Beware that virsh is not starting the qemu process, but libvirtd is.

>I have grasp too that libvirtd is communicate with the qemu through.
>virCgroupSetValueStr (group=0x7fb87400cd10, controller=0, key=0x7fb8b4377bbb "tasks", value=0x7fb874008170 "6909") at util/vircgroup.c:751
>5: value = 0x7fb874008170 "6909"
>1: keypath = 0x7fb87400ecd0 "/sys/fs/cgroup/cpu,cpuacct/machine/VBS2.libvirt-qemu/vcpu0/tasks"
>
>Where value is the thread running the VCPU.
>Thread 0x7fa684833700 (LWP 6909) "qemu-system-x86" pthread_cond_wait@@GLIBC_2.3.2 ()
>
>Another example is setting the env parameter.
>virCgroupSetValueStr (group=0x7fb87400cd10, controller=2, key=0x7fb8b43779eb "cpuset.cpus", value=0x7fb874010dd0 "0-15") at util/vircgroup.c:751
>5: value = 0x7fb874010dd0 "0-15"
>1: keypath = 0x7fb87400ecd0 "/sys/fs/cgroup/cpuset/machine/VBS2.libvirt-qemu/vcpu0/cpuset.cpus"
>
>I have failed to get Cgroup idea
>And to actually see my event being traced.
>

I probably can't help you with the tracing, though, sorry.

Maybe try creating a wrapper for the qemu binary that just execs it with
gdbserver and you connect to it.  Or I'm just missing what you're trying
to accomplish.

>Thanks for your quick response.
>Very appreciated.
>
>Regards,
>Nir
>
>-----Original Message-----
>From: Martin Kletzander [mailto:mkletzan at redhat.com]
>Sent: Thursday, July 14, 2016 9:00 AM
>To: Nir Levy <nirl at asocsnetworks.com>
>Cc: libvir-list at redhat.com; veillard at redhat.com
>Subject: Re: [libvirt] Disconnected from qemu, keepalive timeout
>
>On Wed, Jul 13, 2016 at 03:47:37PM +0000, Nir Levy wrote:
>>Hello Guys,
>>
>>Thanks for reading this,
>>I have compiled libvirt and qemu over fedora 22 for using debug information and no opt ("-g3 -O0").
>>I am investigating the xml feature
>>  <qemu:commandline>
>>    <qemu:arg value='-trace'/>
>>    <qemu:arg value='events=/home/qemu_traced_symbols'/>
>>  </qemu:commandline>
>>
>>qemu_traced_symbols includes all qemu traced symbols.
>>
>>I have used:
>>catch syscall clone
>>set follow-fork-mode child
>>set detach-on-fork off
>>
>>and debugged the child
>>so after libvirt start VM2 wanted to debug the parameters (cmd->args,
>>which indeed includes -trace and  events=/home/qemu_traced_symbols I have debugged the the child after spawning.
>>And returned for the parent (using gdb inferior 1) for debugging the
>>virCommandHandshakeWait (with the args)
>>
>>but I keep getting
>>error: Disconnected from qemu:///system due to keepalive timeout grep @
>>libvirt-1.2.21/ shows no code only change log.
>>
>
>You are getting this from the 'virsh start $domain' command, right?
>
>>Can you please help me resolve this issue?
>>How do those args are passed, is it via JSON?
>>
>
>For your use case you really want to disable the keepalive by using -k0 parameter for virsh, so it will become 'virsh -k0 start $domain'
>
>>Kind regards,
>>Nir Levy
>>SW Engineer
>>
>>Web: www.asocstech.com<http://www.asocstech.com/> |
>>[cid:image001.jpg at 01D1B599.5A2C9530]
>>
>
>
>
>>--
>>libvir-list mailing list
>>libvir-list at redhat.com
>>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160714/fb73115d/attachment-0001.sig>


More information about the libvir-list mailing list