We use gstreamer to decode video and each time we recreate the pipeline in our program some NVIDIA related threads are recreated without destroying the old ones. Furthermore, we think that one of those threads may be holding a syncpt and never freeing it, which causes our program to fail when the system runs out of syncpts.
It’s possible to reproduce it running gst-launch-1.0 for the encoder pipeline and gstd for the decoder pipeline:
gst-launch-1.0 videotestsrc is-live=true pattern=18 do-timestamp=TRUE ! capsfilter caps=“video/x-raw,format=(string)UYVY,width=(int)1280,height=(int)720,framerate=(fraction)50/1” ! nvvidconv ! capsfilter caps=“video/x-raw(memory:NVMM),format=(string)I420” ! nvv4l2h264enc ! queue ! rtph264pay ! udpsink host=127.0.0.1 port=5000 sync=FALSE async=FALSE &
gstd &
gstd-client pipeline_create dec udpsrc port=5000 ! application/x-rtp,encoding-name=H264,media=video,clock-rate=90000 ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! fakesink
And then playing and stopping the decoder pipeline various times:
gstd-client pipeline_play dec
sleep 3
gstd-client pipeline_stop dec
sleep 1
gstd-client pipeline_play dec
sleep 3
gstd-client pipeline_stop dec
sleep 1
gstd-client pipeline_play dec
sleep 3
gstd-client pipeline_stop dec
sleep 1
Reading /sys/kernel/debug/tegra_host/status_all we don’t see anything wrong until the third run. From that moment, each run (play+stop of the decoding pipeline) leaves a synpt blocked (not freed).
And if we run ‘cat inspect /proc/$(pidof gstd)/task/*/comm’, we see that each run has left 4 threads with the names:
NVMDecBufProcT
NVMDecDisplayT
NVMDecFrmStatsT
NVMDecVPRFlrSzT
That are never destroyed until gstd is killed.
Can you please help us to find a solution?
Best regards, Dani.