Bug 698197 - 'Out of memory' error from libvirt on bad xml
Summary: 'Out of memory' error from libvirt on bad xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-20 12:15 UTC by zhanghaiyan
Modified: 2011-12-06 11:05 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:05:47 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description zhanghaiyan 2011-04-20 12:15:58 UTC
Description of problem:
'Out of memory' error from libvirt on bad xml

Version-Release number of selected component (if applicable):
- libvirt-0.8.7-18.el6.x86_64
- kernel-2.6.32-131.0.1.el6.x86_64
- qemu-kvm-0.12.1.2-2.158.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Add the following xml to a shutoff guest
    <controller type='scsi' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x1'/>
    </controller>
Note: slot 0x09 is an unused slot
2. # virsh start rhel5
error: Failed to start domain rhel5
error: out of memory
  
Actual results:
report misleading error

Expected results:
report a more accurate error
error: internal error Only PCI device addresses with function=0 are supported

Additional info:
bug 675030 resloved 'attach-device <misleading-controller-configuration>' issue.

Comment 1 Michal Privoznik 2011-05-04 07:11:49 UTC
commit 56152be57887cfc9a92d4fbb0c81f024664ddb46
Author: Eric Blake <eblake>
Date:   Tue Feb 15 09:31:39 2011 -0700

    qemu: don't mask real error with oom report
    
    * src/qemu/qemu_command.c (qemuBuildCommandLine): Don't report oom
    after qemuBuildControllerDevStr, which reported its own errors.

v0.8.7-250-g56152be

Comment 2 zhanghaiyan 2011-05-25 09:05:00 UTC
Verified pass with libvirt-0.9.1-1.el6.x86_64
1. Add the above xml to guest config file
    <controller type='scsi' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
function='0x1'/>
    </controller>
2. # virsh start rhel61_x86_64
error: Failed to start domain rhel61_x86_64
error: internal error Only PCI device addresses with function=0 are supported

Comment 4 Rita Wu 2011-07-13 11:34:38 UTC
Set it as VERIFIED per comment2

Comment 5 errata-xmlrpc 2011-12-06 11:05:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.