Bug 770 - The softnic start service rte_pmd_softnic_run_internal, when testpmd close port, segmentation fault will appear.
Summary: The softnic start service rte_pmd_softnic_run_internal, when testpmd close po...
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: 21.08
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: ZhangAlvin
URL:
Depends on:
Blocks:
 
Reported: 2021-08-04 04:15 CEST by Peng,Zhihong
Modified: 2021-08-04 04:20 CEST (History)
0 users



Attachments
patch and firmware (1.87 KB, application/x-zip-compressed)
2021-08-04 04:15 CEST, Peng,Zhihong
Details

Description Peng,Zhihong 2021-08-04 04:15:42 CEST
Created attachment 168 [details]
patch and firmware

1. unzip patch.zip 
2. cp patch/flow_ipv4_addr_hash_firmware.cli dpdk
3. git apply 0001-port-add-some-logs-to-locate-the-issue.patch
4. CC=gcc meson -Denable_kmods=True -Dbuildtype=debug -Db_lundef=false -Db_sanitize=address -Dlibdir=lib  --default-library=static x86_64-native-linuxapp-gcc
5. ninja -C x86_64-native-linuxapp-gcc
6. modprobe vfio-pci
7. bind i40e to vfio-pci
   ./usertools/dpdk-devbind.py -b vfio-pci 0000:86:00.0 0000:86:00.1
8. ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd --vdev net_softnic0,firmware=./flow_ipv4_addr_hash_firmware.cli,cpu_id=1,conn_port=8086 -l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71 -n 4 -a 0000:af:00.0 -a 0000:af:00.1 --file-prefix=dpdk_11700_20210721190028 -s 0x4 -- -i --rxq=2 --txq=2 --disable-rss --portmask=0x4
9. testpmd> port stop 0
   Stopping ports...
Checking link statuses...
rte_eth_rx_burst run on port 0 (dev started: no)..............
Done
trte_eth_rx_burst run on port 1 (dev started: yes)..............
estpmd> rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
rte_eth_rx_burst run on port 0 (dev started: no)..............
rte_eth_rx_burst run on port 1 (dev started: yes)..............
10. testpmd> port close 1
    port close 1
Closing ports...
--Type <RET> for more, q to quit, c to continue without paging--

Thread 4 "lcore-worker-2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff450b700 (LWP 39856)]
0x00000000014c347c in _recv_raw_pkts_vec_avx2 (rxq=0x0, rx_pkts=0x121e08fd28, nb_pkts=32, split_packet=0x0) at ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:116
116             const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
(gdb) bt
#0  0x00000000014c347c in _recv_raw_pkts_vec_avx2 (rxq=0x0, rx_pkts=0x121e08fd28, nb_pkts=32, split_packet=0x0) at ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:116
#1  i40e_recv_pkts_vec_avx2 (rx_queue=0x0, rx_pkts=0x121e08fd28, nb_pkts=32) at ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:635
#2  0x0000000000797ccb in rte_eth_rx_burst (port_id=1, queue_id=0, rx_pkts=0x121e08fd28, nb_pkts=32) at ../lib/ethdev/rte_ethdev.h:4996
#3  0x000000000079728e in rte_port_ethdev_reader_rx (port=0x121e08ad00, pkts=0x121e08fd28, n_pkts=32) at ../lib/port/rte_port_ethdev.c:81
#4  0x000000000064b216 in rte_pipeline_run (p=0x121e08ae80) at ../lib/pipeline/rte_pipeline.c:1322
#5  0x0000000002895577 in rte_pmd_softnic_run_internal (arg=0x4fa4e40 <rte_eth_devices+33152>) at ../drivers/net/softnic/rte_eth_softnic_thread.c:3006
#6  0x0000000000aa53bd in service_runner_do_callback (s=0x17fffe000, cs=0x17ffea480, service_idx=0) at ../lib/eal/common/rte_service.c:376
#7  0x0000000000aa4501 in service_run (i=0, cs=0x17ffea480, service_mask=1, s=0x17fffe000, serialize_mt_unsafe=1) at ../lib/eal/common/rte_service.c:407
#8  0x0000000000aa4c1c in service_runner_func (arg=0x0) at ../lib/eal/common/rte_service.c:475
#9  0x0000000000ab80bc in eal_thread_loop (arg=0x0) at ../lib/eal/linux/eal_thread.c:127
#10 0x00007ffff5f87e65 in start_thread () from /lib64/libpthread.so.0
#11 0x00007ffff5cb088d in clone () from /lib64/libc.so.6
(gdb)
Comment 1 Peng,Zhihong 2021-08-04 04:20:36 CEST
Change compilation options:4. CC=gcc meson -Denable_kmods=True -Dbuildtype=debug -Dlibdir=lib  --default-library=static x86_64-native-linuxapp-gcc

Note You need to log in before you can comment on or make changes to this bug.