Memory leak for pipeline which contains nvosd and input-selector on deepstream 5.0

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX

• DeepStream Version
5.0

• JetPack Version (valid for Jetson only)
4.5(L4T 32.5.0)

• TensorRT Version
7.1.3.0

• NVIDIA GPU Driver Version (valid for GPU only)
N/A

• 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)
We want to use “input-selector” plugins in our app, but we found that, if we use the “input-selector” and “nvosd” together, there will be a memory leak on our device.

The app pipeline is simple :
rtspsrc(2 video stream) → streammux → nvinfer → nvtracker → input-selector → nvosd → fakesink
You can find the details in below codes and configure files.
And the codes are based on deepstream 5.0 sample code, and it can be built and run.
With below codes, you will see the memory leak problem.

deepstream_app.h (6.2 KB)
deepstream_app.c (51.0 KB)
source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt (5.6 KB)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
We want to use “input-selector” plugins in our app, but we found that, if we use the “input-selector” and “nvosd” together, there will be a memory leak on our device.

We did some further investigation, and we found that the memory leaks at function “nvll_osd_put_text()” and “nvll_osd_draw_rectangle()” in gstnvdsosd.c, if we comment these 2 function, build and re-install nvosd plugin, the memory leak disappered.

Our team will do the investigation and provide suggestions soon. Thanks

Can you upgrade to latest DeepStream 6.0.1?

Our app run with deepstream 5.0(now we still use jp4.5 for our device), and it is not possible to upgrade our app to run with deepstream 6.0 in near future, could you please verify it on ds5.0?

The old DeepStream version is not supported now.

We have test the same code on deepstream 6.0.1, the issue is still existed.
Memory leak quickly.

Yes. There is memory leak with use the “input-selector” and “nvosd” together even with DS 6.1. We will fix the problem in future release.

Hello @user19137 , Topic closed as moved to NVOnline.