cuEGLStreamConsumerConnect and cuEGLStreamConsumerDisconnect function would stuck in multithread frequent call?

Hi,

We have met a problem in cudaEGL, when we create some threads to run some video streams and then add a thread to do this: frequently add and delete instance in thread, and we found the program would stuck in random. and we found the location would happen in function cuEGLStreamConsumerConnect and cuEGLStreamConsumerDisconnect.

We write a demo in attachment. and you can run with you local file. please change you file path in main function line 57 and line 88.

The bug may happen in a minute, or may be in 2~3 minutes, please check it patient.

Thanks.
testVideo_ConAndDisc.tar.gz (6.43 KB)

Hi,

We are trying to reproduce this internally.
Do you think you meet the same issue with this topic:
https://devtalk.nvidia.com/default/topic/1045151

Thanks.

Hi.

Yes, we think this issue is the same with topic: https://devtalk.nvidia.com/default/topic/1045151 refer

Hi,

The locations are different, but the phenomenon is the same, we think it maybe caused by multithread. But we can’t assure, so you can debug with it.

Thanks.

Hi,

We can also reproduce this issue on our side.
Let’s focus on the previous topic first:
https://devtalk.nvidia.com/default/topic/1045151/pthread-mutex-lock-when-include-cugraphicseglregisterimage-call/

Thanks.