Deepti B Kalakeri wrote:
This test fails with seg fault on Xen with current sources with the
following error:
Testing Xen hypervisor
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - Got CIM error The web server returned a bad status line: ''
with return code 0
ERROR - Failed to define the dom: domgst_test
InvokeMethod(DefineSystem): The web server returned a bad status line: ''
--------------------------------------------------------------------
Here is the debug message for the HostSystem/03_hs_to_settdefcap.py failure:
xmlgen.c(713): New UUID
xmlgen.c(145): Disk: 2 /tmp/default-xen-dimage xvda
Virt_VirtualSystemManagementService.c(1281): System XML:
<domain type="xen">
<name>domgst_test</name>
<on_poweroff>destroy</on_poweroff>
<on_crash>destroy</on_crash>
<uuid>1928ab2c-e51b-44a8-a533-2b2d93bf93cb</uuid>
<os>
<type>linux</type>
<kernel>/tmp/default-xen-kernel</kernel>
<initrd>/tmp/default-xen-initrd</initrd>
<cmdline/>
</os>
<currentMemory>131072</currentMemory>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type="file" device="disk">
<source file="/tmp/default-xen-dimage"/>
<target dev="xvda"/>
</disk>
<interface type="network">
<mac address="11:22:33:aa:bb:cc"/>
<source network="cimtest-networkpool"/>
</interface>
<input type="mouse" bus="xen"/>
<graphics type="vnc" port="-1" listen="127.0.0.1"
keymap="en-us"/>
</devices>
</domain>
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(75): Connecting to libvirt with uri `xen'
misc_util.c(202): URI of connection is: xen:///
misc_util.c(202): URI of connection is: xen:///
device_parsing.c(276): Disk node: disk
infostore.c(88): Path is /etc/libvirt/cim/Xen_domgst_test
infostore.c(88): Path is /etc/libvirt/cim/Xen_domgst_test
infostore.c(250): Deleted /etc/libvirt/cim/Xen_domgst_test
infostore.c(88): Path is /etc/libvirt/cim/Xen_domgst_test
infostore.c(356): Creating new node
uuid=1928ab2c-e51b-44a8-a533-2b2d93bf93cb
Segmentation fault
Hmmm! I tried debugging this ..I put a lot of debug messages and I found
that the problem lies in the libxkutil/device_parsing.c
cleanup_dominfo() function
It faults when we try to *"free(dom->os_info.pv.initrd); " .
*The struct domain does not seem to have initrd property see below:
============
struct domain {
enum { DOMAIN_XENPV,
DOMAIN_XENFV,
DOMAIN_KVM,
DOMAIN_QEMU,
DOMAIN_LXC } type;
char *name;
char *typestr; /*xen, kvm, etc */
char *uuid;
char *bootloader;
char *bootloader_args;
char *clock;
union {
struct pv_os_info pv;
struct fv_os_info fv;
struct lxc_os_info lxc;
} os_info;
int on_poweroff;
int on_reboot;
int on_crash;
struct virt_device *dev_graphics;
int dev_graphics_ct;
struct virt_device *dev_emu;
struct virt_device *dev_input;
int dev_input_ct;
struct virt_device *dev_mem;
int dev_mem_ct;
struct virt_device *dev_net;
int dev_net_ct;
struct virt_device *dev_disk;
int dev_disk_ct;
struct virt_device *dev_vcpu;
int dev_vcpu_ct;
};
I commented out the part of code "free*(dom->os_info.pv.initrd)" and the
test case passed.
*
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com