Command Console Hangs during cudaMalloc on Headless GPU

Here’s my GPU configuration:
Cuda Device 0: GTX 470
Cuda Device 1: GTS 450 (Headless, as a debug gpu)
CUDA ToolKit Version: 4.0
OS: Windows 7 64bit

Driver: Forceware 270.33

IDE: VS2010

Here’s my code:

global void test(…)

int main() {
const int x = 1; // Now select GTS450
float k;
cudaSetDevice(x);
cudaMalloc((void
*)&k, sizeof(float) * 999);

cudaFree(k);
return 0;
}

If I set x to 0 (Using GTX470), it won’ t hang during cudaMalloc execution.
If I set x to 1, the console screen hangs and it cannot be closed. It causes my machine to stop responding after closing windows to restart.

This situation only happens on CUDA 4.0. It does not happen in CUDA 3.2.

Thanks!