Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU (Tesla T4) • DeepStream Version 7.1 • TensorRT Versionnvcr.io/nvidia/deepstream:7.1-triton-multiarch • NVIDIA GPU Driver Version (valid for GPU only) 535 • 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)
The issue is occuring in deepstream-test4 python sample application running with kafka. I have updated its code to use uridecodebin for rtsp source and set the message frequency to every 5th frame.
I ran 6 concurrent process with different kafka topics and observed that RAM usage continuously increases. Attached is the graph of container memory usage which clearly indicates memory leak issue.
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
We have multiple streams running on the client’s server, and after a week, the memory becomes full, causing the system to crash. The issue is most likely a memory leak occurring when allocating data in osd_sink_pad_buffer_probe for event msg meta and object meta. I also tested the same setup by commenting out osd_sink_pad_buffer_probe, and in that case, no memory leak was observed.
If possible, please confirm the issue and let me know if there are any available workarounds.
1.This is a known issue, but has not been released yet.
You can refer to the following patch to modify the local code, and recompile and install /opt/nvidia/deepstream/deepstream/sources/libs/nvmsgconv and /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvurisrcbin
2.It is recommended to use nvurisrcbin instead of uridecodebin, it has rtsp reconnection feature
3.Use the following command to monitor memory usage. Monitoring the memory usage of the entire docker cannot confirm that the problem is caused by DeepStream
I have applied the fix in the nvmsgconv plugin, but the memory usage is still increasing. The fix seems to slow down the memory leak, but I can still see it rising after 6-10 hours.
I am attaching the code I used for testing. Also, I am running this test in a fresh container nvcr.io/nvidia/deepstream:7.1-triton-multiarch, so the entire Docker environment is only running the DeepStream process. I have montior it through docker stats as well as htop.
You can also increase message frequency to see the difference in RAM earlier. deepstream_test_4.txt (19.8 KB)
I tried running the native code and it seems to be working fine without any memory leaks for more than 6 hours.
I modified the native app to match the Python implementation, including updating the message frequency and changing the source to uridecodebin. It looks like the issue is specific to the Python application.