Skip to content

RDKEMW-17573 : Triggering a issue type with more than 35 chars in RRD is leading RDM crash#197

Merged
nhanasi merged 2 commits into
developfrom
feature/rdmcrash
May 26, 2026
Merged

RDKEMW-17573 : Triggering a issue type with more than 35 chars in RRD is leading RDM crash#197
nhanasi merged 2 commits into
developfrom
feature/rdmcrash

Conversation

@Abhinavpv28

@Abhinavpv28 Abhinavpv28 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Reason For change : Restricing the number of characters allocated for dynamic issue category to 34, since commonutilities has a restriction on postfield, beyond this length causing a crash in rdm

Copilot AI review requested due to automatic review settings May 13, 2026 11:31
@Abhinavpv28
Abhinavpv28 requested a review from a team as a code owner May 13, 2026 11:31
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

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.

Pull request overview

This PR updates processIssueTypeInStaticProfile() in the remote debugger event processing flow by adding an inline comment near the fallback path that checks the installed package when an issue isn’t found in the static JSON profile.

Changes:

  • Added an inline note/TODO comment before calling processIssueTypeInInstalledPackage() when the issue is not present in the static profile.

Comment thread src/rrdEventProcess.c Outdated
Copilot AI review requested due to automatic review settings May 13, 2026 11:43
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:43
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 899b304
Report detail: https://gist.github.com/rdkcmf-jenkins/e04e078f7dae01113094a4e3ba839f2b'

Copilot AI review requested due to automatic review settings May 13, 2026 11:45
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:45
Copilot AI review requested due to automatic review settings May 13, 2026 11:46
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:46
Copilot AI review requested due to automatic review settings May 13, 2026 11:48
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:48
Copilot AI review requested due to automatic review settings May 13, 2026 11:49
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:49
Copilot AI review requested due to automatic review settings May 13, 2026 11:50
@Abhinavpv28
Abhinavpv28 removed the request for review from Copilot May 13, 2026 11:50
Copilot AI review requested due to automatic review settings May 13, 2026 12:01
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.2%   5917|96.8%  1534|    -      0

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread src/rrdDynamic.c
Comment thread src/rrdEventProcess.c Outdated
Comment thread src/rrdEventProcess.c Outdated
Comment thread src/rrdDynamic.c Outdated
Comment thread src/rrdDynamic.c Outdated
Copilot AI review requested due to automatic review settings May 13, 2026 12:30
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.2%   5917|96.8%  1534|    -      0

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (4)

src/unittest/rrdUnitTestRunner.cpp:1900

  • These cacheData nodes no longer initialize the prev pointer. remove_item() dereferences cache->prev (rrdCacheprevnode = cache->prev), so leaving it uninitialized can cause undefined behavior/crashes in the test. Initialize prev to NULL for both node and node_dummy.
            }
            free(cacheDataNode);
            cacheDataNode = next;
        }
    }
};

