DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 570] [dpdk-20.11] vhost_pmd_xstats: Failed to Launch virtio_user and vhost side core dumped
@ 2020-11-06  9:07 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2020-11-06  9:07 UTC (permalink / raw)
  To: dev

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: dev@dpdk.org
          Reporter: yux.jiang@intel.com
  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_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 <maxime.coquelin@redhat.com>
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 <amorenoz@redhat.com>
    Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
    Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
 lib/librte_vhost/vhost.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-06  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  9:07 [dpdk-dev] [Bug 570] [dpdk-20.11] vhost_pmd_xstats: Failed to Launch virtio_user and vhost side core dumped bugzilla

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git