Freezes during kernel execution

I have the problem that fairly simple kernels which are executed in far less than 5s often make my machine freeze (for a few seconds and sometimes completely). This happens with my own kernels as well as with some of the examples of the SDK.
Does anyone know why this happens? I’ve read about that 5s watchdog limitation but this also happens with kernels which are executed in less than 20ms.

I’ve seen this happen when writing to invalid memory locations. Double check your allocation/indices for global memory arrays, dynamic shared memory, etc. It could also be a synchronization problem, possibly caused by threads misbehaving due to incorrect usage of __syncthreads().