Skip to content

Conversation

@juanlofer-eprosima
Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima commented Oct 14, 2025

Description

This PR attempts to solve the data race produced when a thread clears the attributes of PDPStatelssWriter at mark_all_readers_interested (called in announceParticipantState from events thread, for example), while the values are read from another thread (send_to_fixed_locators called, for example, from the asynchronous send thread → LocatorSelectorSender::send → StatelessWriter::send_nts → PDPStatelessWriter::send_to_fixed_locators).

@Mergifyio backport 3.3.x 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@juanlofer-eprosima juanlofer-eprosima added this to the v3.4.1 milestone Oct 14, 2025
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima October 14, 2025 13:31
@github-actions github-actions bot added the ci-pending PR which CI is running label Oct 14, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 14, 2025

🧪 CI Insights

Here's what we observed from your CI run for 6875583.

❌ Job Failures

Pipeline Job Health on master Retries 🔍 CI Insights 📄 Logs
Fast DDS MacOS CI mac-ci / fastdds_test () Unknown 0 View View
Fast DDS Ubuntu CI ubuntu-ci / fastdds_test (RelWithDebInfo) Unknown 0 View View
Fast DDS Windows CI windows-ci / fastdds_test (RelWithDebInfo, examples), v143 Unknown 1 View View

@juanlofer-eprosima juanlofer-eprosima changed the title [23822] Protect PDPStatelessWriter attributes (fix unsafe reset in mark_all_readers_interested) [23822] Protect PDPStatelessWriter attributes Oct 21, 2025
@juanlofer-eprosima juanlofer-eprosima force-pushed the tsan/mark_all_readers_interested branch from 9091882 to 66e4d1b Compare October 21, 2025 13:37
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima October 21, 2025 13:37
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima October 23, 2025 10:28
@juanlofer-eprosima juanlofer-eprosima force-pushed the tsan/mark_all_readers_interested branch from b66ab54 to c5d9e1d Compare October 29, 2025 15:56
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima October 29, 2025 15:56
@juanlofer-eprosima juanlofer-eprosima force-pushed the tsan/mark_all_readers_interested branch from c5d9e1d to 0f9e576 Compare October 30, 2025 13:22
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima October 30, 2025 13:23
@juanlofer-eprosima juanlofer-eprosima force-pushed the tsan/mark_all_readers_interested branch from 0f9e576 to 6875583 Compare November 3, 2025 15:45
@juanlofer-eprosima juanlofer-eprosima requested review from richiprosima and removed request for richiprosima November 3, 2025 15:45
@juanlofer-eprosima juanlofer-eprosima marked this pull request as ready for review November 4, 2025 13:34
@MiguelCompany MiguelCompany merged commit 6ca678b into master Nov 5, 2025
33 of 38 checks passed
@MiguelCompany MiguelCompany deleted the tsan/mark_all_readers_interested branch November 5, 2025 15:24
@MiguelCompany
Copy link
Member

@Mergifyio backport 3.3.x 3.2.x 2.14.x

@mergify
Copy link
Contributor

mergify bot commented Nov 5, 2025

backport 3.3.x 3.2.x 2.14.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 5, 2025
* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)
mergify bot pushed a commit that referenced this pull request Nov 5, 2025
* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	test/blackbox/common/RTPSWithRegistrationWriter.hpp
mergify bot pushed a commit that referenced this pull request Nov 5, 2025
* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)
emiliocuestaf pushed a commit that referenced this pull request Nov 11, 2025
* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	test/blackbox/common/RTPSWithRegistrationWriter.hpp
emiliocuestaf pushed a commit that referenced this pull request Nov 13, 2025
* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	test/blackbox/common/RTPSWithRegistrationWriter.hpp
MiguelCompany pushed a commit that referenced this pull request Nov 14, 2025
* Protect PDPStatelessWriter attributes (#6100)

* Refs #23822. Protect PDPStatelessWriter attributes

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Atomize matched_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Refs #23822. Protect reader_data_filter_ attribute

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 6ca678b)

# Conflicts:
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	test/blackbox/common/RTPSWithRegistrationWriter.hpp

* Fix conflicts

Signed-off-by: Emilio Cuesta <[email protected]>

* Fix backport namespace issues

Signed-off-by: Emilio Cuesta <[email protected]>

---------

Signed-off-by: Emilio Cuesta <[email protected]>
Co-authored-by: juanlofer-eprosima <[email protected]>
Co-authored-by: Emilio Cuesta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants