Handle leak bug in nvcuda.dll

This test application will result in Windows handle leak .
In the task manager, please notice the handle counter, it will increase continually.

Project files are attached.

Related info:
Windows XP SP2 (32bit)
CUDA Beta2
DELL T5400
CPU: Xeon 5410
Card 1: XFX 8800GT 512MB
Card 2: Quadro NVS 290( Primary card for display)
GlobalObj.zip (7.3 KB)

Could anybody from Nvidia confirm this, please?

By the way, the display card driver version is

I have written another DLL with runtime APIs. This bug still exists in this manner. Everytime when you call “LoadLibrary” and “FreeLiabray”, application will leak three handles each time.

This situation is really bad for me. My application will run million times per day. Handle leak will run out of handles resource.

I wish this bug would be fixed in CUDA 2.0.

I love CUDA though bugs are really annoying.

Thank for reporting this.

On my system your test application prints:

InitDevice: 0
GetDevice: 0
InitCtx: 0

and then crashes, is this the intended behaviour?

If you have found other bugs please report them.

No, this is not a intended behaviour.

This test application prints:


InitDevice: 0

InitCtx: 0

DestroyCtx: 0


It doesn’t crash on my system.

If I install display card driver version 175.19, there is no handle leak.

But my application written with CUDA 1.1 runs very slow.

I changed another display card – 9800GTX, and installed driver version 177.79, there is still a handle leak, but the application speed is normal.

And the version 169.21 driver has no handle leak.

The handle leak is relative to the driver. It has nothing to do with CUDA.

Could anyone from NVIDIA confirm this?