Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unloading kernel modules causes the message kmemleak: 858 new suspected memory leaks (see /sys/kernel/debug/kmemleak) #162

Open
ol-damirm opened this issue Jul 26, 2023 · 3 comments

Comments

@ol-damirm
Copy link
Contributor

Unloading kernel modules causes the message kmemleak: 858 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
I see this message on the kernel with KMEMLEAK enabled in the kernel config.

How to reproduce:

$ git clone https://github.com/Xilinx-CNS/onload
$ cd onload
$ ./scripts/onload_build --debug --kernel
$ cd build/x86_64_linux-6.1.31-1-debug-amd64/driver/linux
$ sudo ./load.sh
$ sudo ./unload.sh
$ sleep 15m
# from console: [ 2468.287909][ T4562] kmemleak: 858 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
$ sudo cat /sys/kernel/debug/kmemleak > kmemleak-onload-ba03aac0.txt

I see it after the commit ba03aac "onload_mktest_net_driver: Replacing net driver with v5_3_14_1016" on:

  • Distro: Debian-12
  • Linux 6.1.31-1-debug-amd64
  • NIC: Solarflare Communications SFC9120 10G Ethernet Controller

I attached the output from the last command from the reproducer: kmemleak-onload-ba03aac0.txt

@ol-alexandra
Copy link
Contributor

linux-6.1.31-debug-config.txt
This is the config file used to build the kernel.

@rhughes-xilinx
Copy link

I'm assuming those undecoded symbols in the backtraces are from within our drivers. Can you grab a copy of /proc/kallsyms while the driver is loaded so that we can decode the backtraces retroactively?

@ol-damirm
Copy link
Contributor Author

@rhughes-xilinx Yes, here are the files:
proc-kallsyms.txt
kmemleak.txt

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants