qemu/kvm network link dies as vhost loops/hangs

Issues related to applications and software problems
Post Reply
chrismaltby
Posts: 3
Joined: 2014/02/15 23:09:46

qemu/kvm network link dies as vhost loops/hangs

Post by chrismaltby » 2014/02/16 05:36:04

I have a qemu/kvm setup with 2 guests running Linux (el5) and Windows7. Both are using virtio drivers for disk and network. I have a bridged network which includes the office LAN and the two guests, and I am also using the default virbr0 bridge between the host and the linux guest.

Occasionally (usually a traffic spike), the virtual interface associated with the host-guest part of the bridge will hang, and the relevant vhost process goes into a cpu loop which lasts for 30mins or longer. Eventually it will exit the loop and the network will come back online. I can reproduce the problem by running rdiff-backup over ssh to back up the guest's filesystem to a host connected USB disk.

I am up to date with both el6 and el5 updates. Both are x64 systems. There is plenty of RAM and the system has dual Xeon 4-core CPUs.

chrismaltby
Posts: 3
Joined: 2014/02/15 23:09:46

Re: qemu/kvm network link dies as vhost loops/hangs

Post by chrismaltby » 2014/02/17 23:18:21

The problem is definitely in the vhost-net module. I restarted the Linux guest having tweaked the XML specification of the interface by inserting a driver name setting to force qemu to handle the network traffic in user space:

Code: Select all

<interface type='network'>
      <mac address='52:54:00:f3:29:76'/>
      <source network='default'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <driver name='qemu'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
I was able to complete the rdiff-backup dump of about 40GB with network transfer rates peaking at 20MB/s.

Any ideas on how to raise this issue with the developers?

Here are the installed versions of the kernel and qemu/kvm:

Code: Select all

qemu-kvm-0.12.1.2-2.415.el6_5.3.x86_64
qemu-img-0.12.1.2-2.415.el6_5.3.x86_64
libvirt-0.10.2-29.el6_5.3.x86_64
kernel-2.6.32-431.3.1.el6.x86_64

chrismaltby
Posts: 3
Joined: 2014/02/15 23:09:46

Re: qemu/kvm network link dies as vhost loops/hangs

Post by chrismaltby » 2014/02/24 06:10:59

Looks like this issue is related to this CentOS6 bug report 0005526: KVM Guest with virtio network loses network connectivity, which looks to me like a manifestation of this qemu-devel bug report and patch virtio: fix memory access races. Now to find out if it's made it into el6.5 :?:

Post Reply

Return to “CentOS 6 - Software Support”