Netdev List
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: netdev@vger.kernel.org, bpf@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>
Subject: memory leaks after running bpf selftests
Date: Fri, 26 Aug 2022 19:50:47 +0200	[thread overview]
Message-ID: <YwkH9zTmLRvDHHbP@krava> (raw)

hi,
I'm getting memory leaks report after running test_progs,
on latest bpf-next/master, looks networking related

jirka


---
unreferenced object 0xffff888102b816c0 (size 232):
  comm "(ostnamed)", pid 534, jiffies 4294672162 (age 704.879s)
  hex dump (first 32 bytes):
    18 17 3c 19 81 88 ff ff c0 0a b8 02 81 88 ff ff  ..<.............
    00 c0 a6 1c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81c2c45e>] napi_skb_cache_get+0x4e/0x60
    [<ffffffff81c2c532>] __alloc_skb+0x52/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81c4e3e5>] netif_napi_add_weight+0x135/0x280
    [<ffffffff81cbc22a>] gro_cells_init+0x8a/0xe0
    [<ffffffff81ed8960>] ip6_tnl_dev_init+0xe0/0x1b0
    [<ffffffff81c567ea>] register_netdevice+0x19a/0x6b0
    [<ffffffff81c56d1a>] register_netdev+0x1a/0x30
    [<ffffffff81eda4b2>] ip6_tnl_init_net+0x1c2/0x440
    [<ffffffff81c3b678>] ops_init+0x38/0x160
    [<ffffffff81c3c1cf>] setup_net+0x17f/0x340
    [<ffffffff81c3dd7c>] copy_net_ns+0x10c/0x270
    [<ffffffff81181a67>] create_new_namespaces+0x117/0x300
    [<ffffffff811820a5>] unshare_nsproxy_namespaces+0x55/0xb0
    [<ffffffff8114e1bc>] ksys_unshare+0x19c/0x3b0
unreferenced object 0xffff888102b80ac0 (size 232):
  comm "(ostnamed)", pid 534, jiffies 4294672162 (age 704.879s)
  hex dump (first 32 bytes):
    c0 16 b8 02 81 88 ff ff 40 00 b8 02 81 88 ff ff  ........@.......
    00 c0 a6 1c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81c2c45e>] napi_skb_cache_get+0x4e/0x60
    [<ffffffff81c2c532>] __alloc_skb+0x52/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81c4e3e5>] netif_napi_add_weight+0x135/0x280
    [<ffffffff81cbc22a>] gro_cells_init+0x8a/0xe0
    [<ffffffff81ed8960>] ip6_tnl_dev_init+0xe0/0x1b0
    [<ffffffff81c567ea>] register_netdevice+0x19a/0x6b0
    [<ffffffff81c56d1a>] register_netdev+0x1a/0x30
    [<ffffffff81eda4b2>] ip6_tnl_init_net+0x1c2/0x440
    [<ffffffff81c3b678>] ops_init+0x38/0x160
    [<ffffffff81c3c1cf>] setup_net+0x17f/0x340
    [<ffffffff81c3dd7c>] copy_net_ns+0x10c/0x270
    [<ffffffff81181a67>] create_new_namespaces+0x117/0x300
    [<ffffffff811820a5>] unshare_nsproxy_namespaces+0x55/0xb0
    [<ffffffff8114e1bc>] ksys_unshare+0x19c/0x3b0
unreferenced object 0xffff888102b80040 (size 232):
  comm "(ostnamed)", pid 534, jiffies 4294672162 (age 704.879s)
  hex dump (first 32 bytes):
    c0 0a b8 02 81 88 ff ff c0 0d b8 02 81 88 ff ff  ................
    00 c0 a6 1c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81c2c45e>] napi_skb_cache_get+0x4e/0x60
    [<ffffffff81c2c532>] __alloc_skb+0x52/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81c4e3e5>] netif_napi_add_weight+0x135/0x280
    [<ffffffff81cbc22a>] gro_cells_init+0x8a/0xe0
    [<ffffffff81ed8960>] ip6_tnl_dev_init+0xe0/0x1b0
    [<ffffffff81c567ea>] register_netdevice+0x19a/0x6b0
    [<ffffffff81c56d1a>] register_netdev+0x1a/0x30
    [<ffffffff81eda4b2>] ip6_tnl_init_net+0x1c2/0x440
    [<ffffffff81c3b678>] ops_init+0x38/0x160
    [<ffffffff81c3c1cf>] setup_net+0x17f/0x340
    [<ffffffff81c3dd7c>] copy_net_ns+0x10c/0x270
    [<ffffffff81181a67>] create_new_namespaces+0x117/0x300
    [<ffffffff811820a5>] unshare_nsproxy_namespaces+0x55/0xb0
    [<ffffffff8114e1bc>] ksys_unshare+0x19c/0x3b0
