From ce5e6591a233f79d162c4fe6fa1ce0705e1b779e Mon Sep 17 00:00:00 2001 From: Renuka Varry Date: Sun, 27 Sep 2026 04:31:59 +0000 Subject: [PATCH 1/4] RDKEMW-25809:Fix for hang in RDKPerf module Reason for change: Infinite while loop runs when Task() is executed after StopTask() is called Test Procedure: Playback VIPA content multiple times and ensure that gst-scan hang is not seen Risks: low Signed-off-by: Renuka Varry --- rdkperf/rdk_perf.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rdkperf/rdk_perf.cpp b/rdkperf/rdk_perf.cpp index 37bb00e..54c2d85 100644 --- a/rdkperf/rdk_perf.cpp +++ b/rdkperf/rdk_perf.cpp @@ -141,7 +141,17 @@ class TimerCallback { } void Task() { - m_bContinue = true; + + { + std::unique_lock lck(m_mtx); + if (m_current_state == EXIT_LOOP) { + LOG(eWarning, " Early StopTask detected. Exiting loop before start.\n"); + return; + } + m_bContinue = true; + } + + LOG(eWarning, "Task Started\n"); while(m_bContinue == true) { if(!Loop()) { From a439eb12c07cec38d8ffed823dc475b3a5b58c68 Mon Sep 17 00:00:00 2001 From: Renuka Varry Date: Sun, 27 Sep 2026 17:50:54 +0000 Subject: [PATCH 2/4] RDKEMW-25809:Fix for hang in RDKPerf module Reason for change: Infinite while loop runs when Task() is executed after StopTask() is called Test Procedure: Playback VIPA content multiple times and ensure that gst-scan hang is not seen Risks: low Signed-off-by: Renuka Varry --- rdkperf/rdk_perf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdkperf/rdk_perf.cpp b/rdkperf/rdk_perf.cpp index 54c2d85..3235ada 100644 --- a/rdkperf/rdk_perf.cpp +++ b/rdkperf/rdk_perf.cpp @@ -152,7 +152,7 @@ class TimerCallback { } - LOG(eWarning, "Task Started\n"); + LOG(eWarning, "RDKEMW-25809 : Task Started\n"); while(m_bContinue == true) { if(!Loop()) { LOG(eWarning, "Timer loop signaled for Exit..\n"); From b56e734ff527a1b90f695031e7f16773465643d1 Mon Sep 17 00:00:00 2001 From: Renuka Varry Date: Mon, 28 Sep 2026 16:40:03 +0000 Subject: [PATCH 3/4] RDKEMW-25809:Fix for hang in RDKPerf module- #17 Reason for change: Infinite while loop runs when Task() is executed after StopTask() is called Test Procedure: Playback VIPA content multiple times and ensure that gst-scan hang is not seen Risks: low Signed-off-by: Renuka Varry --- rdkperf/rdk_perf.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rdkperf/rdk_perf.cpp b/rdkperf/rdk_perf.cpp index 3235ada..2985540 100644 --- a/rdkperf/rdk_perf.cpp +++ b/rdkperf/rdk_perf.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "rdk_perf_logging.h" #include "rdk_perf_scopedlock.h" @@ -151,8 +152,7 @@ class TimerCallback { m_bContinue = true; } - - LOG(eWarning, "RDKEMW-25809 : Task Started\n"); + LOG(eWarning, "Task Starting\n"); while(m_bContinue == true) { if(!Loop()) { LOG(eWarning, "Timer loop signaled for Exit..\n"); @@ -163,6 +163,8 @@ class TimerCallback { SignalResult result = Wait(TIMER_INTERVAL_SECONDS); if(result == EXIT_LOOP) { LOG(eWarning, "Exit task loop has been signaled\n"); + m_bContinue = false; + break; } } LOG(eWarning, "Task Completed\n"); @@ -170,7 +172,7 @@ class TimerCallback { }; private: void* m_Context; - bool m_bContinue; + std::atomic m_bContinue; uint32_t m_nDelay; uint32_t m_nCount; // Timeout, signaling From 26ea3f8a21409a796f38c6ba9bdca232e733f315 Mon Sep 17 00:00:00 2001 From: Renuka Varry Date: Mon, 28 Sep 2026 19:56:29 +0000 Subject: [PATCH 4/4] RDKEMW-25809:Fix for hang in RDKPerf module Reason for change: Infinite while loop runs when Task() is executed after StopTask() is called Test Procedure: Playback VIPA content multiple times and ensure that gst-scan hang is not seen Risks: low Signed-off-by: Renuka Varry --- rdkperf/rdk_perf.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rdkperf/rdk_perf.cpp b/rdkperf/rdk_perf.cpp index 2985540..b9614a3 100644 --- a/rdkperf/rdk_perf.cpp +++ b/rdkperf/rdk_perf.cpp @@ -111,7 +111,7 @@ class TimerCallback { void StopTask() { LOG(eWarning, "Stoping Timer Task\n"); - m_bContinue = false; + m_bContinue.store(false); Signal(EXIT_LOOP); return; }; @@ -149,21 +149,21 @@ class TimerCallback { LOG(eWarning, " Early StopTask detected. Exiting loop before start.\n"); return; } - m_bContinue = true; + m_bContinue.store(true); } LOG(eWarning, "Task Starting\n"); - while(m_bContinue == true) { + while(m_bContinue.load() == true) { if(!Loop()) { LOG(eWarning, "Timer loop signaled for Exit..\n"); - m_bContinue = false; + m_bContinue.store(false); break; } LOG(eTrace, "Task sleeping %d seconds\n", TIMER_INTERVAL_SECONDS); SignalResult result = Wait(TIMER_INTERVAL_SECONDS); if(result == EXIT_LOOP) { LOG(eWarning, "Exit task loop has been signaled\n"); - m_bContinue = false; + m_bContinue.store(false); break; } }