Memery leak of nvdsgst_tracker.so

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) T4
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.2
• NVIDIA GPU Driver Version (valid for GPU only) 440
• Issue Type( questions, new requirements, bugs) BUGS
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
valgrind --tool=memcheck --leak-check=full ./deepstream-test5-app -c configs/test5_config_file_src_infer.txt

I found a memory leak in libnvDSgst tracker.so

==947141== 72,704 bytes in 1 blocks are definitely lost in loss record 7,409 of 7,446
==947141==    at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==947141==    by 0x154514F55: ???
==947141==    by 0x40108D2: call_init (dl-init.c:72)
==947141==    by 0x40108D2: _dl_init (dl-init.c:119)
==947141==    by 0x401539E: dl_open_worker (dl-open.c:522)
==947141==    by 0x7CD11EE: _dl_catch_exception (dl-error-skeleton.c:196)
==947141==    by 0x4014969: _dl_open (dl-open.c:605)
==947141==    by 0x7F5BF95: dlopen_doit (dlopen.c:66)
==947141==    by 0x7CD11EE: _dl_catch_exception (dl-error-skeleton.c:196)
==947141==    by 0x7CD127E: _dl_catch_error (dl-error-skeleton.c:215)
==947141==    by 0x7F5C744: _dlerror_run (dlerror.c:162)
==947141==    by 0x7F5C050: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==947141==    by 0x502C5FAE: NvTrackerProc::initTrackerLib() (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141== 
==947141== 88,244 (8,192 direct, 80,052 indirect) bytes in 1 blocks are definitely lost in loss record 7,413 of 7,446
==947141==    at 0x4C33B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==947141==    by 0x14603DD06: ???
==947141==    by 0x14603EA5B: ???
==947141==    by 0x13561E6CA: ???
==947141==    by 0x135649C06: ???
==947141==    by 0x13564B33A: ???
==947141==    by 0x502C6965: NvTrackerProc::initTrackerContext() (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141==    by 0x502C8BCE: NvTrackerProc::processSurfaceStream(NvTrackerProc::DispatchInfo*) (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141==    by 0x502D20C8: void std::__invoke_impl<void, void (NvTrackerProc::*)(NvTrackerProc::DispatchInfo*), NvTrackerProc*, NvTrackerProc::DispatchInfo*>(std::__invoke_memfun_deref, void (NvTrackerProc::*&&)(NvTrackerProc::DispatchInfo*), NvTrackerProc*&&, NvTrackerProc::DispatchInfo*&&) (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141==    by 0x502CD726: std::__invoke_result<void (NvTrackerProc::*)(NvTrackerProc::DispatchInfo*), NvTrackerProc*, NvTrackerProc::DispatchInfo*>::type std::__invoke<void (NvTrackerProc::*)(NvTrackerProc::DispatchInfo*), NvTrackerProc*, NvTrackerProc::DispatchInfo*>(void (NvTrackerProc::*&&)(NvTrackerProc::DispatchInfo*), NvTrackerProc*&&, NvTrackerProc::DispatchInfo*&&) (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141==    by 0x502E4E36: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)(), (_S_declval<2ul>)())) std::thread::_Invoker<std::tuple<void (NvTrackerProc::*)(NvTrackerProc::DispatchInfo*), NvTrackerProc*, NvTrackerProc::DispatchInfo*> >::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141==    by 0x502E4D73: std::thread::_Invoker<std::tuple<void (NvTrackerProc::*)(NvTrackerProc::DispatchInfo*), NvTrackerProc*, NvTrackerProc::DispatchInfo*> >::operator()() (in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_tracker.so)
==947141== 

Sorry for the late response, will do the invrstigation soon.

We have reproduced the memory leak and the fix will be available in the future release.

1 Like
  • Could you please tell me which version of the repair?

Currently there is no clear date. But it will be very close.