• Hardware Platform: Jetson Xavier NX 16G
• JetPack Version: 4.6
I’m using opencv4.6 cv::videoCapture capi with gstreamer backend to capture ip camera video stream (no audio), when I add a drop-frame-interval=25 param, the process has a memory leak for about 2.5%(400M) every 6 hours.
I’ve tried rtsp and rtmp streams, the memory leak only shows when i add drop-frame-interval param for nvv4l2decoder, here are my pipelines for rtsp and rtmp:
I’ve tried gst-launch-1.0 cmd with GST_TRACERS=“leaks”, the output shows memory leak too, but I can’t really get more informations from the it. Also the gst-launch-1.0 process didn’t really show a significant leak like my c++ program, there were only 0.1% memory increase after 3 hours test.
In other case I use nvv4l2decoder skip-frames=2 or drop frames in my c++ code, so I think my code should be fine. I’ve checked the opencv gst backend implement, but can’t really get much information.
Any similar problems or how can I debug with this? (like getting useful imformation with GST_TRACERS=“leaks”)
Hmmm… I’m not using Deepstream SDK at all, just gstreamer in opencv.
Deepstream surely looks functional, but it should take time to modify my current work.
If there aren’t more experence about my current problem, I may try Deepstream SDK later. Do I have to upgrade my jetpack to 5.0.2 to use the latest DS？That could be a problem too since there will be environment change and i have more than one to upgrade.
Cause the nvv4l2decoder plugin provided by Deepstream, you need to update Deepstream to update the latest nvv4l2decoder plugin. So we sugguet you to update the Deepstream version to update the nvv4l2decoder plugin to fix some memory leak problem.
We were short of equipment last week, the only NX board had other tasks so we haven’t try to upgrade. Several NX board arrived just today and one of them is upgrading to 5.0.2. I’ll surely repley the result weather good or not, thanks for your follow up.
We’ve update the jetpack and deepstream and still get the same problem.
With the cmd deepstream-app --version-all I can get the output bellow:
deepstream-app version 6.1.1
CUDA Driver Version: 11.4
CUDA Runtime Version: 11.4
TensorRT Version: 8.4
cuDNN Version: 8.4
libNVWarp360 Version: 2.0.1d3
Since the application scenarios allows, we will temporarily schedule regular restart to prevent too much memory leaks.
Here are some simple test codes if you still wanted to help and reproduce the problem.
Replace the “drop-frame-interval=25” in test.cpp with “skip-frames=2” and you can get a program with out memory leak.
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. Could you change the appsink to fakesink and test it again?
I use thegst-launch-1.0 cli to run the pipeline to exclude other possibilities. Like: gst-launch-1.0 rtmpsrc location=\"rtmp://url live=1\" ! flvdemux ! h264parse ! nvv4l2decoder drop-frame-interval=25 enable-max-performance=0 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! fakesink sync=false