Kernel memory leak from 535 to 550

Hi, I have a long running cuda program which is using cublas heavily. when I quit that program by ctrl+c, I found kernel memory leak from /sys/kernel/debug/kmemleak.

My OS is debian 12.5 and kernel version is 6.1.76. the kernel is compiled by myself with with debian’s default config except CONFIG_DEBUG_KMEMLEAK option enabled.

I have 4 4090 and I’m calling cudaMalloc, cudaHostAlloc(Protable, WriteCombined) from multiple threads. I don’t known if this is matter.

please see the kmemleak log attached
kmemleak.log (2.1 MB)

Hi @sjy1
Could you please help to share reproducer file along with repro steps.

Hi, please see the leak.zip. I also submitted a issue at github kernel memory release · Issue #613 · NVIDIA/open-gpu-kernel-modules · GitHub
leak.zip (2.0 KB)

After some work, I’ve noticed it’s only related cudaHostAlloc and cublasSetMatrix. other parts are not related. the leak.zip is a minimal reproduce code.