[DeepStream 7.0] Program stuck when starting pipeline using gst-nvtracker

I am writing a new thread to follow up on the issue originally reported in the thread linked below, that has been closed by the moderators without a solution.

I understand that the issue is triggered by low memory available to the system, and fixing memory constraint is the user’s responsibility. However, the subsequent deadlock of the pipeline is caused by a bug in the gst-nvtracker plugin implementation, as I explained in detail in my old post.

Could please provide a patch to fix this bug?

Thank you.

In the low memory scenarios, we cannot make the pipeline function properly; we can only allow it to exit gracefully.
Refer to this workaround.

diff --git a/src/gst-plugins/gst-nvtracker/convbufmanager.h b/src/gst-plugins/gst-nvtracker2/convbufmanager.h
index 89511c002..8ba7b9d17 100644
--- a/src/gst-plugins/gst-nvtracker2/convbufmanager.h
+++ b/src/gst-plugins/gst-nvtracker2/convbufmanager.h
@@ -53,6 +53,10 @@ public:
     return MAX_BUFFER_POOL_SIZE;
   }
 
+  bool isInitialized() {
+    return m_Initialized;
+  }
+
 private:
   /** All buffers in the pool. */
   std::vector<NvBufSurface *> m_BufferSet;
diff --git a/src/gst-plugins/gst-nvtracker/nvtracker_proc.cpp b/src/gst-plugins/gst-nvtracker2/nvtracker_proc.cpp
index 2b31ed498..e70a91d65 100644
--- a/src/gst-plugins/gst-nvtracker2/nvtracker_proc.cpp
+++ b/src/gst-plugins/gst-nvtracker2/nvtracker_proc.cpp
@@ -445,7 +445,7 @@ void NvTrackerProc::deInit()
   /** Clear out all pending process requests and return surface buffer
     * and notify all threads waiting for these requests */
   unique_lock<mutex> lkProc(m_ProcQueueLock);
-  if (m_Config.numTransforms > 0 && m_Config.inputTensorMeta == false) {
+  if (m_ConvBufMgr.isInitialized() && m_Config.numTransforms > 0 && m_Config.inputTensorMeta == false) {
     while (!m_ConvBufMgr.isQueueFull())
     {
       /** printf("m_ConvBufMgr.getFreeQueueSize() %d, m_ConvBufMgr.getActualPoolSize() %d\n",

Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.