FFmpeg in CUVID mode hangs on cuvidDestroyDecoder(), decoder 100%

I already reported issue on FFmpeg bug tracker, but it seems that it could be problem with CUDA itself: https://trac.ffmpeg.org/ticket/6058 I already described the symptoms there.

The problem is that after processing this file, decoder usage is 100% and ffmpeg hangs at

cuvidDestroyDecoder()

. The process is unkillable, even

killall -9 ffmpeg

doesn’t work.

Can it be some ffmpeg API misusage, which causes the card to process indefinitely? cuvidDestroyDecoder() should interrupt the processing anyway.

Can you test it on Pascal?

We have some seriouse issues on Maxwell second Generation (GTX 960) which are not seen on Pascal (GTX 1070, GTX 1080).

Only way is to reboot system, even nvidia driver couldn’t be removed and decoder still show full load.

I run some tests and replied to ffmpeg bug:

Thank YOU for finding this bug (epsecialy for testing data!), we had alotof crashes on our systems while decoding with cuvid and MPEG2!

I can reproduce this behavior on Nvidia GTX 960 (maxwell second gen GM206), but it works without any problems on GTX 1060, 1070 and 1080 (we have alotof nvidia cards).

What is very strange is that i can’t reproduce this on Quadro M4000, which is also Maxwell but GM204. So my first opinion is that affected are only GM206 cards.

Could anyone test this sample on GTX970/980 with GM204?

Solution could be for now to switch to GTX 1050 which has also 2x faster encoder :)

By the way i think it could be in CUDA or in NVDEC engine so driver fix from NVIDIA is needed. It is not bug in ffmpeg itself.

I just ran the test on GeForce GTX 750 Ti without problems. Seems like only 9xx are affected.