Cuda -> GL streamer: DW_BUSY_WAITING

In my code a CUDA frame is posted from a (non-main) thread to a CUDA to GL streamer, and is received by the main thread that does rendering in GL. I am using a virtual camera to simulate incoming frames from a real camera. For the first few frames this works fine, but after about 4 frames the streamer starts complaining with DW_BUSY_WAITING, which does not resolve until the end of the incoming video stream. How do I circumvent this issue?
I do return the frame to the pool after I receive one.

Dear 1reinier,
is it possible to post your code here to understand the problem

It boils down to this:

Non-main thread posts a non-NULL frame in CUDA format:

dwStatus result = dwImageStreamer_postCUDA(frame_rgba, manager->cuda2gl_stream_handle);

The main thread is visualizing stuff in GL, and receives a gl frame handle:

dwImageGL *frame_gl;
dwTime_t timeout = 6'000'000; // 6 seconds
dwStatus result = dwImageStreamer_receiveGL(&frame_gl, timeout, manager->cuda2gl_stream_handle);

For the first 4 frames this works as intended, and frame_gl gets set. After that dwImageStreamer_postCUDA complains about DW_BUSY_WAITING, and dwImageStreamer_receiveGL times out.

What could be the issue here?

Dear 1reinier,
The code protion you have provided is not giving any hints. Can you post the code here so that I can reproduce it.

Dear 1reinier,
DW_BUSY_WAITING error indicates the producer is posting more frames before you release them on consumer side. Please check that.

Hope this helps