Bug 698197

Summary: 'Out of memory' error from libvirt on bad xml
Product: Red Hat Enterprise Linux 6 Reporter: zhanghaiyan <yoyzhang>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: ajia, dallan, dyuan, eblake, llim, mshao, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.1-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:05:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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