RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 975359 - libvirtd crash when destroy one guest with floor setting and remove bandwidth setting from network
Summary: libvirtd crash when destroy one guest with floor setting and remove bandwidt...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-18 08:51 UTC by hongming
Modified: 2014-06-18 00:51 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.1.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:43:35 UTC
Target Upstream Version:
Embargoed:


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

Description hongming 2013-06-18 08:51:07 UTC
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 17:31:33 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-June/msg00917.html

Comment 3 Ján Tomko 2013-06-27 10:17:47 UTC
Now fixed upstream:
commit 658c932ab4aec2222b0ce3840a96748e73b39b3f
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-06-21 19:20:31 +0200
Commit:     Ján Tomko <jtomko>
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 09:28:42 UTC
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 09:43:35 UTC
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.