Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
Jetson Orin Nx 16GB
• DeepStream Version
7.0
• JetPack Version (valid for Jetson only)
6.0
• TensorRT Version
8.6.2.3-1+cuda12.2
• NVIDIA GPU Driver Version (valid for GPU only)
• 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 test programs for verification
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
In a pipeline with nvinfer, calling gst_app_sink_pull_sample() to pull inference data via appsink does not free up 16-17MB even when the pipeline is NULLed.
I noticed this issue in an application I was developing, so I wrote a test program to narrow down the problem and found that I was experiencing the same issue.
Here’s how to use the test program: type ‘a’ and press enter to start by creating a pipeline and changing it to the PLAYING state, type ‘p’ and press enter to change the last registered pipeline to the NULL state.
The state of GPU memory when the pipeline was first created and when it was removed can be seen in Figure 1 and Figure 2.
After creating another pipeline, and then removing it similarly, you can see the results in figure3 and figure4.
If you compare figure1 to figure3 or figure2 to figure4, you can see that they are occupying the same memory, which is normal, but the memory is not being freed.
If you modify your test source code to not call gst_app_sink_pull_sample(), this issue will not occur.
mem-leak-check.cpp.txt (4.3 KB)
I’m also attaching the results of a memory check using valgrind. It’s hard to guess what this 16-17MB of unreleased memory is related to because there’s so much stuff in there.
valgrind_output.txt (112.8 KB)
What could be the cause? I’m developing an application that can create and destroy pipelines, so this unreleased memory is quite a stability hit.