On Windows, every vkCreateDevice + vkDestroyDevice pair leaks exactly 3 kernel handles with drivers 616.92 and 617.42 (GeForce RTX 4070 Ti SUPER). The process handle count (GetProcessHandleCount) grows by 3 per cycle and never returns, also after vkDestroyInstance.
Repro (minimal, below): one VkInstance, then in a loop vkCreateDevice with a single graphics queue, no extensions and no features, vkDeviceWaitIdle, vkDestroyDevice.
| Configuration | Handles per cycle (50 cycles) |
|---|---|
| RTX 4070 Ti SUPER, 616.92 | 3.00 |
| RTX 4070 Ti SUPER, 617.42 | 3.00 |
Same, new VkInstance every cycle |
3.00 |
Same, all implicit layers disabled (VK_LOADER_LAYERS_DISABLE=~implicit~; loader log shows the call going straight to nvoglv64.dll) |
3.00 |
| AMD Radeon integrated GPU in the same machine, same loader and program | 0 |
| D3D12 and OpenGL on the same NVIDIA GPU (create/destroy device) | 0 |
Expected: the handle count returns to its previous value after vkDestroyDevice.
Impact: long-running applications that re-create devices (after device loss, or components that create and dispose a renderer on demand) lose 3 handles per re-creation.
System: Windows 11 Pro 10.0.26300, GeForce RTX 4070 Ti SUPER, drivers 616.92 and 617.42 (Vulkan API 1.4.351), Vulkan loader from the driver package.
Repro (Rust, ash = "0.38", windows = { version = "0.62", features = ["Win32_System_Threading"] }):
use ash::vk;
use windows::Win32::System::Threading::{GetCurrentProcess, GetProcessHandleCount};
fn handles() -> u32 {
let mut count = 0u32;
unsafe { GetProcessHandleCount(GetCurrentProcess(), &mut count).unwrap() };
count
}
fn main() {
unsafe {
let entry = ash::Entry::load().unwrap();
let app = vk::ApplicationInfo::default().api_version(vk::API_VERSION_1_3);
let instance = entry.create_instance(&vk::InstanceCreateInfo::default().application_info(&app), None).unwrap();
let physical = instance.enumerate_physical_devices().unwrap()[0];
let family = instance
.get_physical_device_queue_family_properties(physical)
.iter()
.position(|f| f.queue_flags.contains(vk::QueueFlags::GRAPHICS))
.unwrap() as u32;
let priorities = [1.0f32];
let queues = [vk::DeviceQueueCreateInfo::default().queue_family_index(family).queue_priorities(&priorities)];
let cycle = || {
let device = instance.create_device(physical, &vk::DeviceCreateInfo::default().queue_create_infos(&queues), None).unwrap();
device.device_wait_idle().unwrap();
device.destroy_device(None);
};
cycle(); // warm-up
let start = handles();
for i in 1..=50 {
cycle();
if i % 10 == 0 {
println!("cycle {i}: {:+} handles", handles() as i64 - start as i64);
}
}
instance.destroy_instance(None);
}
}
Output with 617.42:
cycle 10: +32 handles
cycle 20: +62 handles
cycle 30: +92 handles
cycle 40: +122 handles
cycle 50: +152 handles
Found while building a headless wgpu-based renderer; the same 3 handles per device show up through wgpu’s Vulkan backend, and not through its D3D12 or OpenGL backends.