Any cuda runtime call causes a SIGSEGV

Hi, I’m having this weird bugg for days now and I can’t understand what’s going on here.

The run goes successfully for like thirty iterations, and then (always at the same point) it crashes with a segmentation fault. My program is basicly about calling an Init() function to allocate all memory needed, then computing() N times the same algorithms before calling an End() function to free all memory previously allocated.

I’m doing cudaMemcpyAsync() in the computing() part before launching any kernel (which sounds like normal stuff to do) but at some point it just fails without any cudaError (of course I’ve checked for previous cudaError after having synchronized the computation but I ain’t got nothing).

I first thought my pointers were freed somewhere but it’s not the case apparently.
Then I thought about memory issue but when trying to call cudaMemGetInfo I’ve got a segfault too! Then I thought maybe the context was destroyed somewhere or I don’t know, that’s why I called a cudaSetDevice() but this time it ended up with a cudaError (saying that obviously I can’t change the device while processing).

cuda-gdb is of no help while gdb gave me this :

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaab5e39d1 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#1 0x00002aaaab61eb93 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#2 0x00002aaaab5ed499 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#3 0x00002aaaab5da380 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#4 0x00002aaaab5c6104 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#5 0x00002aaaab670ad9 in pthread_attr_setdetachstate () from /usr/lib64/
(gdb) up
#6 0x00002aaaab31b1bc in ?? () from /usr/local/cuda/lib64/
(gdb) up
#7 0x00002aaaab30f177 in cudaMemGetInfo () from /usr/local/cuda/lib64/

Except for cudaSetDevice(), every cuda call I tried ended up that way. Again, it’s working for some iterations and then it’s not. I have parameters that makes this work so I hardly think it might be anywhere else but in my code. However I just can’t get what’s happening and most of all, I’m running out of ideas now it’s killing me!

If you have any idea please let me know…

GeForce GTX480