Skip to content

Release 1.11.0 - #447

Merged
shibu-kv merged 9 commits into
mainfrom
release/1.11.0
Oct 6, 2026
Merged

shibu-kv merged 9 commits into
mainfrom
release/1.11.0

Conversation

@shibu-kv

@shibu-kv shibu-kv commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

shibu-kv and others added 9 commits September 10, 2026 07:31
…subscribe, logs null & empty values (#406)

* Update reportgen.c

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update profile.c

* Update profilexconf.c

* Update profile.c

* Update profilexconf.c

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ID-51137 (#427)

* Fix RESOURCE_LEAK in reportprofiles.c

Defect ID: 59d1a50d-6d73-4279-a0e5-e688d19e016e

* Fix RESOURCE_LEAK in reportprofiles.c
Defect ID: 59d1a50d-6d73-4279-a0e5-e688d19e016e

* The fix correctly addresses the RESOURCE_LEAK defect by freeing triggerCond in the else branch at line 1956 when referenceName or referenceValue is NULL. This prevents a memory leak when the allocated triggerConditionObj cannot be used. The fix is minimal, does not introduce new defects, and preserves existing logic. The ownership transfer pattern is correctly maintained: triggerCond is only freed when it is NOT pushed to the queue (lines 1944-1951), avoiding double-free issues.

---------

Co-authored-by: tabbas651 <74683978+tabbas651@users.noreply.github.com>
Co-authored-by: tabbas651 <thamimrazith_abbasali@comcast.com>
* Fix LOCK in profile.c

Defect ID: 6b4c15e3-d980-461b-a5c9-d4d848b77d02

* Fix trigger-condition mutex handoff on scheduler failure

Prevent double unlocks when SendInterruptToTimeoutThread fails while a
report is active, handle profile-name allocation failures, and add a
focused regression test for the scheduler-failure path.

* Address PR-438 review comments

- Handle profile-name strdup failure before logging or callback use.
- Release pending cJSON trigger data on allocation failure.
- Track confirmed report-thread ownership before deferred mutex cleanup.
- Roll back report state when pthread_create fails.
- Restore marker NULL fallback and reportEmptyParam filtering.
- Extend scheduler-failure tests for active and inactive report states.

---------

Co-authored-by: rdkdevpilot <svc-rdk-devpilot@cable.comcast.com>
* Fix scheduler profile teardown wait for CID-56336

Replace sleep-based polling under scMutex with condition-variable
termination acknowledgment. Preserve SchedulerProfile lifetime during
timeout-thread shutdown and handle self-unregister safely.

* Test case- modified
Initialized and destroyed termination synchronization in TIMEOUTTHREAD.

Initialized termination synchronization in FREE_SCHEDULER_PROFILE/NORMAL.
Existing unregister tests already cover registered-profile removal and repeated unregister behavior.

* Thread-resource leak: Fixed by restoring pthread_detach() after thread termination is confirmed.

* Variable "tProfile" going out of scope leaks the storage it points to.

* TIMEOUTTHREAD/TEST1 and TIMEOUTTHREAD/TEST2 manually allocate SchedulerProfile with malloc() and did not initialize those new fields. That can cause undefined behavior or a crash in CI.
* Fix BAD_CHECK_OF_WAIT_COND in t2eventreceiver.c

Defect ID: 736257e3-1ee9-4acb-a8b1-7c0b28c99b5c

* testcases updated

* Addressed copilot review comments

* Chnages are make it minimalize

---------

Co-authored-by: tabbas651 <74683978+tabbas651@users.noreply.github.com>
Co-authored-by: tabbas651 <thamimrazith_abbasali@comcast.com>
* Fix MISSING_LOCK in profilexconf.c

Defect ID: a9153b55-435d-4580-9dfa-558bdc89f783

* Added ProfileXConf_OnDemandStatusSnapshot  test cases

* updated test cases

Sets abort state once.
Verifies the first failure publishes ABORTED.
Calls the helper again without resetting globals.
Verifies the next failure publishes FAILURE, proving isAbortTriggered was reset.
Adds a separate non-on-demand test verifying no status is published.

* Potential fix for pull request finding 'Reset isOnDemandReport after test execution'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update profilexconfTest.cpp

* Update L2-tests.yml

---------

Co-authored-by: tabbas651 <74683978+tabbas651@users.noreply.github.com>
Co-authored-by: tabbas651 <thamimrazith_abbasali@comcast.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
Log upload backs up and truncates monitored files (e.g. wifihealth.txt,
PARODUSlog.txt) in place without always producing a rotated .1 file. The
stored seek value from the previous collection cycle then points past the
truncated file's new size. getFileDeltaInMemMapAndSearch() previously
treated this the same as an unrecoverable rotation with no backup and
returned NULL, silently dropping every marker sourced from that file for
one report cycle (e.g. Total_5G_clients_split, SYS_INFO_LowQosEvntUpload).

Add a truncated check (seek_value > sb.st_size) and, when no rotated file
is available, read the entire current file from offset 0 instead of
skipping the collection, so markers are captured in the same cycle
immediately following log upload.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 13:58
@shibu-kv
shibu-kv requested a review from a team as a code owner October 6, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Lifecycle races can hang teardown or misclassify live threads, and new filtering paths lack coverage.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 3 Low severity

Open (5)
What changed in this PR

Release 1.11.0 consolidates reliability, cleanup, concurrency, and marker-reporting fixes across telemetry scheduling and report generation.

Changes:

  • Improves scheduler/report-thread lifecycle handling and resource cleanup.
  • Handles empty subscriber values and in-place log truncation.
  • Adds targeted regression tests and release notes.
File Description
CHANGELOG.md Documents the 1.11.0 release.
source/​bulkdata/​profile.c Updates cleanup, event filtering, and thread tracking.
source/​bulkdata/​profile.h Adds report-thread state.
source/​bulkdata/​profilexconf.c Filters subscriber values and synchronizes upload status.
source/​bulkdata/​reportprofiles.c Cleans up failed replacement profiles.
source/​bulkdata/​t2eventreceiver.c Fixes mutex cleanup after wait failure.
source/​dcautil/​dca.c Handles logs truncated below their saved seek.
source/​reportgen/​reportgen.c Omits disallowed empty marker values.
source/​scheduler/​scheduler.c Reworks scheduler teardown synchronization.
source/​scheduler/​scheduler.h Adds scheduler termination state.
source/​test/​bulkdata/​profileTest.cpp Tests profile cleanup and trigger recovery.
source/​test/​bulkdata/​profilexconfTest.cpp Tests upload-status snapshots.
source/​test/​dcautils/​dcautilTest.cpp Tests in-place truncation recovery.
source/​test/​scheduler/​schedulerTest.cpp Initializes new scheduler synchronization fields.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +766 to +767
pthread_mutex_unlock(&scMutex);
pthread_mutex_lock(&tProfile->terminationMutex);
Comment thread source/bulkdata/profile.c
Comment on lines +1039 to +1048
int createStatus = pthread_create(&profile->reportThread, NULL, CollectAndReport, (void*)profile);
pthread_mutex_lock(&profile->reportInProgressMutex);
if(createStatus == 0 && profile->reportInProgress)
{
profile->reportThreadCreated = true;
}
else
{
profile->reportInProgress = false;
profile->reportThreadCreated = false;
Comment thread source/bulkdata/profile.c
Comment on lines +1133 to +1138
const char *safeValue = (eventInfo->value != NULL) ? eventInfo->value : "";
T2Debug("Marker type is ACCUMULATE Event Value : %s\n", safeValue);
if(!lookupEvent->reportEmptyParam && isEmptySubscriberValue(safeValue))
{
T2Debug("Skipping empty/null subscribe marker value for %s\n", lookupEvent->markerName);
break;
Comment on lines +1129 to +1134
const char *safeValue = (eventInfo->value != NULL) ? eventInfo->value : "";
T2Debug("Marker type is ACCUMULATE Event Value : %s\n", safeValue);
if(!lookupEvent->reportEmptyParam && isEmptySubscriberValue(safeValue))
{
T2Debug("Skipping empty/null subscribe marker value for %s\n", lookupEvent->markerName);
break;
Comment on lines +1570 to +1575
if(!eventMarker->reportEmptyParam && checkForEmptyString(eventMarker->u.markerValue))
{
T2Debug("Skipping empty/\"NULL\" marker value for : %s\n", eventMarker->markerName);
free(eventMarker->u.markerValue);
eventMarker->u.markerValue = NULL;
break;
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |27.0%   1130|73.5%    34|    -      0
bulkdata/profilexconf.c                   |48.3%    528|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |72.8%    684| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |59.7%    375|80.0%    10|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |55.7%    924| 100%    21|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.1%  10307|90.4%   355|    -      0

@shibu-kv
shibu-kv merged commit 30b5711 into main Oct 6, 2026
18 of 19 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants