vhost_pmd_xstats: Failed to Launch virtio_user and vhost side core dumped
https://bugs.dpdk.org/show_bug.cgi?id=570
Bug ID: 570
Summary: [dpdk-20.11] vhost_pmd_xstats: Failed to Launch
virtio_user and vhost side core dumped
Product: DPDK
Version: 20.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: vhost/virtio
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 133
--> https://bugs.dpdk.org/attachment.cgi?id=133&action=edit
Failed to Launch virtio_user and vhost side core dumped
Environment
DPDK version: Use make showversion or for a non-released version: git remote -v && git show-ref --heads
[60af9bd63dd46ebd709371e88b4096fd2bc048cf] version: 20.11-rc3 Other software versions: name/version for QEMU, OVS, etc. Repeat as required.
OS: Ubuntu20.04.1 LTS (Focal Fossa)/5.4.0-38-generic
Compiler: gcc version 9.3.0
Hardware platform: Intel(R) Xeon(R) Gold 6139 CPU @ 2.30GHz
NIC hardware: Ethernet Controller XL710 for 40GbE QSFP+ 1583
NIC firmware: if applicable
Test Setup
Steps to reproduce
List the steps to reproduce the issue.
TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG Test Case 1: xstats test with packed ring mergeable path
========================================================
Step0: Build DPDK
rm -rf x86_64-native-linuxapp-gcc
CC=gcc meson --werror -Denable_kmods=True --default-library=static
x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc -j 110 Step1. Bind one port to vfio-pci, then launch vhost by below command::
rm -rf vhost-net*
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \
--file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0'-- -i --nb-cores=2 --rxq=2 --txq=2
Step2. Launch virtio-user by below command::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \
--no-pci --file-prefix=virtio \--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0
\
-- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2--rxq=2 --txq=2
# Put output in a noformat block like this.
root@dpdk:~/dpdk# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0 -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 EAL: Detected 72 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/virtio/mp_socket EAL: Selected IOVA mode 'VA' EAL: Probing VFIO support... EAL: VFIO support initialized vhost_user_read(): Failed to recv msg hdr: -1 instead of 12. vhost_user_sock(): Received msg failed: Connection reset by peer virtio_user_send_status_update(): VHOST_USER_SET_STATUS failed (-1): Connection reset by peer root@dpdk:~/dpdk#
And vhost side log:VHOST_CONFIG: read message VHOST_USER_GET_STATUSVHOST_CONFIG: read message VHOST_USER_SET_STATUSVHOST_CONFIG: New device status(0x00000003):
-RESET: 0
-ACKNOWLEDGE: 1
-DRIVER: 1
-FEATURES_OK: 0
-DRIVER_OK: 0
-DEVICE_NEED_RESET: 0
-FAILED: 0VHOST_CONFIG: read message VHOST_USER_GET_STATUSVHOST_CONFIG: read message VHOST_USER_SET_VRING_CALLVHOST_CONFIG: vring call idx:0 file:38VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL Segmentation fault (core dumped) root@dpdk:~/dpdk#
Expected Result
Explain what is the expected result in text or as an example output:
# Put output in a noformat block like this.
Launch virtio-user successfully and vhost side works well.
Regression
Is this issue a regression: (Y)
Version the regression was introduced: Specify git id if known.
root@dpdk:~/dpdk# git bisect bad 8acd7c21335305426fbbc0a3aea2978734d0b2a8 is the first bad commit commit 8acd7c21335305426fbbc0a3aea2978734d0b2a8 Author: Maxime Coquelin <[email protected]> Date: Mon Oct 19 19:34:09 2020 +0200 vhost: fix virtqueues metadata allocation The Vhost-user backend implementation assumes there will be no holes in the device's array of virtqueues metadata pointers. It can happen though, and would cause segmentation faults, memory leaks or undefined behaviour. This patch keep the assumption that there is no holes in this array, and allocate all uninitialized virtqueues metadata up to requested index. Fixes: 160cbc815b41 ("vhost: remove a hack on queue allocation") Cc: [email protected] Suggested-by: Adrian Moreno <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> lib/librte_vhost/vhost.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.