NVIDIA / NVIDIA/open-gpu-kernel-modules
kernel memory not released
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
NVIDIA Open GPU Kernel Modules Version
535.161.07
Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.
- I confirm that this does not happen with the proprietary driver package.
Operating System and Version
Debian GNU/Linux 12 (bookworm)
Kernel Release
Linux kv-research-1 6.1.76 #8 SMP PREEMPT_DYNAMIC Fri Mar 15 01:20:32 PDT 2024 x86_64 GNU/Linux
Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.
- I am running on a stable kernel release.
Hardware: GPU
NVIDIA GeForce RTX 4090
Describe the bug
leak.zip
please see the reproduce code attached.
I built the kernel myself with CONFIG_DEBUG_KMEMLEAK=y
the reproduce code is simply cudaHostAlloc a large area of memory and copy some random data into GPU memory.
after the program finishes, do
echo 'scan' > /sys/kernel/debug/kmemleak && cat /sys/kernel/debug/kmemleak
and you will got some leak info. please see attached file.
sometimes, maybe need some time. e.g 2-3min to get the kmemleak info after program finished which I don't know why.
kmemleak.log
To Reproduce
please see the reproduce code
Bug Incidence
Always
nvidia-bug-report.log.gz
More Info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction code in leak.zip and the attached kmemleak.log; review the reported allocations after cudaHostAlloc and GPU data transfer. Reproduce on Debian 12 with kernel 6.1.76 using CONFIG_DEBUG_KMEMLEAK and the documented scan command. Done means the reported kernel memory is released after the program exits and no corresponding leak remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100