https://bugs.dpdk.org/show_bug.cgi?id=1171 Bug ID: 1171 Summary: [dpdk-23.03]vhost-user+virtio-pmd with vIOMMU core dumped Product: DPDK Version: 22.03 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: vhost/virtio Assignee: dev@dpdk.org Reporter: weix.ling@intel.com Target Milestone: --- [Environment] DPDK version: Use make showversion or for a non-released version: git remote -v && git show-ref --heads 23.03.0-rc0 Other software versions: QEMU-6.2.0 OS: Ubuntu 22.04.1 LTS/Linux 5.15.45-051545-generic Compiler: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) Hardware platform: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz NIC hardware: Intel Ethernet Controller E810-C for QSFP 159 NIC Driver/firmware: ice-1.11.14_dirty/4.20 0x80017785 1.3346.0 [Test Setup] Steps to reproduce List the steps to reproduce the issue. 1. Start vhost-user with iommu: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 9-10 -a 0000:4b:00.0 --file-prefix=dpdk_vhost --vdev 'net_vhost,iface=./vhost-net,queues=1,iommu-support=1' --iova=va – -i --nb-cores=1 --txq=1 --rxq=1 2. Start QEMU as virtio-user: /home/QEMU/qemu-6.2.0/bin/qemu-system-x86_64 -M q35,accel=kvm,kernel-irqchip=split -m 2G \ -device intel-iommu,intremap=on,device-iotlb=on \ -device ioh3420,id=pcie.1,chassis=1 \ -device virtio-net-pci,bus=pcie.1,netdev=net0,disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on \ -chardev socket,id=char0,path=./vhost-net \ -netdev type=vhost-user,id=net0,chardev=char0,vhostforce \ --monitor stdio -monitor unix:/tmp/vm0_monitor.sock,server,nowait \ device e1000,netdev=nttsip1 -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002:22 \ -cpu host -m 4096 -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ -numa node,memdev=mem -mem-prealloc -smp cores=10,sockets=1 \ -drive file=/home/image/ubuntu2004.img -vnc :10 3. View the vhost-user side output info: Show the output from the previous commands. root@dut245:~/dpdk# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -n 4 -l 9-10 -a 0000:4b:00.0 --file-prefix=dpdk_vhost --vdev 'net_vhost,iface=./vhost-net,queues=1,iommu-support=1' --iova=va – -i --nb-cores=1 --txq=1 --rxq=1 EAL: Detected CPU lcores: 128 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/dpdk_vhost/mp_socket EAL: Selected IOVA mode 'VA' EAL: 4096 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Ignore mapping IO port bar(1) EAL: Ignore mapping IO port bar(4) EAL: Probe PCI driver: net_ice (8086:1592) device: 0000:4b:00.0 (socket 0) ice_load_pkg_type(): Active package is: 1.3.30.0, ICE OS Default Package (double VLAN mode) Interactive-mode selected testpmd: create a new mbuf pool : n=155456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) ice_set_rx_function(): Using AVX2 Vector Rx (port 0). Port 0: 40:A6:B7:96:E4:00 Configuring Port 1 (socket 0) VHOST_CONFIG: (./vhost-net) vhost-user server: socket created, fd: 29 VHOST_CONFIG: (./vhost-net) binding succeeded Port 1: 56:48:4F:53:54:01 Checking link statuses... Done testpmd> Port 0: link state change event testpmd> VHOST_CONFIG: (./vhost-net) new vhost user connection is 32 VHOST_CONFIG: (./vhost-net) new device, handle is 0 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_FEATURES VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_PROTOCOL_FEATURES VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_PROTOCOL_FEATURES VHOST_CONFIG: (./vhost-net) negotiated Vhost-user protocol features: 0x10cbf VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_QUEUE_NUM VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_SLAVE_REQ_FD VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_OWNER VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_FEATURES VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: (./vhost-net) vring call idx:0 file:34 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ERR VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: (./vhost-net) vring call idx:1 file:35 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ERR VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 0 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 1 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 0 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 1 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 0 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ENABLE VHOST_CONFIG: (./vhost-net) set queue enable: 1 to qp idx: 1 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_FEATURES VHOST_CONFIG: (./vhost-net) negotiated Virtio features: 0x37020e783 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_STATUS VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_STATUS VHOST_CONFIG: (./vhost-net) new device status(0x00000008): VHOST_CONFIG: (./vhost-net) -RESET: 0 VHOST_CONFIG: (./vhost-net) -ACKNOWLEDGE: 0 VHOST_CONFIG: (./vhost-net) -DRIVER: 0 VHOST_CONFIG: (./vhost-net) -FEATURES_OK: 1 VHOST_CONFIG: (./vhost-net) -DRIVER_OK: 0 VHOST_CONFIG: (./vhost-net) -DEVICE_NEED_RESET: 0 VHOST_CONFIG: (./vhost-net) -FAILED: 0 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_MEM_TABLE VHOST_CONFIG: (./vhost-net) guest memory region size: 0xa0000 VHOST_CONFIG: (./vhost-net) guest physical addr: 0x0 VHOST_CONFIG: (./vhost-net) guest virtual addr: 0x7f6bdffff000 VHOST_CONFIG: (./vhost-net) host virtual addr: 0x7f6378c29000 VHOST_CONFIG: (./vhost-net) mmap addr : 0x7f6378c29000 VHOST_CONFIG: (./vhost-net) mmap size : 0xa0000 VHOST_CONFIG: (./vhost-net) mmap align: 0x1000 VHOST_CONFIG: (./vhost-net) mmap off : 0x0 VHOST_CONFIG: (./vhost-net) guest memory region size: 0x7ff40000 VHOST_CONFIG: (./vhost-net) guest physical addr: 0xc0000 VHOST_CONFIG: (./vhost-net) guest virtual addr: 0x7f6be00bf000 VHOST_CONFIG: (./vhost-net) host virtual addr: 0x7f62f40c0000 VHOST_CONFIG: (./vhost-net) mmap addr : 0x7f62f4000000 VHOST_CONFIG: (./vhost-net) mmap size : 0x80000000 VHOST_CONFIG: (./vhost-net) mmap align: 0x1000 VHOST_CONFIG: (./vhost-net) mmap off : 0xc0000 VHOST_CONFIG: (./vhost-net) guest memory region size: 0x80000000 VHOST_CONFIG: (./vhost-net) guest physical addr: 0x100000000 VHOST_CONFIG: (./vhost-net) guest virtual addr: 0x7f6c5ffff000 VHOST_CONFIG: (./vhost-net) host virtual addr: 0x7f6274000000 VHOST_CONFIG: (./vhost-net) mmap addr : 0x7f61f4000000 VHOST_CONFIG: (./vhost-net) mmap size : 0x100000000 VHOST_CONFIG: (./vhost-net) mmap align: 0x1000 VHOST_CONFIG: (./vhost-net) mmap off : 0x80000000 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: (./vhost-net) vring base idx:0 last_used_idx:0 last_avail_idx:0. VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: (./vhost-net) vring kick idx:0 file:39 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: (./vhost-net) vring call idx:0 file:40 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: (./vhost-net) vring base idx:1 last_used_idx:0 last_avail_idx:0. VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: (./vhost-net) vring kick idx:1 file:34 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: (./vhost-net) vring call idx:1 file:41 VHOST_CONFIG: (./vhost-net) read message VHOST_USER_GET_STATUS Segmentation fault (core dumped) [Expected Result] No print core dumped. Regression Is this issue a regression: (Y/N) N Version the regression was introduced: Specify git id if known. The bad commit ID is: commit 338ad77c9ed342fba856e8af3371bd96a58a20dc Author: Mike Pattrick Date: Wed Dec 7 11:54:08 2022 -0500 vhost: exclude VM hugepages from coredumps Currently if an application wants to include shared hugepages in coredumps in conjunction with the vhost library, the coredump will be larger than expected and include unneeded virtual machine memory. This patch will mark all vhost huge pages as DONTDUMP, except for some select pages used by DPDK. Signed-off-by: Mike Pattrick Reviewed-by: Maxime Coquelin -- You are receiving this mail because: You are the assignee for the bug.