TEST_F(RemoveItemTest, HandlesCacheNull)
{
    remove_item(NULL);

src/unittest/rrdUnitTestRunner.cpp:1967

  • The expected token count/values here don’t match issueTypeSplitter() behavior in rrdEventProcess.c, which only splits on the delimiter and does not remove special characters. For input "a@,b,&,cd,ef" it will return 5 tokens (including "a@" and "&"). Update the assertions or sanitize the input before calling issueTypeSplitter().
{
    char str[] = "a,b.c";
    removeSpecialCharacterfromIssueTypeList(str);

    EXPECT_STREQ(str, "a,b.c");
}

TEST(RemoveSpecialCharacterfromIssueTypeListTest, HandlesStringWithoutCommaAndDot)
{

src/unittest/rrdUnitTestRunner.cpp:2090

  • data_buf rbuf is no longer zero-initialized, leaving fields like appendMode/dsEvent uninitialized. processIssueTypeEvent() reads appendMode and may take different branches nondeterministically. Prefer data_buf rbuf = {}; (or call RRD_data_buff_init) and free rbuf.mdata after the call to avoid leaks.
    EXPECT_STREQ(suffix, "");
}

TEST(SplitIssueTypeTest, BaseTruncatedWhenTooSmall)
{
    /* "abc_suffix": suffix "_suffix" is 7 chars (≤ 9) → accepted.

src/unittest/rrdUnitTestRunner.cpp:1219

  • This test’s setup can’t actually exercise an allocation-failure path: RRDGetProfileStringLength() now enforces RRD_DYNAMIC_PROFILE_MAX_LENGTH via strnlen() and returns -1 for long Node values, so RRDRdmManagerDownloadRequest() will bail out before attempting a large calloc. Update the test to assert the max-length rejection, or introduce a deterministic fault-injection mechanism if you want to cover allocation failures.
    RRDRdmManagerDownloadRequest(NULL, buff.jsonPath, &buff, false);
    free(issuestructNode.Node);
    free(issuestructNode.subNode);
    free(buff.jsonPath);
    free(buff.mdata);
}

TEST_F(RRDRdmManagerDownloadRequestTest, HandlesParamStringAllocFail)
{
    // Simulate calloc failure by passing mSGLength=0 (should skip allocation)
    issueNodeData issuestructNode;
    issuestructNode.Node = strdup("MainNode");

Comment thread src/rrdDynamic.c
Comment thread src/unittest/rrdUnitTestRunner.cpp
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.3%   6289|97.3%  1676|    -      0

Copilot AI review requested due to automatic review settings May 20, 2026 04:51

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Comment thread src/rrdDynamic.c
Comment thread src/rrdDynamic.c
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Copilot AI review requested due to automatic review settings May 20, 2026 05:00
@Abhinavpv28

Copy link
Copy Markdown
Contributor Author

@copilot

@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

src/unittest/rrdUnitTestRunner.cpp:1253

  • Potential double-free: RRDRdmManagerDownloadRequest() frees pissueStructNode->Node/subNode (and NULLs them) before returning, but this test frees issuestructNode.Node and issuestructNode.subNode again. Remove the frees here (or change ownership expectations) to avoid crashing the test runner.
    }
};

TEST_F(RRDProcessDeepSleepAwakeEventsTest, RbufDataNull)

Comment thread src/rrdDynamic.c
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.2%   6277|97.3%  1672|    -      0

@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.2%   6278|97.3%  1672|    -      0

@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

Copilot AI review requested due to automatic review settings May 26, 2026 08:25
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

3 similar comments
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread src/rrdDynamic.c
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

fix: remove unclear inline note from static profile fallback path

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ddda5e68-d84d-4a89-ab64-02935f00a57f

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: plan length-validation update for static fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: validate issue node length before installed-package fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: clarify installed-package length guard semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: align length-limit wording with validation semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: improve fallback guard naming and failure logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: centralize issue length and fallback skip logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdEventProcess.c

Update rrdCommon.h

Update rrdDynamic.c

Refactor issueTypeSplitter to include suffix handling

Update rrdEventProcess.c

Update rrdExecuteScript.c

Refactor rrdEventProcess.h to rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdEventProcess.h

Update rrdExecuteScript.h

Update rrdJsonParser.c

Update rrdJsonParser.h

Update rrdInterface.c

Update rrdCommon.h

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix indentation for appendMode assignment

Update rrdCommon.h

Fix appendMode assignment in rrdEventProcess.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdExecuteScript.h

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Remove redundant logging from rrdJsonParser

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Apply suggestions from code review

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

Update rrdEventProcess.c

Apply suggestion from @Copilot

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

Update rrdJsonParser.c

Fix heap overflow in issueTypeSplitter and memory leaks in suffix handling

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/fbc52780-966b-4912-825f-3030aa43c3e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Delete .gitignore

Potential fix for pull request finding

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

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Add gtest test cases for split_issue_type

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove build artifacts, add .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Add explicit truncated content assertion in SuffixTruncatedWhenTooSmall test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Apply suggestions from code review

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

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Potential fix for pull request finding

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

Update rrdJsonParser.c

Update rrdJsonParser.c

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Delete .gitignore

Delete src/unittest/UTJson/device.properties

Update rrdEventProcess.c

Add gtest tests for split_issue_type, suffix field, and processIssueTypeEvent

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/76cad72a-f67f-4c05-8fb5-bfadf0c173b3

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Delete .gitignore

Validate suffix prefix: only _Search- and _LogSearch- are allowed

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/125526c2-7b70-48f5-8bec-fd725eea8a04

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Base never contains underscore: split at first _ and discard invalid suffix

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/904bf10d-546b-4038-a60c-9bc76094a225

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix segfault in GTEST_ENABLE mode when rbuf->jsonPath is NULL

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove accidentally committed dummy directory and update .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix IssueTypeSplitterTest to match new issueTypeSplitter behavior (no built-in special-char removal)

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/00abcaba-8a41-4b88-ae12-07b5ff780ff9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix empty/whitespace IssueType bypassing processIssueTypeEvent guards

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/4de31e24-70d8-496c-ac6a-a5376771d936

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: preserve hyphens in archive filename so portal can parse it correctly

rrd_logproc_convert_issue_type() was converting '-' to '_', turning the
suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_'
separators into the archive filename that broke the analytics portal's
filename parser — it could no longer identify the timestamp field, so
download requests used an incorrect S3 key.

Fix: keep '-' as '-' in the sanitized output. The archive filename now
uses '_' to separate structural fields (MAC, issueType, timestamp) and
'-' within the UUID suffix, giving the portal a reliable delimiter.

Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to
256 bytes so a full UUID suffix never causes a silent truncation failure.

Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz
After:  04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: replace _Search-/_LogSearch- prefix check with suffix length <= 9 rule

split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters.  The old _Search-/_LogSearch-
prefix validation is removed entirely.

Rule:
  strlen(underscore) <= 9  → suffix accepted
  strlen(underscore)  > 9  → suffix discarded

This means:
  - Short session tokens (e.g. "_ab12345", 8 chars) are carried through
  - Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
    preventing extra '_' delimiters from breaking the portal filename parser

Affected tests updated:
  - UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
  - MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
  - BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
  - SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
  - OnlyUnderscoreInput: "_" (1 char) now kept
  - LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
  - SearchSuffixIsValid → LongSuffixIsDiscarded
  - InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
    LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
  - ProcessIssueTypeEvntTest comments updated to reflect new rule

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: improve RRD_MAX_SUFFIX_LEN comment and rename length-based tests

- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
    InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
    SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
    LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
  test does not imply any Search-specific behavior

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdJsonParser.c

Update uploadRRDLogs.c

Update uploadRRDLogs.c

Update rrdJsonParser.c

Delete .gitignore

Potential fix for pull request finding

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

Update rrdEventProcess.c

Potential fix for pull request finding

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

Update rrdJsonParser.c

Update rrdEventProcess.c

sanitize split_issue_type suffix to [A-Za-z0-9_-] to prevent injection

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/72e164ed-ae53-4076-8fb1-5ff1e21375e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Delete .gitignore

Update rrdRunCmdThread.c

Update rrdRunCmdThread.h

Delete src/unittest/UTJson/device.properties

Potential fix for pull request finding

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

Update rrdRunCmdThread.c

Potential fix for pull request finding

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

Update rrdDynamic.c

RRD 1.3.4 release changelog updates

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

fix: harden profile length guard null checks and cleanup

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: tighten strnlen boundary check and indentation

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: use bounded strnlen check and null freed issue pointers

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Refactor issueTypeSplitter to include suffix handling

Update rrdEventProcess.c

Update rrdExecuteScript.c

Refactor rrdEventProcess.h to rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdEventProcess.h

Update rrdExecuteScript.h

Update rrdJsonParser.c

Update rrdJsonParser.h

Update rrdInterface.c

Update rrdCommon.h

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix indentation for appendMode assignment

Update rrdCommon.h

Fix appendMode assignment in rrdEventProcess.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdExecuteScript.h

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Remove redundant logging from rrdJsonParser

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Apply suggestions from code review

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

Update rrdEventProcess.c

Apply suggestion from @Copilot

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

Update rrdJsonParser.c

Fix heap overflow in issueTypeSplitter and memory leaks in suffix handling

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/fbc52780-966b-4912-825f-3030aa43c3e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Delete .gitignore

Potential fix for pull request finding

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

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Add gtest test cases for split_issue_type

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove build artifacts, add .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Add explicit truncated content assertion in SuffixTruncatedWhenTooSmall test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Apply suggestions from code review

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

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Potential fix for pull request finding

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

Update rrdJsonParser.c

Update rrdJsonParser.c

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

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

Potential fix for pull request finding

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

Delete .gitignore

Delete src/unittest/UTJson/device.properties

Update rrdEventProcess.c

Add gtest tests for split_issue_type, suffix field, and processIssueTypeEvent

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/76cad72a-f67f-4c05-8fb5-bfadf0c173b3

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Delete .gitignore

Validate suffix prefix: only _Search- and _LogSearch- are allowed

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/125526c2-7b70-48f5-8bec-fd725eea8a04

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Base never contains underscore: split at first _ and discard invalid suffix

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/904bf10d-546b-4038-a60c-9bc76094a225

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix segfault in GTEST_ENABLE mode when rbuf->jsonPath is NULL

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove accidentally committed dummy directory and update .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix IssueTypeSplitterTest to match new issueTypeSplitter behavior (no built-in special-char removal)

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/00abcaba-8a41-4b88-ae12-07b5ff780ff9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix empty/whitespace IssueType bypassing processIssueTypeEvent guards

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/4de31e24-70d8-496c-ac6a-a5376771d936

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: preserve hyphens in archive filename so portal can parse it correctly

rrd_logproc_convert_issue_type() was converting '-' to '_', turning the
suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_'
separators into the archive filename that broke the analytics portal's
filename parser — it could no longer identify the timestamp field, so
download requests used an incorrect S3 key.

Fix: keep '-' as '-' in the sanitized output. The archive filename now
uses '_' to separate structural fields (MAC, issueType, timestamp) and
'-' within the UUID suffix, giving the portal a reliable delimiter.

Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to
256 bytes so a full UUID suffix never causes a silent truncation failure.

Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz
After:  04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: replace _Search-/_LogSearch- prefix check with suffix length <= 9 rule

split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters.  The old _Search-/_LogSearch-
prefix validation is removed entirely.

Rule:
  strlen(underscore) <= 9  → suffix accepted
  strlen(underscore)  > 9  → suffix discarded

This means:
  - Short session tokens (e.g. "_ab12345", 8 chars) are carried through
  - Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
    preventing extra '_' delimiters from breaking the portal filename parser

Affected tests updated:
  - UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
  - MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
  - BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
  - SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
  - OnlyUnderscoreInput: "_" (1 char) now kept
  - LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
  - SearchSuffixIsValid → LongSuffixIsDiscarded
  - InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
    LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
  - ProcessIssueTypeEvntTest comments updated to reflect new rule

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: improve RRD_MAX_SUFFIX_LEN comment and rename length-based tests

- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
    InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
    SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
    LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
  test does not imply any Search-specific behavior

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdJsonParser.c

Update uploadRRDLogs.c

Update uploadRRDLogs.c

Update rrdJsonParser.c

Delete .gitignore

Potential fix for pull request finding

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

Update rrdEventProcess.c

Potential fix for pull request finding

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

Update rrdJsonParser.c

Update rrdEventProcess.c

sanitize split_issue_type suffix to [A-Za-z0-9_-] to prevent injection

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/72e164ed-ae53-4076-8fb1-5ff1e21375e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Delete .gitignore

Update rrdRunCmdThread.c

Update rrdRunCmdThread.h

Delete src/unittest/UTJson/device.properties

Potential fix for pull request finding

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

Update rrdRunCmdThread.c

Potential fix for pull request finding

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

RRD 1.3.4 release changelog updates

Create test_rrd_static_profile_report_with_suffix.py (#201)

Create test_rrd_static_profile_report_with_suffix_negative_case.py

Potential fix for pull request finding

RRD 1.3.4 release changelog updates

Fix dynamic subcategory service log assertions for timestamped names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2

Remove accidental pycache artifact from test changes

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_c_api_upload.py

Update test_rrd_debug_report_upload.py

Update test_rrd_deepsleep_static_report.py

Update test_rrd_dynamic_profile_report.py

Update test_rrd_static_profile_category_report.py

Update test_rrd_static_profile_report.py

Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Strengthen service-start assertions for timestamped runtime names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Add helper docstring for service-start success assertion

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Improve helper docstring with Args and Raises

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Refine service-start helper naming and assertion messages

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Add feature files for static suffix report scenarios

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/59dfaf33-25ef-48a2-9549-dd1f571a3b55

L2

Potential fix for pull request finding

Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Fix service check in negative test case

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Stabilize remotedebugger startup in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Remove accidental pycache artifact from PR

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Replace startup retry magic numbers with constants

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Remove accidental pycache artifact again

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Refine remotedebugger PID retry logic in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Simplify startup PID retry loop for missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

RDK-60236 : Remote Debugger Supports UUID Information in Debug Report File (#199)

* Create rrd_uuid_support_implementation.HLD

* Rename rrd_uuid_support_implementation.HLD to rrd_uuid_support_implementation_HLD.md

* Update rrd_uuid_support_implementation_HLD.md

* Move docs from .github directory

---------

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

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

Update rrdUnitTestRunner.cpp

L2 Document update (#207)

Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>

Create rrd_dynamic_profile_rdm_node_length_exceeded.feature

Create test_dynamic_profile_rdm_node_length_exceeded.py

Create rrd_issuetype_exceeds_max_length.feature

Delete test/functional-tests/tests/rrd_dynamic_profile_rdm_node_length_exceeded.feature

L2
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

@rdkcentral rdkcentral deleted a comment from Copilot AI May 26, 2026
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6263|97.3%  1668|    -      0

@nhanasi
nhanasi merged commit ada4039 into develop May 26, 2026
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 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