Skip to content

[Backport to release/v1.1] Internal: Fix reader reordering in FlowSynchronizationGroup::waitForDataAt - #713

Merged
vt-tv merged 2 commits into
release/v1.1from
backport/711/-/release/v1.1
Sep 9, 2026
Merged

vt-tv merged 2 commits into
release/v1.1from
backport/711/-/release/v1.1

Conversation

@backport-mxl-pull-requst

Copy link
Copy Markdown

Backport of #711 to release/v1.1.

…ataAt

std::forward_list::splice_after(pos, other, it) moves the element *following*
`it`, not `*it`. waitForDataAt passed the iterator of the entry it wanted to
promote, so it moved that entry's successor instead, and when the entry to
promote was the last one in the list, `std::next(it)` was the end iterator and
the call was undefined behaviour. In practice the list ends up empty, and every
subsequent call iterates over nothing and returns MXL_STATUS_OK immediately:
the group silently stops synchronizing after its first reordering, which is a
failure that looks like success.

A single-member group never reaches that branch, since the guard requires an
entry whose observed source delay exceeds the head's, so only groups with two
or more readers are affected.

Pass the predecessor of the entry to be promoted, and keep track of it while
walking the list.

Signed-off-by: rochonma <mathieu.rochon@radio-canada.ca>
(cherry picked from commit f0fff0c)
Signed-off-by: rochonma <mathieu.rochon@radio-canada.ca>
(cherry picked from commit 26ceaf0)

@vt-tv vt-tv 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.

Reviewed and approved on main

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

110 tests  +1   110 ✅ +1   23s ⏱️ +5s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 9178a0e. ± Comparison against base commit 9025d07.

♻️ This comment has been updated with latest results.

@vt-tv
vt-tv merged commit 8fef61f into release/v1.1 Sep 9, 2026
16 checks passed
@vt-tv
vt-tv deleted the backport/711/-/release/v1.1 branch September 9, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants