I’m using DriveWorks SDK v0.6.67 to create some NvMedia -> CUDA cross process image streamers in order to make images acquired from 8 connected camera sensors available to multiple client processes.
As a starting point, I used the Driveworks example located at /usr/local/driveworks/samples/src/image/image_streamer_cross_process, setting a 10 seconds timeout for the image streamers.
The producer application runs fine for the first 40~45 minutes, but then the following error message gets printed on screen:
ImgAddFences: Couldn’t find a place to store the fences
NvMediaEglStreamProducerGetImage: Failed to add read fence
ImageStreamer: timeout waitPosted, producer waited for 10000 ms.
The call to dwImageStreamer_waitPostedNvMedia() then returns DW_TIME_OUT.
If I try to call dwImageStreamer_waitPostedNvMedia() again on the same streamer, I get the same result over and over again.
The consumer application does not display any error message from the corresponding streamer.
Since this error seems to be unrecoverable, the first solution that came to my mind was to destroy the faulty streamer object and then create a new image streamer to continue working with.
The problem with this approach is that, after the call to dwImageStreamer_waitPostedNvMedia() fails, the NvMedia image posted through the faulty streamer cannot be deleted via dwImageNvMedia_destroy() without causing a segmentation fault.
Am I misusing the image streamer in any way?
I also tried to use an NvMedia -> NvMedia cross process streamer (which the documentation states is ideal for cross-process applications), in order to see if changing the streamer type would have solved the problem, but the streamer creation always fails with a DW_NOT_AVAILABLE error.
I’m at a loss here… Can anybody please shed some light on the subject?
If that helps, the image streamers and the dwContextHandle_t object are created from different threads.
Any help would be greatly appreciated!
Thanks in advance!