From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A038FA0524; Fri, 6 Nov 2020 10:07:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D30D5946; Fri, 6 Nov 2020 10:07:44 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id 1CC66593A for ; Fri, 6 Nov 2020 10:07:43 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id F2B90A0526; Fri, 6 Nov 2020 10:07:41 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Fri, 06 Nov 2020 09:07:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: vhost/virtio X-Bugzilla-Version: 20.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yux.jiang@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 570] [dpdk-20.11] vhost_pmd_xstats: Failed to Launch virtio_user and vhost side core dumped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D570 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: dev@dpdk.org Reporter: yux.jiang@intel.com Target Milestone: --- Created attachment 133 --> https://bugs.dpdk.org/attachment.cgi?id=3D133&action=3Dedit Failed to Launch virtio_user and vhost side core dumped Environment DPDK version: Use make showversion or for a non-released version: git remot= e -v && git show-ref --heads=20 [60af9bd63dd46ebd709371e88b4096fd2bc048cf] version: 20.11-rc3 Other software versions: name/version for QEMU, OVS, etc. Repeat as require= d. 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Step0: Build DPDK rm -rf x86_64-native-linuxapp-gcc CC=3Dgcc meson --werror -Denable_kmods=3DTrue --default-library=3Dstatic x86_64-native-linuxapp-gcc ninja -C x86_64-native-linuxapp-gcc -j 110=20=20 Step1. Bind one port to vfio-pci, then launch vhost by below command::=20= =20=20=20 rm -rf vhost-net* ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 \ --file-prefix=3Dvhost --vdev 'net_vhost0,iface=3Dvhost-net,queues=3D2,c= lient=3D0' -- -i --nb-cores=3D2 --rxq=3D2 --txq=3D2 Step2. Launch virtio-user by below command::=20=20=20=20 ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-7 \ --no-pci --file-prefix=3Dvirtio \ =20=20=20 --vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost-net,queues= =3D2,packed_vq=3D1,mrg_rxbuf=3D1,in_order=3D0 \ -- -i --tx-offloads=3D0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=3D2 --rxq=3D2 --txq=3D2 # 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=3Dvirtio --vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost-net,queues= =3D2,packed_vq=3D1,mrg_rxbuf=3D1,in_order=3D0 -- -i --tx-offloads=3D0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=3D2 --= rxq=3D2 --txq=3D2 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): Connec= tion reset by peer root@dpdk:~/dpdk# And vhost side log: VHOST_CONFIG: read message VHOST_USER_GET_STATUS VHOST_CONFIG: read message VHOST_USER_SET_STATUS VHOST_CONFIG: New device status(0x00000003): -RESET: 0 -ACKNOWLEDGE: 1 -DRIVER: 1 -FEATURES_OK: 0 -DRIVER_OK: 0 -DEVICE_NEED_RESET: 0 -FAILED: 0 VHOST_CONFIG: read message VHOST_USER_GET_STATUS VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:0 file:38 VHOST_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 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: stable@dpdk.org Suggested-by: Adrian Moreno Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia lib/librte_vhost/vhost.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=