Repository navigation
Release 1.11.0 - #447
Merged
Merged
Release 1.11.0#447
Conversation
…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.
Contributor
There was a problem hiding this comment.
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
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 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 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; |
Code Coverage Summary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.