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
>
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