Deepstream memory leaky

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)

x86
• DeepStream Version

7.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

560.35.03
• Issue Type( questions, new requirements, bugs)

memory leaky
• 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)

tracking_deepstream_server_crop.txt (26.8 KB)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

==3312992==
==3312992== 38,425,038 bytes in 2 blocks are still reachable in loss record 34,792 of 34,793
==3312992== at 0x4848899: malloc (vg_replace_malloc.c:381)
==3312992== by 0xA766EA57: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA76BF744: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA76C3439: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA7726D6C: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA7224C35: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA727D56C: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA722682F: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723BC99: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723C40F: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723C47D: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723F0FF: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992==
==3312992== 99,635,324 bytes in 3,041 blocks are still reachable in loss record 34,793 of 34,793
==3312992== at 0x4848899: malloc (vg_replace_malloc.c:381)
==3312992== by 0xA793ADE2: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA767D747: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA7670F94: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA767AB64: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA76D466C: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA76BA579: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA76C0B4C: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA7728573: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.560.35.03)
==3312992== by 0xA723BCC2: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723C40F: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992== by 0xA723C47D: ??? (in /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so.12.6.77)
==3312992==
==3312992== LEAK SUMMARY:
==3312992== definitely lost: 16,560 bytes in 10 blocks
==3312992== indirectly lost: 32 bytes in 2 blocks
==3312992== possibly lost: 45,974,951 bytes in 537 blocks
==3312992== still reachable: 252,133,893 bytes in 194,185 blocks
==3312992== of which reachable via heuristic:
==3312992== stdstring : 11,097 bytes in 220 blocks
==3312992== newarray : 400 bytes in 1 blocks
==3312992== suppressed: 0 bytes in 0 blocks
==3312992==
==3312992== Use --track-origins=yes to see where uninitialised values come from
==3312992== For lists of detected and suppressed errors, rerun with: -s
==3312992== ERROR SUMMARY: 1961 errors from 345 contexts (suppressed: 0 from 0)

For valgrind output, you only need to care about definitely lost.

For still reachable, refer to the stackover flow. You don’t need to do anything about it.

Thanks for the quick response! Ihave anthor question that I’m trying to use both RTSP and MP4 video as inputs, but I’ve found that the output from the MP4 file gets stuck on the first frame.I suspect this is a timestamp or synchronization issue. Also, are there any examples of how to mix video inputs that I could try?

Refer to this command line. the python test3 app also support multi-class URIs as input.

cd /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test3

./deepstream-test3-app file://///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 rtsp://xxx/xxx

Thanks! I’m running an offline video and I’ve noticed people are moving back and forth (teleporting). Is this a problem with the frame order? I need help.

tracking_deepstream_server_crop.txt (27.5 KB)

Please use baseline profile transcoding to publish the rtsp stream. This is because there is a b frame in the stream.

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