iovisor / iovisor/bcc

Memleak runs on certain distributions, with a trace call stack depth of only 1 for the kernel

Open
#5,268 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

Memleak runs on certain distributions, with a trace call stack depth of only 1 for the kernel
```
[root@localhost ~]# uname -r
4.19.90-89.20.v2401.ky10.x86_64
[root@localhost ~]# sudo ./memleak
using default object: libc.so.6
using page size: 4096
Attaching to kernel allocators, Ctrl+C to quit.
[10:45:48] Top 5 stacks with outstanding allocations:
7606272 bytes in 1857 allocations from stack
0 [] __alloc_pages_nodemask+0x1e8
15680 bytes in 23 allocations from stack
0 [] kmem_cache_alloc_trace+0x13d
2872 bytes in 12 allocations from stack
0 [] kmem_cache_alloc+0x13a
1184 bytes in 8 allocations from stack
0 [] __kmalloc+0x15d
8 bytes in 1 allocations from stack
0 [] __kmalloc_track_caller+0x152
[10:45:53] Top 8 stacks with outstanding allocations:
7626752 bytes in 1862 allocations from stack
0 [] __alloc_pages_nodemask+0x1e8
15776 bytes in 25 allocations from stack
0 [] kmem_cache_alloc_trace+0x13d
8152 bytes in 2 allocations from stack
0 [] kmem_cache_alloc_node+0x1a4
6000 bytes in 17 allocations from stack
0 [] __kmalloc+0x15d
5600 bytes in 22 allocations from stack
0 [] kmem_cache_alloc+0x13a
64 bytes in 1 allocations from stack
0 [] kmem_cache_alloc_node_trace+0x19b
32 bytes in 1 allocations from stack
0 [] __kmalloc_node+0x1ba
8 bytes in 1 allocations from stack
0 [] __kmalloc_track_caller+0x152
^C[10:45:54] Top 9 stacks with outstanding allocations:
7630848 bytes in 1863 allocations from stack
0 [] __alloc_pages_nodemask+0x1e8
15776 bytes in 25 allocations from stack
0 [] kmem_cache_alloc_trace+0x13d
8664 bytes in 3 allocations from stack
0 [] kmem_cache_alloc_node+0x1a4
6000 bytes in 17 allocations from stack
0 [] __kmalloc+0x15d
5600 bytes in 22 allocations from stack
0 [] kmem_cache_alloc+0x13a
2048 bytes in 1 allocations from stack
0 [] __kmalloc_node_track_caller+0x1a7
64 bytes in 1 allocations from stack
0 [] kmem_cache_alloc_node_trace+0x19b
32 bytes in 1 allocations from stack
0 [] __kmalloc_node+0x1ba
8 bytes in 1 allocations from stack
0 [] __kmalloc_track_caller+0x152
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing ./memleak with the reported kernel version and review how it attaches to kernel allocators and collects call stacks. Compare the output with a distribution where deeper kernel stacks are reported. Done means the affected distributions provide the expected kernel trace depth, with a regression check for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
observability, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.