DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 703] [21.05]Host testpmd crash when booting VM with vhost-user 2 queues + viommu
@ 2021-05-13  4:20 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2021-05-13  4:20 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=703

            Bug ID: 703
           Summary: [21.05]Host testpmd crash when booting VM with
                    vhost-user 2 queues + viommu
           Product: DPDK
           Version: unspecified
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: testpmd
          Assignee: dev@dpdk.org
          Reporter: pezhang@redhat.com
  Target Milestone: ---

Versions:

OS:RHEl8
DPDK:
git://dpdk.org/dpdk 
# git log -1
commit 47a0c2e11712fc5286d6a197d549817ae8f8f50e (HEAD -> main, tag: v21.05-rc2)
Author: Thomas Monjalon <thomas@monjalon.net>
Date:   Thu May 6 00:31:24 2021 +0200

    version: 21.05-rc2

    Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

kernel:4.18
qemu:5.2


Steps:
1. In host, boot testpmd with vhost-user 2q and iommu enabled.

/usr/local/bin/dpdk-testpmd \
        -l 2,4,6,8,10 \
        --socket-mem 1024,1024 \
        -n 4 \
        --vdev
net_vhost0,iface=/tmp/vhostuser0.sock,queues=2,client=1,iommu-support=1 \
        -b 0000:3b:00.0 -b 0000:3b:00.1 \
        -- \
        --portmask=3 \
        -i \
        --rxd=512 --txd=512 \
        --rxq=2 --txq=2 \
        --nb-cores=4 \
        --forward-mode=io


2. Boot VM with vhost-user 2q and iommu.
    <interface type="vhostuser">
      <mac address="18:66:da:5f:dd:02" />
      <source mode="server" path="/tmp/vhostuser0.sock" type="unix" />
      <model type="virtio" />
      <driver ats="on" iommu="on" name="vhost" queues="2" rx_queue_size="1024"
/>
      <address bus="0x6" domain="0x0000" function="0x0" slot="0x00" type="pci"
/>
    </interface>

3. Testpmd crashed after several seconds

EAL: Detected 32 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available 2048 kB hugepages reported
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ixgbe (8086:1528) device: 0000:5e:00.0 (socket 0)
TELEMETRY: No legacy callbacks, legacy socket not created
Interactive-mode selected
Set io packet forwarding mode
Failed to set MTU to 1500 for port 1
testpmd: create a new mbuf pool <mb_pool_0>: n=179456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: B4:96:91:14:22:C4
Configuring Port 1 (socket 0)
VHOST_CONFIG: vhost-user client: socket created, fd: 39
VHOST_CONFIG: failed to connect to /tmp/vhostuser0.sock: No such file or
directory
VHOST_CONFIG: /tmp/vhostuser0.sock: reconnecting...
Port 1: 56:48:4F:53:54:01
Checking link statuses...
Done
testpmd> 
Port 0: link state change event
VHOST_CONFIG: /tmp/vhostuser0.sock: connected
VHOST_CONFIG: new device, handle is 0
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_GET_PROTOCOL_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_PROTOCOL_FEATURES
VHOST_CONFIG: negotiated Vhost-user protocol features: 0xcbf
VHOST_CONFIG: read message VHOST_USER_GET_QUEUE_NUM
VHOST_CONFIG: read message VHOST_USER_SET_SLAVE_REQ_FD
VHOST_CONFIG: read message VHOST_USER_SET_OWNER
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:44
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:1 file:45
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_GET_PROTOCOL_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_PROTOCOL_FEATURES
VHOST_CONFIG: negotiated Vhost-user protocol features: 0xcbf
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:2 file:46
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:3 file:47
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 0
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 1
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 2
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 3
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 0
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 1
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 2
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 0 to qp idx: 3
VHOST_CONFIG: read message VHOST_USER_SET_FEATURES
VHOST_CONFIG: negotiated Virtio features: 0x37060ff83
VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE
VHOST_CONFIG: guest memory region size: 0x80000000
         guest physical addr: 0x0
         guest virtual  addr: 0x7f5800000000
         host  virtual  addr: 0x7f28c0000000
         mmap addr : 0x7f28c0000000
         mmap size : 0x80000000
         mmap align: 0x40000000
         mmap off  : 0x0
VHOST_CONFIG: guest memory region size: 0x180000000
         guest physical addr: 0x100000000
         guest virtual  addr: 0x7f5880000000
         host  virtual  addr: 0x7f2740000000
         mmap addr : 0x7f26c0000000
         mmap size : 0x200000000
         mmap align: 0x40000000
         mmap off  : 0x80000000
VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
VHOST_CONFIG: vring kick idx:0 file:50
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:51
VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
VHOST_CONFIG: vring kick idx:1 file:44
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:1 file:52
pvp_2q.sh: line 13: 22354 Segmentation fault      (core dumped)
/usr/local/bin/dpdk-testpmd -l 2,4,6,8,10 --socket-mem 1024,1024 -n 4 --vdev
net_vhost0,iface=/tmp/vhostuser0.sock,queues=2,client=1,iommu-support=1 -b
0000:3b:00.0 -b 0000:3b:00.1 -- --portmask=3 -i --rxd=512 --txd=512 --rxq=2
--txq=2 --nb-cores=4 --forward-mode=io


# dmesg
...
[ 7114.427665] vhost-events[22363]: segfault at 44 ip 00000000009d01f5 sp
00007f2957f18f80 error 4 in dpdk-testpmd[400000+f53000]
[ 7114.439051] Code: 55 44 89 c5 53 48 89 fb 48 83 ec 48 4c 8b 6f 60 48 89 74
24 08 48 89 54 24 10 64 48 8b 04 25 00 00 00 00 48 03 05 c3 a9 ba 00 <41> 8b 4d
44 8b 00 85 c9 0f 84 2d 01 00 00 83 f8 7f 0f 87 24 01 00


Other informations:
1. vhost-user single queue + viommu       works well
2. vhost-user 2 queues + without viommu   work well

-- 
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:[~2021-05-13  4:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13  4:20 [dpdk-dev] [Bug 703] [21.05]Host testpmd crash when booting VM with vhost-user 2 queues + viommu bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).