Skip to content

RDKEMW-22611: Suppress false-positive AAMP_ERR_audioDiscontinue marker - #1822

Merged
pstroffolino merged 4 commits into
dev_sprint_25_2from
feature/RDKEMW-22611
Aug 4, 2026
Merged

RDKEMW-22611: Suppress false-positive AAMP_ERR_audioDiscontinue marker#1822
pstroffolino merged 4 commits into
dev_sprint_25_2from
feature/RDKEMW-22611

Conversation

@pstroffolino

Copy link
Copy Markdown
Contributor

The telemetry marker AAMP_ERR_audioDiscontinue is pattern-matched from the AAMPLOG_WARN "Checking HasDiscontinuity for position" log line in GetNextFragmentUriFromPlaylist. On HLS linear streams this WARN fires on every discontinuity sync attempt, including the normal transient case where the audio playlist has a new #EXT-X-DISCONTINUITY tag one refresh cycle ahead of the video playlist. That condition always self-resolves within ~1 s, making the marker a false positive.

Fix: Demote the per-attempt log from WARN to INFO so the pattern matcher no longer fires for transient latency events. The genuine failure path where HasDiscontinuityAroundPosition returns false after exhausting all refresh retries retains WARN severity (message updated: after all retries).

Root cause: HLS CMAF live stream delivers multiple EXT-X-DISCONTINUITY tags within a single sliding playlist window. Audio and video playlist threads refresh independently; audio consistently sees each new discontinuity PDT one refresh cycle ahead of video, causing a miss on the first scan. Every miss emitted the WARN triggering the marker, even though all misses recovered within one cycle.

L1 tests added (fragmentcollector_hls suite):

  • ExactPdtMatch_ReturnsTrue
  • PdtWithinTolerance_ReturnsTrue
  • PdtDiffExceedsTolerance_ReturnsFalse
  • EmptyIndex_ReturnsFalse
  • NoPdt_PositionInWindow_ReturnsTrue
  • NoPdt_PositionOutsideWindow_ReturnsFalse
  • MultipleEntries_MatchesCurrentPdt

Generated with Devin

The telemetry marker AAMP_ERR_audioDiscontinue is pattern-matched from
the AAMPLOG_WARN "Checking HasDiscontinuity for position" log line in
GetNextFragmentUriFromPlaylist. On HLS linear streams this WARN fires on
every discontinuity sync attempt, including the normal transient case
where the audio playlist has a new #EXT-X-DISCONTINUITY tag one refresh
cycle ahead of the video playlist. That condition always self-resolves
within ~1 s, making the marker a false positive.

Fix: Demote the per-attempt log from WARN to INFO so the pattern matcher
no longer fires for transient latency events. The genuine failure path
where HasDiscontinuityAroundPosition returns false after exhausting all
refresh retries retains WARN severity (message updated: after all retries).

Root cause: HLS CMAF live stream delivers multiple EXT-X-DISCONTINUITY
tags within a single sliding playlist window. Audio and video playlist
threads refresh independently; audio consistently sees each new
discontinuity PDT one refresh cycle ahead of video, causing a miss on
the first scan. Every miss emitted the WARN triggering the marker, even
though all misses recovered within one cycle.

L1 tests added (fragmentcollector_hls suite):
- ExactPdtMatch_ReturnsTrue
- PdtWithinTolerance_ReturnsTrue
- PdtDiffExceedsTolerance_ReturnsFalse
- EmptyIndex_ReturnsFalse
- NoPdt_PositionInWindow_ReturnsTrue
- NoPdt_PositionOutsideWindow_ReturnsFalse
- MultipleEntries_MatchesCurrentPdt

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

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 aims to suppress false-positive AAMP_ERR_audioDiscontinue telemetry by demoting a per-attempt discontinuity-sync log in TrackState::GetNextFragmentUriFromPlaylist() from WARN to INFO, while keeping a WARN on the genuine “discontinuity pairing failed” path. It also adds L1 coverage for TrackState::HasDiscontinuityAroundPosition() to exercise PDT and non-PDT pairing scenarios relevant to the discontinuity-sync behavior.

Changes:

  • Demote "Checking HasDiscontinuity for position..." from AAMPLOG_WARNAAMPLOG_INFO and clarify the final WARN message on failure.
  • Add new L1 test cases covering PDT matching/tolerance and non-PDT position-window matching for HasDiscontinuityAroundPosition().
  • Wire the new test file into the existing fragmentcollector_hls utest target.

Scores: Completeness 9/10, Assumptions 8/10, Clarity 9/10, CostRisk 5/10 | Critique: Solid context and acceptance intent; the diff includes a large new test file which increases review surface. | Improve: Add the exact telemetry pattern-matcher rule (or its key condition, e.g., “WARN-only”) to make the logging change fully verifiable from repo context.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
fragmentcollector_hls.cpp Demotes a per-attempt discontinuity-check log from WARN to INFO; updates WARN text on final failure.
test/utests/tests/fragmentcollector_hls/CMakeLists.txt Adds the new discontinuity test source to the existing fragmentcollector_hls test executable.
test/utests/tests/fragmentcollector_hls/HasDiscontinuityAroundPositionTests.cpp New L1 tests covering PDT and non-PDT discontinuity pairing logic in HasDiscontinuityAroundPosition().
Suppressed comments (1)

test/utests/tests/fragmentcollector_hls/HasDiscontinuityAroundPositionTests.cpp:135

  • This if statement lacks braces. The repository C++ guidelines require braces for all conditional blocks (including single-line bodies) to avoid accidental logic errors when adding statements later.
        if (gpGlobalConfig == nullptr)
            gpGlobalConfig = new AampConfig();

Comment thread test/utests/tests/fragmentcollector_hls/HasDiscontinuityAroundPositionTests.cpp Outdated
paulpandian25 and others added 3 commits August 4, 2026 08:03
@pstroffolino
pstroffolino merged commit 9996ae5 into dev_sprint_25_2 Aug 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants