BUG report: GstCaps object leak in

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Tesla T4
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) No
• TensorRT Version same as devel docker
• NVIDIA GPU Driver Version (valid for GPU only) 10.2

I have implemented runtime source addition and deletion with deepstream-test5-app similar as CUDA Memory Leak Problem While Runtime Souce Addition/Deletion. The program shows gradually memory leak problem, at speed about 1G/h.

I use the gst-tracer to trace leaked objects. It shows there’re lots of (linear to the number of sources processed) GstCaps objects remains alive after program exits with refcount=1. The trace stack shows it is related to ‘libgstnvvideo4linux2’.

Is there any way to fix it?

0:02:48.320854371 e[334m28437e[00m 0x560a2ce8e130 e[37mTRACE  e[00m e[00;34m          GST_TRACER :0::e[00m object-alive, type-name=(string)GstCaps, address=(gpointer)0x7f789c004f70, description=(string)video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)30000/1001, ref-count=(uint)1, trace=(string)/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x6688c) [0x7f79cc08088c]
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoretracers.so(+0x4b83) [0x7f79c7e78b83]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_mini_object_init+0x98) [0x7f79cc08b3a8]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_caps_new_empty+0x33) [0x7f79cc060183]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_caps_new_simple+0x79) [0x7f79cc060379]
/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0(gst_video_info_to_caps+0x90) [0x7f79cc388af0]
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so(+0xdb05) [0x7f78fc383b05]
/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0(+0x3eea1) [0x7f79cc393ea1]
/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0(+0x41994) [0x7f79cc396994]
/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0(+0x42072) [0x7f79cc397072]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x7688b) [0x7f79cc09088b]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_pad_push+0x103) [0x7f79cc098bb3]
/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0(+0x41caf) [0x7f79cad1bcaf]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x7688b) [0x7f79cc09088b]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_pad_push+0x103) [0x7f79cc098bb3]
/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0(gst_base_parse_push_frame+0xcb8) [0x7f79cad00728]
/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0(gst_base_parse_finish_frame+0x4eb) [0x7f79cad0328b]
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoparsersbad.so(+0xfe5e) [0x7f7920119e5e]
/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0(+0x215a2) [0x7f79cacfb5a2]
/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0(+0x2743e) [0x7f79cad0143e]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x7688b) [0x7f79cc09088b]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_pad_push+0x103) [0x7f79cc098bb3]
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so(+0x2ba64) [0x7f79bb030a64]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0xab269) [0x7f79cc0c5269]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x74b40) [0x7f79cbb23b40]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x74175) [0x7f79cbb23175]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f79c9a546db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f79cb4a788f]

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Have you tried gst-tracer with the original deepstream-test5-app? Is there any GstCaps leak with the original deepstream-test5-app?