DPDK patches and discussions
 help / color / mirror / Atom feed
* [Bug 956] [dpdk-22.03][asan] dpdk-pdump: detected memory leaks when quit dpdk-pdump
@ 2022-03-09  6:49 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2022-03-09  6:49 UTC (permalink / raw)
  To: dev

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

            Bug ID: 956
           Summary: [dpdk-22.03][asan] dpdk-pdump: detected memory leaks
                    when quit dpdk-pdump
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
          Assignee: dev@dpdk.org
          Reporter: weix.ling@intel.com
  Target Milestone: ---

[Environmen]

DPDK version: Use make showversion or for a non-released version: git remote -v
&& git show-ref --heads
 DPDK-22.03-rc1: ee05a93e1e6633d0fdec409faf09f12a2e05b991
Other software versions: N/A
OS: Ubuntu 20.04.3 LTS/Linux 5.8.0-48-generic
Compiler: gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
Hardware platform: Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz
NIC hardware: Intel Ethernet Controller XL710 for 40GbE QSFP+ 1583
NIC firmware: i40e-2.17.15/8.30 0x8000a4ae 1.2926.0

[Test Setup]
Steps to reproduce
List the steps to reproduce the issue.

1. Bind 2 NIC port to vfio-pci:  

dpdk-devbind.py --force --bind=vfio-pci 0000:af:00.0 0000:af:00.1  

2. Build DPDK enable ASAN:

CC=gcc meson -Denable_kmods=True -Dlibdir=lib  -Dbuildtype=debug
-Db_lundef=false -Db_sanitize=address --default-library=static
x86_64-native-linuxapp-gcc

ninja -C x86_64-native-linuxapp-gcc

3. Start vhost-user dpdk-testpmd:  

x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28,29,30,31,32,33,34,35,36 -n 4
-a 0000:af:00.0 -a 0000:af:00.1 --file-prefix=vhost  --vdev
'eth_vhost0,iface=vhost-net0,queues=8,client=1' -- -i --nb-cores=5 --txq=8
--rxq=8 --txd=1024 --rxd=1024  

4. Start virtio-user dpdk-testpmd:  

x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38,39 -n 4  --file-prefix=virtio
--no-pci 
--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net0,server=1,queues=8,mrg_rxbuf=1,in_order=1
-- -i --txd=1024 --rxd=1024 --nb-cores=1 --rxq=8 --txq=8  

5. Start dpdk-pdump to capture the virtio-user side packets:

x86_64-native-linuxapp-gcc/app/dpdk-pdump  -v --file-prefix=virtio -- --pdump 
'device_id=net_virtio_user0,queue=*,rx-dev=/root/pdump-rx.pcap,mbuf-size=8000'

6. Execute `CTRL + C` to quit dpdk-pdump.

Show the output from the previous commands.

root@dut220:/home/lingwei/dpdk# x86_64-native-linuxapp-gcc/app/dpdk-pdump  -v
--file-prefix=virtio -- --pdump 
'device_id=net_virtio_user0,queue=*,rx-dev=/root/pdump-rx.pcap,mbuf-size=8000'
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: RTE Version: 'DPDK 22.03.0-rc1'
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/virtio/mp_socket_2823035_b689b255c3584
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
EAL: 0000:80:04.0 cannot find TAILQ entry for PCI device!
EAL: Requested device 0000:80:04.0 cannot be used
EAL: 0000:80:04.1 cannot find TAILQ entry for PCI device!
EAL: Requested device 0000:80:04.1 cannot be used
EAL: 0000:80:04.2 cannot find TAILQ entry for PCI device!
EAL: Requested device 0000:80:04.2 cannot be used
Port 1 MAC: 02 70 63 61 70 00
 core (0), capture for (1) tuples
 - port 0 device (net_virtio_user0) queue 65535
Signal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####
 -packets dequeued:                     0
 -packets transmitted to vdev:          0
 -packets freed:                        0
=================================================================
==2823035==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 136 byte(s) in 1 object(s) allocated from:
    #0 0x7fca5ba77dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
    #1 0x564d8f98b8ba in alloc_devargs ../drivers/bus/vdev/vdev.c:243
    #2 0x564d8f98bb1a in insert_vdev ../drivers/bus/vdev/vdev.c:276
    #3 0x564d8f98cb15 in vdev_action ../drivers/bus/vdev/vdev.c:449
    #4 0x564d8f88e743 in process_msg ../lib/eal/common/eal_common_proc.c:383
    #5 0x564d8f88e92b in mp_handle ../lib/eal/common/eal_common_proc.c:401
    #6 0x564d8f871ba0 in ctrl_thread_init
../lib/eal/common/eal_common_thread.c:203
    #7 0x7fca5b749608 in start_thread
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477
Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7fca5ba003dd in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x963dd)
    #1 0x564d8f98b95b in alloc_devargs ../drivers/bus/vdev/vdev.c:251
    #2 0x564d8f98bb1a in insert_vdev ../drivers/bus/vdev/vdev.c:276
    #3 0x564d8f98cb15 in vdev_action ../drivers/bus/vdev/vdev.c:449
    #4 0x564d8f88e743 in process_msg ../lib/eal/common/eal_common_proc.c:383
    #5 0x564d8f88e92b in mp_handle ../lib/eal/common/eal_common_proc.c:401
    #6 0x564d8f871ba0 in ctrl_thread_init
../lib/eal/common/eal_common_thread.c:203
    #7 0x7fca5b749608 in start_thread
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477
SUMMARY: AddressSanitizer: 137 byte(s) leaked in 2 allocation(s).

[Expected Result]
Explain what is the expected result in text or as an example output:

Can quit dpdk-pdump normally.

-- 
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:[~2022-03-09  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  6:49 [Bug 956] [dpdk-22.03][asan] dpdk-pdump: detected memory leaks when quit dpdk-pdump 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).