Wind River Support Network

HomeDefectsLINCD-8997
Fixed

LINCD-8997 : libvirt: virsh: Fails to undefine virtual machine with rpc-libvirtd segfault

Created: Apr 21, 2022    Updated: May 25, 2022
Resolved Date: Apr 26, 2022
Found In Version: 10.22.17.0
Fix Version: 10.22.21.0
Severity: Standard
Applicable for: Wind River Linux CD
Component/s: Userspace

Description

Fix can be found at upstream:
https://git.yoctoproject.org/meta-virtualization/commit/?id=c21e22e8e6014babe3ad3c930ee37e17ef4787a1


root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# virsh define qq.xml
Domain 'guest2' defined from qq.xml

root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# virsh list 
 Id   Name   State
--------------------

root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# virsh list --all
 Id   Name     State
-------------------------
 -    guest1   shut off
 -    guest2   shut off

root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# virsh undefine guest2
rpc-libvirtd[9725]: segfault at 18 ip 00007f8b0a5f17a9 sp 00007f8b3f8cbb60 error 4 in libvirt_driver_qemu.so[7f8b0a56e000+113000]
error: Code: a4 01 0f 84 89 03 00 00 4c 89 ff e8 d1 ed f7 ff 85 c0 0f 88 b9 02 00 00 48 8b 45 b8 48 8b b0 80 00 00 00 48 8b 86 b0 02 00 00 <48> 8b 78 18 48 85 ff 0f 84 42 01 00 00 e8 b5 02 f8 ff 48 89 45 c0
Disconnected from qemu:///system due to end of file
error: Failed to undefine domain 'guest2'
error: End of file while reading data: Input/output error

root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# 
root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing# cat qq.xml
<domain type='qemu'>
  <name>guest2</name>
  <memory>512000</memory>
  <currentMemory>512000</currentMemory>
  <cpu>
    <mode name='custom' supported='yes'/>
    <model fallback="allow">kvm64</model>
    <feature policy='require' name='vmx'/>
  </cpu>
  <features>
    <acpi/>
  </features>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd' />
    <kernel>/exports/guest1/bzImage</kernel>
    <cmdline>console=ttyS0 root=/dev/vda rw ip=dhcp</cmdline>
  </os>
  <devices>
    <disk type='file' device='disk'>
      <source file='/exports/guest1/wrlinux-image-ovp-guest-qemux86-64.ext4' />
      <target dev='vda' bus='virtio' />
    </disk>
    <disk type='file' device='disk'>
      <source file='/exports/guest1/test.img' />
      <target dev='vdb' bus='virtio' />
    </disk>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
    </console>
    <interface type='bridge'>
        <source bridge='virbr0'/>
        <target dev='vnet0'/>
        <model type='e1000'/>
        <link state='up'/>
        <alias name='net0'/>
    </interface>
  </devices>
  <genid>d260e891-6753-45e6-bbc3-e29a1da409ff</genid>
</domain>
root@intel-x86-64:/opt/wr-test/testcases/ovp/domain_management_testing#

Steps to Reproduce

/lpg-build/cdc/fast_prod/WRLINUX_MASTER_WR/MASTER_WR_GIT/wrlinux-10/setup.sh --machines intel-x86-64 --distros wrlinux-ovp --dl-layers --accept-eula=yes
source environment-setup-x86_64-wrlinuxsdk-linux
source oe-init-build-env build_OVP_intel-x86-64_preempt-rt_ovp-kvm_wrlinux_default
echo KERNEL_FEATURES:append = \" features/usb/serial-all.scc\" >> conf/local.conf
echo KERNEL_VERSION_SANITY_SKIP=\"1\" >> conf/local.conf
echo IMAGE_FSTYPES += \" tar.bz2\" >> conf/local.conf
echo BB_NUMBER_THREADS ?= \"24\" >> conf/local.conf
echo PARALLEL_MAKE ?= \"-j 24\" >> conf/local.conf
echo BB_DANGLINGAPPENDS_WARNONLY = \"1\" >> conf/local.conf
echo INITRAMFS_MAXSIZE = \"150000\" >> conf/local.conf
bitbake-layers add-layer /net/pek-lpgtest16/buildarea1/wgao/wrlinux_master/wr-testing/ovp-testing
echo require templates/feature/ovp/template.conf >> conf/local.conf
bitbake wrlinux-image-ovp-kvm

$/opt/wr-test/main_test.py -k domain_management_testing:intel-x86-64

$ virsh define qq.xml
$ virsh undefine guest2

Live chat
Online