From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 741] [dpdk-21.05]vhost relaunch meet Segmentation fault issue when virtio queues larger than vhost queues
Date: Thu, 17 Jun 2021 02:27:34 +0000 [thread overview]
Message-ID: <bug-741-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=741
Bug ID: 741
Summary: [dpdk-21.05]vhost relaunch meet Segmentation fault
issue when virtio queues larger than vhost queues
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: vhost/virtio
Assignee: dev@dpdk.org
Reporter: weix.ling@intel.com
Target Milestone: ---
Issue discription:
vhost relaunch meet segment fault issue from when virtio queues larger than
vhost queues.
Test Environment:
DPDK version: DPDK v21.05
OS: Linux 5.4
Compiler: gcc 9.3
CPU: 8280m
The reproduce step is :
1. launch two vhost ports :
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 --file-prefix=vhost
--vdev 'net_vhost0,iface=/tmp/s0,client=1,queues=1' --vdev
'net_vhost1,iface=/tmp/s1,client=1,queues=1' -- -i --nb-cores=1 --txd=1024
--rxd=1024
testpmd>start
2. launch one virtio-user:
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 5-6 --no-pci
--file-prefix=virtio0 \
--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/s0,server=1,mrg_rxbuf=0,in_order=0,queues=1
\
-- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024
--rxd=1024
testpmd>start
3. launch another virtio-user with queue number=8:
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 7-8 --no-pci
--file-prefix=virtio1 \
--vdev=net_virtio_user1,mac=00:01:02:03:04:55,path=/tmp/s1,server=1,mrg_rxbuf=0,in_order=0,queues=8
\
-- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024
--rxd=1024
testpmd>start tx_first 32
4. relaunch two vhost ports :
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 2-4 --file-prefix=vhost
--vdev 'net_vhost0,iface=/tmp/s0,client=1,queues=1' --vdev
'net_vhost1,iface=/tmp/s1,client=1,queues=1' -- -i --nb-cores=1 --txd=1024
--rxd=1024
Result:
Checking link statuses...
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 0
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 0
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 1
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 1
VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
VHOST_CONFIG: vring base idx:0 file:0
VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
VHOST_CONFIG: vring base idx:0 file:0
VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
VHOST_CONFIG: vring base idx:1 file:0
VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
VHOST_CONFIG: vring base idx:1 file:0
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
Segmentation fault
Expected Result:
vhost port can relaunch success and 1 queue can wok.
Is this issue a regression: Y
Version the regression was introduced: Specify git id if known.
root@dpdk:~/dpdk# git bisect bad
commit 7804bbd13aa583e3a28b08557f7a98fcbe7fc8a8 (HEAD -> main)
Author: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri Nov 6 15:47:44 2020 +0100
vhost: fix virtqueue initialization
This patches fixes virtqueue initialization issue causing
segfault or file descriptor being closed unexpectedly.
The wrong index was passed to init_vring_queue() by
alloc_vring_queue() when a hole in the virtqueue array was
met.
Fixes: 8acd7c213353 ("vhost: fix virtqueues metadata allocation")
Cc: stable@dpdk.org
Reported-by: Yu Jiang <yux.jiang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2021-06-17 2:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-741-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.