NVContainer Handle Memory leak

NVcontainer leaks handles over time. over 24 hours of the PC idling its managed to reach 1.1M handles.

Driver version:

Sat Jun 20 13:33:23 2026
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 546.17                 Driver Version: 546.17       CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
PS C:\Users\anon> Get-Process | Sort-Object Handles -Descending | Select-Object -First 15 Name, Id, Handles

Name                     Id Handles
----                     -- -------
nvcontainer            7764 1106947
dwm                    1980  841214
NVDisplay.Container    3536  135843
System                    4   29713

this causes kernel32:CreateToolhelp32Snapshot to take exceedingly long, (500ms in my test) which causes the entire computer to turn into a snail :3

Second independent reproduction here, on different hardware and a much newer driver. I can also supply the handle type breakdown that the original report was missing.

System

  • Lenovo Legion Pro 7 16IAX10H, Intel Core Ultra 9 275HX, 32 GB
  • NVIDIA GeForce RTX 5080 Laptop GPU, driver 32.0.16.1074 (2026-07-01)
  • Windows 11 Pro 26200.8875
  • Uptime at capture: 25d 21h

Handle types (Sysinternals handle64 -s, elevated)

nvcontainer.exe (PID 1425564) — 1,089,079 handles, 30 live threads
  Thread          : 486752
  Event           : 486934
  Desktop         : 115013
  ...all other types < 200

NVDisplay.Container.exe (PID 2596604) — 115,750 handles, 34 live threads
  Desktop         : 115010
  ...all other types < 250

Three observations that may narrow it down:

  1. Thread and Event counts are near-identical (486,752 / 486,934). That pattern suggests a worker routine creating a thread + event pair per iteration and closing neither handle. Rate works out to ~783/hour, i.e. one pair every ~4.6 seconds.

  2. The Thread handles are zombies. Only 30 threads are actually live. The 486,752 thread objects are kept resident purely by the open handles, and each pins ~8 KB of nonpaged pool for its kernel stack. System-wide I measured 517,987 thread objects against 6,502 live threads, and the arithmetic closes:

    Nonpaged pool measured : 3,962 MB
    Zombie thread objects  : 517,987
    Bytes per zombie       : ~8,022   (= the 8 KB x64 kernel stack)
    

    So ~4 GB of wired, never-pageable kernel memory.

  3. A separate Desktop object leak, in lockstep across both processes. nvcontainer is at 115,013 and NVDisplay.Container at 115,010 — three apart after 25 days, both climbing ~185/hour. Two processes leaking at an identical rate points at a shared component rather than two independent bugs. Desktop objects are a scarce session-scoped resource and exhausting them causes window-creation failures and UI stalls, so this may be the mechanism behind the “app stops responding for a few seconds” reports.

Confirming your CreateToolhelp32Snapshot finding

You measured ~500 ms. On this machine, 10 consecutive calls with TH32CS_SNAPPROCESS:

median 408.2 ms | min 386.5 ms | max 495.4 ms

Healthy baseline is 1–10 ms. Anything polling the process list — game-detection in chat clients, launchers, overlays, monitoring tools — stalls on every poll, which is how this surfaces to users as general system input lag rather than as a GPU problem.

One difference from your report: you reached 1.1M handles in ~24 hours idle; this machine took ~25 days to reach 1.09M. Same signature, roughly 25x slower accumulation. Could be a different trigger path, a partially-addressed variant, or workload-dependent. Worth noting rather than assuming they’re identical.

Reproduction

Get-Process nvcontainer, NVDisplay.Container |
  Select-Object Name, Id, Handles, @{n='LiveThreads';e={$_.Threads.Count}}

Type breakdown, elevated:

handle64.exe -accepteula -nobanner -s -p <PID>

Restarting NvContainerLocalSystem releases the handles and reclaims the pool, confirming they are held by the service. It is not a fix — accumulation resumes immediately.


  • Info gathered by my agent on my behalf and I had it draft this reply for me.

NVContainer handle leak causes severe system-wide process enumeration latency and periodic game stalls

I encountered a reproducible NVContainer handle leak that eventually caused severe system-wide latency when applications enumerate processes.

Observed state before restarting the NVIDIA container service:

  • nvcontainer.exe open handles: 1,082,171

  • Live threads: 26

  • Windows nonpaged pool: 3.47 GB

  • CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS): 305–318 ms per call

I originally discovered this through PRAGMATA. The game was running normally at 300+ FPS but would freeze for roughly 325–450 ms every 10–15 seconds.

An ETW/WPA trace showed that during every freeze, the relevant PRAGMATA thread was blocked while Windows enumerated process/thread information through NtQuerySystemInformation / CreateToolhelp32Snapshot.

I then benchmarked CreateToolhelp32Snapshot independently outside the game and measured 305–318 ms, closely matching the duration of the game stalls.

After closing PRAGMATA and restarting the NvContainerLocalSystem service:

  • The million-handle nvcontainer process disappeared

  • CreateToolhelp32Snapshot dropped from ~310 ms to 4–12 ms

  • Nonpaged pool dropped from 3.47 GB to 1.51 GB

  • The periodic PRAGMATA stutter disappeared completely

This appears to be the same issue described here:

The important consequence is that the leak does not only consume memory/handles. Once enough handles accumulate, Windows process enumeration becomes hundreds of milliseconds slower, causing visible stalls in any application that periodically enumerates the process list.

Restarting NvContainerLocalSystem clears the condition, but this appears to be a temporary mitigation rather than a fix because the handles can begin accumulating again.

My specs:

Component Result
CPU AMD Ryzen 9 9950X3D
GPU NVIDIA GeForce RTX 5080, 16 GB VRAM
RAM About 32 GB
GPU driver 616.92
Windows Windows 11, version 25H2 (build 26200)
nvcontainer (PID 13844) ~2.31 million Severe leak

Hello, my computer is lagging and i asked AI to check whats wrong and he pointed me to this already several times. can you please let me know what do i need to do to not have this issues? the mouse keeps stuttering