Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) AGX • DeepStream Version 5.1 • JetPack Version (valid for Jetson only) 4.5.1 • Issue Type( questions, new requirements, bugs) question or bug, we will see
I have a memory leak in my software using DS 5.1. I managed to narrow down the issue to two requirements:
I need to have an nvdsosd in my pipeline
I need to dynamically edit the pipeline (e.g. changing the sink from time to time). The more frequent the sink changes the faster the memory consumption.
After some more digging, I realized if I comment the last 2 lines of the following code snippet, the memory leak disappears.
My first question is: who is responsible to free the memory, that was g_malloc0-d on the sixth line? I assumed that DS takes care of it (especially because in deepstream_test1_app.c nobody cares about freeing it), but since I have memory leak related to these lines, I became unsure.
I do not have a device with DS 6.1 right now, and even if it may be fixed there it may not help me, because my customer insists on DS 5.1 (Jetpack 4.5.1).
Anyway I can reproduce the issue on both DS 5.1 and DS 6.0 (Jetpack 4.6)
The metadata is attached to GstBuffer, so it is released when the GstBuffer is released. When the metadata is released, g_free() will be evoked to release the “display_text”. You don’t need to care about it. (GstBuffer)
Thanks. Today I upgraded one of the devices, and I managed to reproduce the leak on DS v6.1 too.
I reduced my pipeline to simple one. This pipeline does not makes sense, it lacks inference and encodings, it only has fakesinks, but it is enough to reproduce the leak.
Meanwhile I updated to the recently released JP 5.0.2 / DS 6.1.1 and in that version I also could not reproduce the issue yet. Now I am trying to run my original (non-reduced) pipeline in this version but I have run into another issue, I open another ticket about that one in a minute. If I manage to solve that one, I will be able to test this one as well, and hopefully close this one too.
Hi yingliu,
Well, Fiona still have not answer to this question:
I still could not run my original pipeline in DS 6.1.1, because the other issue is blocking me. But since the reduced pipeline is not leaking in 6.1.1, I guess we can close it, in worst case I open a new one if I am still experiencing an issue.
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