From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C9A5A0093; Wed, 9 Mar 2022 07:49:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C338D40687; Wed, 9 Mar 2022 07:49:26 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id B6ABB40395 for ; Wed, 9 Mar 2022 07:49:25 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 61FA4A00BE; Wed, 9 Mar 2022 07:49:24 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 956] [dpdk-22.03][asan] dpdk-pdump: detected memory leaks when quit dpdk-pdump Date: Wed, 09 Mar 2022 06:49:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: other X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: weix.ling@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org https://bugs.dpdk.org/show_bug.cgi?id=3D956 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 remot= e -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:=20=20 dpdk-devbind.py --force --bind=3Dvfio-pci 0000:af:00.0 0000:af:00.1=20=20 2. Build DPDK enable ASAN: CC=3Dgcc meson -Denable_kmods=3DTrue -Dlibdir=3Dlib -Dbuildtype=3Ddebug -Db_lundef=3Dfalse -Db_sanitize=3Daddress --default-library=3Dstatic x86_64-native-linuxapp-gcc ninja -C x86_64-native-linuxapp-gcc 3. Start vhost-user dpdk-testpmd:=20=20 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=3Dvhost --vdev 'eth_vhost0,iface=3Dvhost-net0,queues=3D8,client=3D1' -- -i --nb-cores=3D5 = --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024=20=20 4. Start virtio-user dpdk-testpmd:=20=20 x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38,39 -n 4 --file-prefix=3D= virtio --no-pci=20 --vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost-net0,server= =3D1,queues=3D8,mrg_rxbuf=3D1,in_order=3D1 -- -i --txd=3D1024 --rxd=3D1024 --nb-cores=3D1 --rxq=3D8 --txq=3D8=20=20 5. Start dpdk-pdump to capture the virtio-user side packets: x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=3Dvirtio -- --p= dump=20 'device_id=3Dnet_virtio_user0,queue=3D*,rx-dev=3D/root/pdump-rx.pcap,mbuf-s= ize=3D8000' 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=3Dvirtio -- --pdump=20 'device_id=3Dnet_virtio_user0,queue=3D*,rx-dev=3D/root/pdump-rx.pcap,mbuf-s= ize=3D8000' 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_b689b255c3= 584 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D2823035=3D=3DERROR: 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+0x10ddc= 6) #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. --=20 You are receiving this mail because: You are the assignee for the bug.=