From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/vhost/virtio Bug 1685] [dpdk-22.11.8RC1] virtio_ipsec_cryptodev_func/test_aesni_mb_aes_cbc_sha1_hmac: dpdk-vhost_crypto Segmentation fault (core dumped) when launch qemu
Date: Mon, 31 Mar 2025 07:26:27 +0000 [thread overview]
Message-ID: <bug-1685-3@http.bugs.dpdk.org/> (raw)
[-- Attachment #1: Type: text/plain, Size: 9495 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1685
Bug ID: 1685
Summary: [dpdk-22.11.8RC1]
virtio_ipsec_cryptodev_func/test_aesni_mb_aes_cbc_sha1
_hmac: dpdk-vhost_crypto Segmentation fault (core
dumped) when launch qemu
Product: DPDK
Version: 22.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: ---
[Environment]
DPDK version: commit 684d996a20 (HEAD -> v22.11.8-rc1, tag: v22.11.8-rc1,
origin/22.11) version: 22.11.8-rc1
OS: Ubuntu 18.04.5 LTS (Bionic Beaver); 5.4.0-150-generic
Compiler: gcc version 7.5.0
Hardware platform: Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz
QEMU: qemu-2.12
qemu version >= 2.12 in qemu enable vhost-user-crypto:
./configure --target-list=x86_64-softmmu --enable-vhost-crypto
--prefix=/root/qemu-2.12 && make && make install
Qemu version: 2.12
QAT: C62x Chipset QuickAssist Technology 37c8
[Test Setup]
Steps to reproduce
List the steps to reproduce the issue.
1, Build dpdk
rm -rf x86_64-native-linuxapp-gcc
CC=gcc meson --werror -Denable_kmods=False -Dlibdir=lib -Dexamples=all
--default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc -j 110
ls x86_64-native-linuxapp-gcc/examples/dpdk-vhost_crypto
2, Bind QAT device and run the dpdk vhost sample in HOST side
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:1a:01.0 0000:1c:01.0
0000:1e:01.0
x86_64-native-linuxapp-gcc/examples/dpdk-vhost_crypto -l 1,2,3,4,5 -a
0000:1a:01.0 -a 0000:1c:01.0 -a 0000:1e:01.0 --vdev
crypto_scheduler_pmd_1,worker=0000:1a:01.0_qat_sym,worker=0000:1c:01.0_qat_sym,worker=0000:1e:01.0_qat_sym,mode=round-robin,ordering=enable
--socket-mem 2048,0 -n 4 -- --config "(2,0,0),(3,0,0),(4,0,0),(5,0,0)"
--socket-file 2,/tmp/vm0_crypto0.sock
--socket-file=3,/tmp/vm0_crypto1.sock
--socket-file=4,/tmp/vm1_crypto0.sock
--socket-file=5,/tmp/vm1_crypto1.sock
3, Bind NIC PF to vfio-pci
usertools/dpdk-devbind.py --bind=vfio-pci 0000:60:00.0 0000:60:00.1
0000:3b:00.0 0000:3b:00.1
4, Start VM0 by the qemu:
taskset -c 11,12,13,14 /usr/local/qemu-2.12.0/bin/qemu-system-x86_64 -name vm0
-enable-kvm -pidfile /tmp/.vm0.pid -daemonize -monitor
unix:/tmp/vm0_monitor.sock,server,nowait -device e1000,netdev=nttsip1 -netdev
user,id=nttsip1,hostfwd=tcp:10.67.118.199:6410-:22 -device
vfio-pci,host=0000:3b:00.0,id=pt_0 -device vfio-pci,host=0000:3b:00.1,id=pt_1
-cpu host -smp 4 -m 4096 -object
memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on -numa
node,memdev=mem -mem-prealloc -chardev
socket,path=/tmp/vm0_qga0.sock,server,nowait,id=vm0_qga0 -device virtio-serial
-device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 -vnc :1
-chardev socket,path=/tmp/vm0_crypto0.sock,id=vm0_crypto0 -object
cryptodev-vhost-user,id=cryptodev0,chardev=vm0_crypto0 -device
virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 -chardev
socket,path=/tmp/vm0_crypto1.sock,id=vm0_crypto1 -object
cryptodev-vhost-user,id=cryptodev1,chardev=vm0_crypto1 -device
virtio-crypto-pci,id=crypto1,cryptodev=cryptodev1 -drive
file=/root/VMs/ubuntu2004-0.img
[Actual Result]
VM logs:
root@dpdk-yaobing-purely147:~/dpdk# taskset -c 11,12,13,14
/usr/local/qemu-2.12.0/bin/qemu-system-x86_64 -name vm0 -enable-kvm -pidfile
/tmp/.vm0.pid -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait
-device e1000,netdev=nttsip1 -netdev
user,id=nttsip1,hostfwd=tcp:10.67.118.199:6010-:22 -device
vfio-pci,host=0000:3b:00.0,id=pt_0 -device vfio-pci,host=0000:3b:00.1,id=pt_1
-cpu host -smp 4 -m 4096 -object
memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on -numa
node,memdev=mem -mem-prealloc -chardev
socket,path=/tmp/vm0_qga0.sock,server,nowait,id=vm0_qga0 -device virtio-serial
-device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 -vnc :1
-chardev socket,path=/tmp/vm0_crypto0.sock,id=vm0_crypto0 -object
cryptodev-vhost-user,id=cryptodev0,chardev=vm0_crypto0 -device
virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 -chardev
socket,path=/tmp/vm0_crypto1.sock,id=vm0_crypto1 -object
cryptodev-vhost-user,id=cryptodev1,chardev=vm0_crypto1 -device
virtio-crypto-pci,id=crypto1,cryptodev=cryptodev1 -drive
file=/root/VMs/ubuntu2004-0.img
qemu-system-x86_64: -object
cryptodev-vhost-user,id=cryptodev0,chardev=vm0_crypto0: Failed to read msg
header. Read 0 instead of 12. Original request 1.
qemu-system-x86_64: -object
cryptodev-vhost-user,id=cryptodev0,chardev=vm0_crypto0: failed to init
vhost_crypto for queue 0
DPDK VHOST sample HOST log:
root@dpdk-yaobing-purely147:~/dpdk#
x86_64-native-linuxapp-gcc/examples/dpdk-vhost_crypto -l 1,2,3,4,5 -a
0000:1a:01.0 -a 0000:1c:01.0 -a 0000:1e:01.0 --vdev
crypto_scheduler_pmd_1,worker=0000:1a:01.0_qat_sym,worker=0000:1c:01.0_qat_sym,worker=0000:1e:01.0_qat_sym,mode=round-robin,ordering=enable
--socket-mem 2048,0 -n 4 -- --config "(2,0,0),(3,0,0),(4,0,0),(5,0,0)"
--socket-file 2,/tmp/vm0_crypto0.sock
--socket-file=3,/tmp/vm0_crypto1.sock
--socket-file=4,/tmp/vm1_crypto0.sock
--socket-file=5,/tmp/vm1_crypto1.sock
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: qat (8086:37c9) device: 0000:1a:01.0 (socket 0)
CRYPTODEV: Creating cryptodev 0000:1a:01.0_qat_sym
CRYPTODEV: Initialisation parameters - name: 0000:1a:01.0_qat_sym,socket id: 0,
max queue pairs: 0
CRYPTODEV: Creating cryptodev 0000:1a:01.0_qat_asym
CRYPTODEV: Initialisation parameters - name: 0000:1a:01.0_qat_asym,socket id:
0, max queue pairs: 0
EAL: Probe PCI driver: qat (8086:37c9) device: 0000:1c:01.0 (socket 0)
CRYPTODEV: Creating cryptodev 0000:1c:01.0_qat_sym
CRYPTODEV: Initialisation parameters - name: 0000:1c:01.0_qat_sym,socket id: 0,
max queue pairs: 0
CRYPTODEV: Creating cryptodev 0000:1c:01.0_qat_asym
CRYPTODEV: Initialisation parameters - name: 0000:1c:01.0_qat_asym,socket id:
0, max queue pairs: 0
EAL: Probe PCI driver: qat (8086:37c9) device: 0000:1e:01.0 (socket 0)
CRYPTODEV: Creating cryptodev 0000:1e:01.0_qat_sym
CRYPTODEV: Initialisation parameters - name: 0000:1e:01.0_qat_sym,socket id: 0,
max queue pairs: 0
CRYPTODEV: Creating cryptodev 0000:1e:01.0_qat_asym
CRYPTODEV: Initialisation parameters - name: 0000:1e:01.0_qat_asym,socket id:
0, max queue pairs: 0
CRYPTODEV: Creating cryptodev crypto_scheduler_pmd_1
CRYPTODEV: Initialisation parameters - name: crypto_scheduler_pmd_1,socket id:
0, max queue pairs: 8
cryptodev_scheduler_create() line 140: Scheduling mode = round-robin
cryptodev_scheduler_create() line 195: Packet ordering = enable
USER1: Processing on Core 2 started
VHOST_CONFIG: (/tmp/vm0_crypto0.sock) logging feature is disabled in async copy
mode
VHOST_CONFIG: (/tmp/vm0_crypto0.sock) vhost-user server: socket created, fd: 49
VHOST_CONFIG: (/tmp/vm0_crypto0.sock) binding succeeded
CRYPTODEV: rte_cryptodev_start() line 1208: Device with dev_id=0 already
started
VHOST_CONFIG: (/tmp/vm0_crypto1.sock) logging feature is disabled in async copy
mode
VHOST_CONFIG: (/tmp/vm0_crypto1.sock) vhost-user server: socket created, fd: 53
USER1: Processing on Core 3 started
VHOST_CONFIG: (/tmp/vm0_crypto1.sock) binding succeeded
CRYPTODEV: rte_cryptodev_start() line 1208: Device with dev_id=0 already
started
VHOST_CONFIG: (/tmp/vm1_crypto0.sock) logging feature is disabled in async copy
mode
VHOST_CONFIG: (/tmp/vm1_crypto0.sock) vhost-user server: socket created, fd: 54
USER1: Processing on Core 4 started
VHOST_CONFIG: (/tmp/vm1_crypto0.sock) binding succeeded
CRYPTODEV: rte_cryptodev_start() line 1208: Device with dev_id=0 already
started
VHOST_CONFIG: (/tmp/vm1_crypto1.sock) logging feature is disabled in async copy
mode
VHOST_CONFIG: (/tmp/vm1_crypto1.sock) vhost-user server: socket created, fd: 55
USER1: Processing on Core 5 started
VHOST_CONFIG: (/tmp/vm1_crypto1.sock) binding succeeded
VHOST_CONFIG: (/tmp/vm0_crypto0.sock) new vhost user connection is 56
VHOST_CONFIG: (/tmp/vm0_crypto0.sock) new device, handle is 0
USER1: New Vhost-crypto Device /tmp/vm0_crypto0.sock, Device ID 0
Segmentation fault (core dumped)
[Regression]
Is this issue a regression: (Y/N) Y
Bad commit id: 6816d998b0 examples/vhost_crypto: fix user callbacks
commit 6816d998b04e26ca4468356e0a3c10daf65412eb
Author: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Fri Feb 28 19:17:11 2025 +0530
examples/vhost_crypto: fix user callbacks
[ upstream commit f7cf44d49b1115238a87c5852db4b47290bfdc25 ]
In order to handle new vhost user connection, use new_connection
and destroy_connection callbacks.
Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 11705 bytes --]
next reply other threads:[~2025-03-31 7:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 7:26 bugzilla [this message]
2025-03-31 15:01 ` [DPDK/vhost/virtio Bug 1685] [dpdk-22.11.8RC1] virtio_ipsec_cryptodev_func/test_aesni_mb_aes_cbc_sha1_hmac: dpdk-vhost_crypto Segmentation fault (core dumped) when launch qemu bugzilla
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-1685-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.