Flickering and freeze when under heavy CPU load in-game

On the game we are developing, we undergo sever flickering and freezes with nvidia cards. Only OpenGL usage, no cuda nor OpenCL. Each flickering matches a log call:

NVRM: Xid (0000:02:00): 13, 0001 00000000 00008297 000015f0 12a61249 00000080

No idea what does that means. If anybody knows the meaning of error code 13, you’re welcome :).

It seems to depend heavily with cpu load on the threads in-game. If I reduce thread loads, flickering reduces, even stops, but if I keep computation on worker threads, it ends with a total freeze after a few seconds with log:

NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context.

I can’t even remote login with SSH in this case.

We’ve tried more or less anything we found on the internet without any success.

Does anybody experience such behaviour ? I’m interested in any suggestions about this issue. At least some workarounds could allow us to give a solution to our customers.

Edit : we tested on drivers 304 and 319.21 with GTS 250.