Bug 975359 - libvirtd crash when destroy one guest with floor setting and remove bandwidth setting from network
libvirtd crash when destroy one guest with floor setting and remove bandwidt...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 04:51 EDT by hongming
Modified: 2014-06-17 20:51 EDT (History)
5 users (show)

See Also:
Fixed In Version: libvirt-1.1.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:43:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
libvirtd debug log (38.39 KB, application/x-gzip)
2013-06-18 04:51 EDT, hongming
no flags Details

  None (edit)
Description hongming 2013-06-18 04:51:07 EDT
Created attachment 762418 [details]
libvirtd debug log

Description of problem:
When remove the bandwidth settings from network then restart it , destroy one guest with floor attribute ,  libvirtd will crash. 

Version-Release number of selected component (if applicable):
libvirt-1.0.6-1.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64
kernel-3.10.0-0.rc4.59.el7.x86_64 

How reproducible:
100%

Steps to Reproduce:
# virsh net-dumpxml default
<network connections='1'>
  <name>default</name>
  <uuid>16965c76-4dc7-40ae-9fb5-201761bca504</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:af:87:36'/>
  <bandwidth>
    <inbound average='4000' peak='5000' burst='1000'/>
    <outbound average='4000' peak='5000' burst='1000'/>
  </bandwidth>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

# virsh dumpxml rhel7|grep bandwidth -A 5
      <bandwidth>
        <inbound average='1000' peak='1000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
     ......

Remove the bandwidth part from network .
# virsh net-edit default
Network default XML configuration edited.

# virsh net-destroy default
Network default destroyed

# virsh net-start default
Network default started


# virsh destroy rhel7
error: Failed to destroy domain rhel7
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Failed to reconnect to the hypervisor 

Actual results:
libvirtd crash 

Expected results:
Throw exception

Additional info:
Comment 2 Ján Tomko 2013-06-21 13:31:33 EDT
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-June/msg00917.html
Comment 3 Ján Tomko 2013-06-27 06:17:47 EDT
Now fixed upstream:
commit 658c932ab4aec2222b0ce3840a96748e73b39b3f
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-06-21 19:20:31 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-06-27 12:11:42 +0200

    bridge: don't crash on bandwidth unplug with no bandwidth
    
    If networkUnplugBandwidth is called on a network which has
    no bandwidth defined, print a warning instead of crashing.
    
    This can happen when destroying a domain with bandwidth if
    bandwidth was removed from the network after the domain was
    started.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=975359

git describe: v1.1.0-rc1-29-g658c932
Comment 4 hongming 2013-07-03 05:28:42 EDT
Verify it as follows. The result is expected. 

# rpm -q libvirt
libvirt-1.1.0-1.el7.x86_64

# virsh net-dumpxml default
<network connections='1'>
  <name>default</name>
  <uuid>16965c76-4dc7-40ae-9fb5-201761bca504</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:af:87:36'/>
  <bandwidth>
    <inbound average='8000' peak='10000' burst='1024'/>
    <outbound average='8000' peak='10000' burst='1024'/>
  </bandwidth>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

# virsh dumpxml rhel7-1|grep bandwidth -A 2
      <bandwidth>
        <inbound average='2000' peak='2000' floor='2000' burst='1024'/>
        <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>


# virsh net-edit default
Network default XML configuration edited.

# virsh net-destroy default
Network default destroyed

# virsh net-start default
Network default started

# virsh list
 Id    Name                           State
----------------------------------------------------
 6     rhel7-1                        running

# virsh destroy rhel7-1
Domain rhel7-1 destroyed

# virsh start rhel7-1
error: Failed to start domain rhel7-1
error: Operation not supported: Invalid use of 'floor' on interface with MAC address 52:54:00:3f:f0:2e - network 'default' has no inbound QoS set
Comment 5 Ludek Smid 2014-06-13 05:43:35 EDT
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.