DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1192] [dpdk-22.03][asan][mlx5]: detected memory leaks when detach and attach device
Date: Mon, 20 Mar 2023 10:22:25 +0000	[thread overview]
Message-ID: <bug-1192-3@http.bugs.dpdk.org/> (raw)

[-- Attachment #1: Type: text/plain, Size: 5665 bytes --]

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

            Bug ID: 1192
           Summary: [dpdk-22.03][asan][mlx5]: detected memory leaks when
                    detach and attach device
           Product: DPDK
           Version: 23.03
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: kuka@cesnet.cz
  Target Milestone: ---

[DPDK version]
commit baf13c3135d0c5998fff7edc23fb89412dc89246 (HEAD, tag: v23.03-rc2)
Author: Thomas Monjalon <thomas@monjalon.net>
Date:   Sun Mar 12 15:44:17 2023 +0100

    version: 23.03-rc2

    Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

 VERSION | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[OS version]
Operating System: Oracle Linux Server 8.7
Kernel: Linux 4.18.0-348.12.2.el8_5.x86_64
Architecture: x86-64

[DPDK build]
CC=gcc meson -Db_sanitize=address -Db_sanitize-recover=address build
ninja -C build 

[Network devices]
0000:c4:00.0 'MT2892 Family [ConnectX-6 Dx] 101d' if=ens3f0np0 drv=mlx5_core
unused= 

[OFED version]
MLNX_OFED_LINUX-5.7-1.0.2.0 (OFED-5.7-1.0.2):

[Reproduce in testpmd]
$ dpdk-testpmd -c f -n 4  -a 0000:c4:00.0 -- -i
EAL: Detected CPU lcores: 64
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probe PCI driver: mlx5_pci (15b3:101d) device: 0000:c4:00.0 (socket -1)
TELEMETRY: No legacy callbacks, legacy socket not created
Interactive-mode selected
Warning: NUMA should be configured manually by using --port-numa-config and
--ring-numa-config parameters along with --numa.
testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will
pair with itself.

Configuring Port 0 (socket 0)
Port 0: 04:3F:72:C7:B8:88
Checking link statuses...
Done
testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done
testpmd> port detach 0
Port was not closed
Removing a device...
Port 0 is closed
Device is detached
Now total ports is 0
Done
testpmd> port attach 0000:c4:00.0
Attaching a new port...
EAL: Probe PCI driver: mlx5_pci (15b3:101d) device: 0000:c4:00.0 (socket -1)
Port 0 is attached. Now total ports is 1
Done
testpmd> port start 0
Configuring Port 0 (socket 0)
Port 0: 04:3F:72:C7:B8:88
Checking link statuses...
Done
testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
Port 0 is closed
Done

Bye...

=================================================================
==468463==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 21408 byte(s) in 1 object(s) allocated from:
    #0 0x7fda2f16ab77 in calloc (/lib64/libasan.so.6+0xb4b77)
    #1 0x4cd3cee in mlx5_flow_push_thread_workspace
(/usr/local/bin/dpdk-testpmd+0x4cd3cee)
    #2 0x4cddf8e in flow_list_create (/usr/local/bin/dpdk-testpmd+0x4cddf8e)
    #3 0x4ceefbd in mlx5_flow_discover_mreg_c
(/usr/local/bin/dpdk-testpmd+0x4ceefbd)
    #4 0x976d18 in mlx5_dev_spawn.cold (/usr/local/bin/dpdk-testpmd+0x976d18)
    #5 0x51f86a8 in mlx5_os_pci_probe_pf
(/usr/local/bin/dpdk-testpmd+0x51f86a8)
    #6 0x51fac13 in mlx5_os_net_probe (/usr/local/bin/dpdk-testpmd+0x51fac13)
    #7 0x3e94f1f in mlx5_common_dev_probe
(/usr/local/bin/dpdk-testpmd+0x3e94f1f)
    #8 0x61741a in pci_probe.cold (/usr/local/bin/dpdk-testpmd+0x61741a)
    #9 0x3c75fa9 in rte_bus_probe (/usr/local/bin/dpdk-testpmd+0x3c75fa9)
    #10 0x6056d7 in rte_eal_init.cold (/usr/local/bin/dpdk-testpmd+0x6056d7)
    #11 0xb3e0fb in main (/usr/local/bin/dpdk-testpmd+0xb3e0fb)
    #12 0x7fda2caddd84 in __libc_start_main (/lib64/libc.so.6+0x3ad84)

Direct leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x7fda2f16ab77 in calloc (/lib64/libasan.so.6+0xb4b77)
    #1 0x7fda2dddc3a6 in dr_action_create_generic (/lib64/libmlx5.so.1+0x1e3a6)

Direct leak of 32 byte(s) in 4 object(s) allocated from:
    #0 0x7fda2f16ab77 in calloc (/lib64/libasan.so.6+0xb4b77)
    #1 0x7fda2dde6fad in mlx5dv_dr_domain_create (/lib64/libmlx5.so.1+0x28fad)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7fda2f16ab77 in calloc (/lib64/libasan.so.6+0xb4b77)
    #1 0x4cd3d09 in mlx5_flow_push_thread_workspace
(/usr/local/bin/dpdk-testpmd+0x4cd3d09)
    #2 0x4cddf8e in flow_list_create (/usr/local/bin/dpdk-testpmd+0x4cddf8e)
    #3 0x4ceefbd in mlx5_flow_discover_mreg_c
(/usr/local/bin/dpdk-testpmd+0x4ceefbd)
    #4 0x976d18 in mlx5_dev_spawn.cold (/usr/local/bin/dpdk-testpmd+0x976d18)
    #5 0x51f86a8 in mlx5_os_pci_probe_pf
(/usr/local/bin/dpdk-testpmd+0x51f86a8)
    #6 0x51fac13 in mlx5_os_net_probe (/usr/local/bin/dpdk-testpmd+0x51fac13)
    #7 0x3e94f1f in mlx5_common_dev_probe
(/usr/local/bin/dpdk-testpmd+0x3e94f1f)
    #8 0x61741a in pci_probe.cold (/usr/local/bin/dpdk-testpmd+0x61741a)
    #9 0x3c75fa9 in rte_bus_probe (/usr/local/bin/dpdk-testpmd+0x3c75fa9)
    #10 0x6056d7 in rte_eal_init.cold (/usr/local/bin/dpdk-testpmd+0x6056d7)
    #11 0xb3e0fb in main (/usr/local/bin/dpdk-testpmd+0xb3e0fb)
    #12 0x7fda2caddd84 in __libc_start_main (/lib64/libc.so.6+0x3ad84)

SUMMARY: AddressSanitizer: 21600 byte(s) leaked in 8 allocation(s).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 7683 bytes --]

                 reply	other threads:[~2023-03-20 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-1192-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 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).