unreferenced object 0xffff888102b80dc0 (size 232):
  comm "(ostnamed)", pid 534, jiffies 4294672162 (age 704.893s)
  hex dump (first 32 bytes):
    40 00 b8 02 81 88 ff ff 18 17 3c 19 81 88 ff ff  @.........<.....
    00 c0 a6 1c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81c2c45e>] napi_skb_cache_get+0x4e/0x60
    [<ffffffff81c2c532>] __alloc_skb+0x52/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81c4e3e5>] netif_napi_add_weight+0x135/0x280
    [<ffffffff81cbc22a>] gro_cells_init+0x8a/0xe0
    [<ffffffff81ed8960>] ip6_tnl_dev_init+0xe0/0x1b0
    [<ffffffff81c567ea>] register_netdevice+0x19a/0x6b0
    [<ffffffff81c56d1a>] register_netdev+0x1a/0x30
    [<ffffffff81eda4b2>] ip6_tnl_init_net+0x1c2/0x440
    [<ffffffff81c3b678>] ops_init+0x38/0x160
    [<ffffffff81c3c1cf>] setup_net+0x17f/0x340
    [<ffffffff81c3dd7c>] copy_net_ns+0x10c/0x270
    [<ffffffff81181a67>] create_new_namespaces+0x117/0x300
    [<ffffffff811820a5>] unshare_nsproxy_namespaces+0x55/0xb0
    [<ffffffff8114e1bc>] ksys_unshare+0x19c/0x3b0
unreferenced object 0xffff88812c3a3400 (size 1024):
  comm "test_progs", pid 686, jiffies 4294713342 (age 663.722s)
  hex dump (first 32 bytes):
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
  backtrace:
    [<ffffffff81c2c566>] __alloc_skb+0x86/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81a0a952>] tun_get_user+0x242/0x1250
    [<ffffffff81a0c2c0>] tun_chr_write_iter+0x50/0x90
    [<ffffffff81436faf>] do_iter_readv_writev+0xdf/0x140
    [<ffffffff81438fc4>] do_iter_write+0x84/0x1d0
    [<ffffffff81439205>] vfs_writev+0xc5/0x290
    [<ffffffff8143944f>] do_writev+0x7f/0x160
    [<ffffffff81fbd157>] do_syscall_64+0x37/0x90
    [<ffffffff8200009b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
unreferenced object 0xffff88812c3a4000 (size 1024):
  comm "test_progs", pid 686, jiffies 4294713342 (age 663.722s)
  hex dump (first 32 bytes):
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
  backtrace:
    [<ffffffff81c2c566>] __alloc_skb+0x86/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81a0a952>] tun_get_user+0x242/0x1250
    [<ffffffff81a0c2c0>] tun_chr_write_iter+0x50/0x90
    [<ffffffff81436faf>] do_iter_readv_writev+0xdf/0x140
    [<ffffffff81438fc4>] do_iter_write+0x84/0x1d0
    [<ffffffff81439205>] vfs_writev+0xc5/0x290
    [<ffffffff8143944f>] do_writev+0x7f/0x160
    [<ffffffff81fbd157>] do_syscall_64+0x37/0x90
    [<ffffffff8200009b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
unreferenced object 0xffff88812c3a1000 (size 1024):
  comm "test_progs", pid 686, jiffies 4294713342 (age 663.722s)
  hex dump (first 32 bytes):
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
  backtrace:
    [<ffffffff81c2c566>] __alloc_skb+0x86/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81a0a952>] tun_get_user+0x242/0x1250
    [<ffffffff81a0c2c0>] tun_chr_write_iter+0x50/0x90
    [<ffffffff81436faf>] do_iter_readv_writev+0xdf/0x140
    [<ffffffff81438fc4>] do_iter_write+0x84/0x1d0
    [<ffffffff81439205>] vfs_writev+0xc5/0x290
    [<ffffffff8143944f>] do_writev+0x7f/0x160
    [<ffffffff81fbd157>] do_syscall_64+0x37/0x90
    [<ffffffff8200009b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
unreferenced object 0xffff88812c3a1c00 (size 1024):
  comm "test_progs", pid 686, jiffies 4294713342 (age 663.741s)
  hex dump (first 32 bytes):
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
  backtrace:
    [<ffffffff81c2c566>] __alloc_skb+0x86/0x1c0
    [<ffffffff81c2c6db>] __napi_alloc_skb+0x3b/0xe0
    [<ffffffff81c8af09>] napi_get_frags+0x29/0x50
    [<ffffffff81a0a952>] tun_get_user+0x242/0x1250
    [<ffffffff81a0c2c0>] tun_chr_write_iter+0x50/0x90
    [<ffffffff81436faf>] do_iter_readv_writev+0xdf/0x140
    [<ffffffff81438fc4>] do_iter_write+0x84/0x1d0
    [<ffffffff81439205>] vfs_writev+0xc5/0x290
    [<ffffffff8143944f>] do_writev+0x7f/0x160
    [<ffffffff81fbd157>] do_syscall_64+0x37/0x90
    [<ffffffff8200009b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

             reply	other threads:[~2022-08-26 17:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 17:50 Jiri Olsa [this message]
2022-08-26 17:58 ` memory leaks after running bpf selftests Eric Dumazet

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=YwkH9zTmLRvDHHbP@krava \
    --to=olsajiri@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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