Wind River Support Network


OVP8-426 : Virtfs directory delete crashes the kvm

Created: Nov 16, 2017    Updated: Nov 21, 2019
Resolved Date: Dec 21, 2017
Found In Version:
Fix Version:
Severity: Severe
Applicable for: Wind River Linux 8
Component/s: Kernel , Userspace


Customer use OVP8 RCPL 20. The VM will crash when using the virtfs and delete folder in the shared folder in VM. 
In host dmesg, segmentation fault is seen:
[ 1323.318192] kvm[2322]: segfault at fedffff8 ip 00007fdafae89b54 sp 00007fda66beae68 error 4 in[7fdafae0e000+19a000]

It's reproducible  on OVP8 host, and wrlinux6 kvm guest in WR's lab. 
See detailed steps in steps to reproduce.

Steps to Reproduce

1. Host project configuration:
/opt/WRLX8/wrlinux-8/wrlinux/configure --enable-board=intel-x86-64 --enable-kernel=ovp --enable-rootfs=ovp_kvm+installer-support --enable-bootimage=hdd,tar.bz2 --with-bootimage-space=1024 --enable-checkout-all-layers=yes --enable-reconfig --enable-rm-oldimgs=yes --enable-addons=wr-ovp --enable-internet-download=yes --enable-parallel-pkgbuilds=8 --enable-jobs=8 --with-layer=wr-dpdk,wr-qat --with-template=feature/initramfs --with-rcpl-version=0020

Guest project configration:
/opt/WRLX6/wrlinux-6/wrlinux/configure --enable-board=x86-64-kvm-guest --enable-rootfs=ovp-guest+initramfs+installer-support --enable-addons=wr-ovp,wr-qat --with-template=feature/target-toolchain,feature/gdb --enable-jobs=8 --enable-parallel-pkgbuilds=8 --enable-rm-oldimgs=yes --enable-internet-download=yes --enable-reconfig --with-rcpl-version=0023

2. Boot OVP host with the following configuration change:
huge /dev/huge1G hugetlbfs pagesize=1G 0 0
huge /dev/huge2M hugetlbfs pagesize=2M 0 0
user = "root"
group = "root"
hugetlbfs_mount = ["/dev/huge2M","/dev/huge1G"]

3. Bring up VM with libvirt, using the following xml segment:
<filesystem type='mount' accessmode='mapped'> 
 <source dir='/var/third-party/testme'/> 
 <target dir='mshare'/> 
 <alias name='fs0'/> 
 <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> 

4. Inside the VM mount the virtfs 
 mount -t 9p -o trans=virtio mshare /mnt 

#cd /mnt 
# mkdir test 
#cd test 
#touch x 
# touch y 

5. Open another ssh session to VM 
delete the directory /mnt/test 

6. In side the VM, stay in the /mnt/test before delete the folder.
After the deletion complete, try do the ls in the console, then the VM will crash.

Other Downloads

Live chat