Re: bug: frozen map leaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 2, 2020 at 3:47 PM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote:
>
> > after successful test_progs run I see a bunch of leaked maps:
> > # bpftool m s
> > 3: array  name iterator.rodata  flags 0x480
> >     key 4B  value 98B  max_entries 1  memlock 8192B
> >     btf_id 4  frozen
> > 9: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 145B  max_entries 1  memlock 8192B
> >     btf_id 13  frozen
> > 12: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 144B  max_entries 1  memlock 8192B
> >     btf_id 14  frozen
> > 13: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 85B  max_entries 1  memlock 8192B
> >     btf_id 15  frozen
> > 14: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 45B  max_entries 1  memlock 8192B
> >     btf_id 16  frozen
> > 15: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 40B  max_entries 1  memlock 8192B
> >     btf_id 17  frozen
> > 17: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 55B  max_entries 1  memlock 8192B
> >     btf_id 18  frozen
> > 19: array  name bpf_iter.rodata  flags 0x480
> >     key 4B  value 14B  max_entries 1  memlock 8192B
> >     btf_id 19  frozen
> >
> > Andrii,
> > I suspect it's due to libbpf doing BPF_PROG_BIND_MAP now.
> >
> > Stanislav,
> > could you take a look ?
> Interesting. I can reproduce with 'test_progs -t snprintf_btf':
>
> 5: array  name netif_re.rodata  flags 0x480
>         key 4B  value 13312B  max_entries 1  memlock 20480B
>         btf_id 5  frozen
> 10: array  name pid_iter.rodata  flags 0x480
>         key 4B  value 4B  max_entries 1  memlock 8192B
>         btf_id 10  frozen
>         pids bpftool(276)
> 11: array  flags 0x0
>         key 4B  value 32B  max_entries 1  memlock 4096B
>
> I suppose we do BPF_PROG_BIND_MAP only to #11, so I'm puzzled why
> rodata is also leaking.

all .rodata maps are also BPF_PROG_BIND_MAP'ed by libbpf, if kernel is
recent enough

> Will try to take a look!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux