Skip to contentSkip to conversation

driver bonding has memory leak

dpdk-dev [email protected] 1 participant 2 messages Jun 16, 2021 – Oct 12, 2021

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 735
Summary: [asan] driver bonding has memory leak
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

Created attachment 159
--> https://bugs.dpdk.org/attachment.cgi?id=159&action=edit
asan patch

Environment
dpdk: 21.05
test patch: 0007-porting-AddressSanitizer-feature-to-DPDK.patch 0001-Solve-gcc-compile-dpdk-asan.patch 0001-Solve-known-bugs.patch
Test Setup:
1. git apply 0007-porting-AddressSanitizer-feature-to-DPDK.patch
2. git apply 0001-Solve-gcc-compile-dpdk-asan.patch
3. git apply 0001-Solve-known-bugs.patch
4. CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dbuildtype=debug -Db_lundef=false -Db_sanitize=address --default-library=static x86_64-native-linuxapp-gc
5. ninja -C x86_64-native-linuxapp-gcc -j 110
6. ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51 ,52,53 -n 4 -a 0000:18:00.0 -a 0000:18:00.1 --file-prefix=dpdk_12870_20210616013323 --vdev 'net_bonding0,slave=0000:18:00.0,slave=0000:18:00.1,mode=4,agg_mode=bandwidth'
– -i
7. expect result
Start up normally
actual result
There are some errors here:

==311201==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 528 byte(s) in 1 object(s) allocated from:
#0 0x7f2f98331ba8 in __interceptor_malloc (/lib64/libasan.so.5+0xefba8) #1 0x10d7c6a in rte_kvargs_parse ../lib/kvargs/rte_kvargs.c:232 #2 0x190d682 in bond_probe ../drivers/net/bonding/rte_eth_bond_pmd.c:3361 #3 0x1184b20 in vdev_probe_all_drivers ../drivers/bus/vdev/vdev.c:211 #4 0x118693a in vdev_probe ../drivers/bus/vdev/vdev.c:558
#5 0x103ec0e in rte_bus_probe ../lib/eal/common/eal_common_bus.c:79 #6 0x10a0dd8 in rte_eal_init ../lib/eal/linux/eal.c:1286
#7 0x6e9dce in main ../app/test-pmd/testpmd.c:3752
#8 0x7f2f96c64492 in __libc_start_main (/lib64/libc.so.6+0x23492)

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7f2f9827dda0 in strdup (/lib64/libasan.so.5+0x3bda0)
#1 0x10d74d0 in rte_kvargs_tokenize ../lib/kvargs/rte_kvargs.c:35 #2 0x10d7ca5 in rte_kvargs_parse ../lib/kvargs/rte_kvargs.c:237 #3 0x190d682 in bond_probe ../drivers/net/bonding/rte_eth_bond_pmd.c:3361 #4 0x1184b20 in vdev_probe_all_drivers ../drivers/bus/vdev/vdev.c:211 #5 0x118693a in vdev_probe ../drivers/bus/vdev/vdev.c:558
#6 0x103ec0e in rte_bus_probe ../lib/eal/common/eal_common_bus.c:79 #7 0x10a0dd8 in rte_eal_init ../lib/eal/linux/eal.c:1286
#8 0x6e9dce in main ../app/test-pmd/testpmd.c:3752
#9 0x7f2f96c64492 in __libc_start_main (/lib64/libc.so.6+0x23492)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

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

jiang,yu ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #4 from jiang,yu ([email protected]) --- Patch has been merged into main. Close the defect. ccf0f002d2 net/bonding: fix memory leak on closing device

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.