From: Martin Weinelt <martin@linuxlounge.net>
To: "David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
netdev@vger.kernel.org
Subject: Re: Memory leaks in IPv6 ndisc on v4.19.56
Date: Tue, 2 Jul 2019 15:54:35 +0200 [thread overview]
Message-ID: <e430b2cd-e358-f328-5445-b5f681118ce3@linuxlounge.net> (raw)
In-Reply-To: <8fadeb22-2a9b-6038-01f9-bf32b5055965@linuxlounge.net>
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Hi again,
another backtrace just came up.
Best,
Martin
$ ./scripts/faddr2line /usr/lib/debug/lib/modules/4.19.56/vmlinux build_skb+0x11/0x80
build_skb+0x11/0x80:
build_skb at net/core/skbuff.c:314
$ ./scripts/faddr2line /usr/lib/debug/lib/modules/4.19.56/kernel/drivers/net/tun.ko tun_build_skb.isra.56+0x191/0x4d0
tun_build_skb.isra.56+0x191/0x4d0:
tun_build_skb at /home/hexa/git/linux-stable/drivers/net/tun.c:1687
On 7/2/19 3:05 PM, Martin Weinelt wrote:
> Hi everyone,
>
> I've been experiencing memory leaks on the v4.19 series. I've started
> seeing them on Debian with v4.19.16 and I can reproduce them on v4.19.56
> using Debians kernel config. I was unable to reproduce this on
> v5.2.0-rc6/rc7.
>
> [ 1899.380321] kmemleak: 1138 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
>
> On the machines in question we're running routers for a mesh networking
> setup based on the batman-adv kmod. Our setup consists of KVM guests
> running Debian, with each router having 18 bridges with the following
> master/slave relationship:
>
> bridge -> batman-adv -> {L2 tunnel, virtio net device}
>
> I've attached the output of kmemleak and I've looked up the top-most
> function offsets below:
>
> Best,
> Martin
>
>
> $ ./faddr2line /usr/lib/debug/lib/modules/4.19.56/vmlinux ndisc_recv_ns+0x356/0x5f0
> ndisc_recv_ns+0x356/0x5f0:
> __neigh_lookup at include/net/neighbour.h:513
> (inlined by) ndisc_recv_ns at net/ipv6/ndisc.c:916
>
> $ ./faddr2line /usr/lib/debug/lib/modules/4.19.56/vmlinux ndisc_router_discovery+0x4ab/0xae0
> ndisc_router_discovery+0x4ab/0xae0:
> __neigh_lookup at include/net/neighbour.h:513
> (inlined by) ndisc_router_discovery at net/ipv6/ndisc.c:1387
>
> $ ./faddr2line /usr/lib/debug/lib/modules/4.19.56/vmlinux ndisc_recv_rs+0x173/0x1b0
> ndisc_recv_rs+0x173/0x1b0:
> ndisc_recv_rs at net/ipv6/ndisc.c:1095
>
> $ ./faddr2line /usr/lib/debug/lib/modules/4.19.56/vmlinux ip6_finish_output2+0x211/0x570
> ip6_finish_output2+0x211/0x570:
> ip6_finish_output2 at net/ipv6/ip6_output.c:117
>
[-- Attachment #2: kmemleak2.log --]
[-- Type: text/x-log, Size: 1643 bytes --]
unreferenced object 0xffff98372c4c7900 (size 232):
comm "softirq", pid 0, jiffies 4296767615 (age 1191.500s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 10 f7 54 37 98 ff ff 00 00 00 00 00 00 00 00 ...T7...........
backtrace:
[<00000000857c2a4c>] build_skb+0x11/0x80
[<0000000076f6d169>] tun_build_skb.isra.56+0x191/0x4d0 [tun]
[<00000000c88dc3b6>] tun_get_user+0x9d4/0x1290 [tun]
[<000000000656b60d>] tun_chr_write_iter+0x4d/0x70 [tun]
[<00000000a0791a09>] __vfs_write+0x114/0x1a0
[<0000000043af9738>] vfs_write+0xb0/0x190
[<0000000093a5d2f3>] ksys_write+0x5a/0xd0
[<00000000ca8283f7>] do_syscall_64+0x55/0x100
[<00000000ea7ed8f5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0000000005a897b6>] 0xffffffffffffffff
unreferenced object 0xffff98372c4c7800 (size 232):
comm "softirq", pid 0, jiffies 4296768010 (age 1189.920s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 10 f7 54 37 98 ff ff 00 00 00 00 00 00 00 00 ...T7...........
backtrace:
[<00000000857c2a4c>] build_skb+0x11/0x80
[<0000000076f6d169>] tun_build_skb.isra.56+0x191/0x4d0 [tun]
[<00000000c88dc3b6>] tun_get_user+0x9d4/0x1290 [tun]
[<000000000656b60d>] tun_chr_write_iter+0x4d/0x70 [tun]
[<00000000a0791a09>] __vfs_write+0x114/0x1a0
[<0000000043af9738>] vfs_write+0xb0/0x190
[<0000000093a5d2f3>] ksys_write+0x5a/0xd0
[<00000000ca8283f7>] do_syscall_64+0x55/0x100
[<00000000ea7ed8f5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0000000005a897b6>] 0xffffffffffffffff
prev parent reply other threads:[~2019-07-02 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 13:05 Memory leaks in IPv6 ndisc on v4.19.56 Martin Weinelt
2019-07-02 13:54 ` Martin Weinelt [this message]
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=e430b2cd-e358-f328-5445-b5f681118ce3@linuxlounge.net \
--to=martin@linuxlounge.net \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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