Skip to content

[23923] Fix RTPSParticipantAttributes internal data races - #6370

Merged
MiguelCompany merged 26 commits into
masterfrom
fix_rtps_attr_data_race
May 4, 2026
Merged

MiguelCompany merged 26 commits into
masterfrom
fix_rtps_attr_data_race

Conversation

@cferreiragonz

@cferreiragonz cferreiragonz commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR solves a bunch of data races caused by the not-thread-safe access to RTPSParticipantAttributes via its main getter get_attributes(). This method returns a const reference to the object, which can be concurrently modified from other functions like update_attributes() causing a read-write access data race.

The proposed fix should modify the original method to return a copy of the class attribute with the mutex locked, making the access safe. However, this would imply an API break. Thus, a new method has been created to be used internally, leaving the get_attributes() method untouched and marked to be fixed in the next major release.

Related PR:

@Mergifyio backport 3.4.x 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A: 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.
  • N/A 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 and others added 9 commits April 16, 2026 12:40
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz added this to the v3.7.0 milestone Apr 16, 2026
@github-actions github-actions Bot added the ci-pending PR which CI is running label Apr 16, 2026
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima April 17, 2026 08:14
@cferreiragonz cferreiragonz mentioned this pull request Apr 17, 2026
16 tasks

@raulojeda22 raulojeda22 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.

Nit

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
raulojeda22
raulojeda22 previously approved these changes Apr 20, 2026

@raulojeda22 raulojeda22 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.

LGTM

@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima April 20, 2026 12:20
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz
cferreiragonz removed the request for review from raulojeda22 April 27, 2026 07:45
raulojeda22
raulojeda22 previously approved these changes Apr 30, 2026

@raulojeda22 raulojeda22 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.

LGTM with green CI

@cferreiragonz

Copy link
Copy Markdown
Contributor Author

259 Data Races reported by ASAN, none of them related with update_attributes. RTM IMHO

@cferreiragonz cferreiragonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels May 4, 2026

@MiguelCompany MiguelCompany left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nit. It does not require to rerun CI.

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@MiguelCompany
MiguelCompany merged commit 7dd4b4d into master May 4, 2026
5 checks passed
@MiguelCompany
MiguelCompany deleted the fix_rtps_attr_data_race branch May 4, 2026 08:39
@cferreiragonz cferreiragonz modified the milestones: v3.7.0, v3.6.2 May 4, 2026
@cferreiragonz cferreiragonz mentioned this pull request May 4, 2026
1 task done
@cferreiragonz cferreiragonz linked an issue May 4, 2026 that may be closed by this pull request
1 task done
@cferreiragonz

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport 3.4.x 3.2.x 2.14.x

@mergify

mergify Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

backport 3.4.x 3.2.x 2.14.x

✅ Backports have been created

Details

Cherry-pick of 7dd4b4d has failed:

On branch mergify/bp/3.4.x/pr-6370
Your branch is up to date with 'origin/3.4.x'.

You are currently cherry-picking commit 7dd4b4d1.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/attributes/RTPSParticipantAttributes.hpp
	modified:   include/fastdds/rtps/participant/RTPSParticipant.hpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupRequestListener.cpp
	modified:   src/cpp/fastdds/domain/DomainParticipantImpl.cpp
	modified:   src/cpp/rtps/builtin/BuiltinProtocols.cpp
	modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
	modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDP.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPListener.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPServerListener.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
	modified:   src/cpp/rtps/builtin/liveliness/WLP.cpp
	modified:   src/cpp/rtps/flowcontrol/FlowControllerFactory.cpp
	modified:   src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
	modified:   src/cpp/rtps/participant/RTPSParticipant.cpp
	modified:   src/cpp/rtps/participant/RTPSParticipantImpl.hpp
	modified:   src/cpp/rtps/reader/BaseReader.cpp
	modified:   src/cpp/rtps/reader/StatefulReader.cpp
	modified:   src/cpp/rtps/security/SecurityManager.cpp
	modified:   src/cpp/rtps/security/SecurityManager.h
	modified:   src/cpp/rtps/security/accesscontrol/AccessControl.h
	modified:   src/cpp/rtps/security/authentication/Authentication.h
	modified:   src/cpp/security/accesscontrol/Permissions.cpp
	modified:   src/cpp/security/accesscontrol/Permissions.h
	modified:   src/cpp/security/authentication/PKIDH.cpp
	modified:   src/cpp/security/authentication/PKIDH.h
	modified:   test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.hpp
	modified:   test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes/RTPSParticipantAttributes.hpp
	modified:   test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.hpp
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAccessControlPlugin.h
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAuthenticationPlugin.h
	modified:   test/unittest/dds/participant/ParticipantTests.cpp
	modified:   test/unittest/rtps/security/SecurityTests.hpp
	modified:   test/unittest/security/accesscontrol/AccessControlTests.cpp
	modified:   test/unittest/security/authentication/AuthenticationPluginTests.hpp
	modified:   test/unittest/security/authentication/BuiltinPKIDHTests.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   include/fastdds/dds/publisher/DataWriter.hpp
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 7dd4b4d has failed:

On branch mergify/bp/3.2.x/pr-6370
Your branch is up to date with 'origin/3.2.x'.

You are currently cherry-picking commit 7dd4b4d17.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/attributes/RTPSParticipantAttributes.hpp
	modified:   include/fastdds/rtps/participant/RTPSParticipant.hpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp
	modified:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupRequestListener.cpp
	modified:   src/cpp/fastdds/domain/DomainParticipantImpl.cpp
	modified:   src/cpp/rtps/builtin/BuiltinProtocols.cpp
	modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
	modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDP.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPListener.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPServerListener.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
	modified:   src/cpp/rtps/builtin/liveliness/WLP.cpp
	modified:   src/cpp/rtps/flowcontrol/FlowControllerFactory.cpp
	modified:   src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
	modified:   src/cpp/rtps/participant/RTPSParticipant.cpp
	modified:   src/cpp/rtps/participant/RTPSParticipantImpl.hpp
	modified:   src/cpp/rtps/reader/BaseReader.cpp
	modified:   src/cpp/rtps/reader/StatefulReader.cpp
	modified:   src/cpp/rtps/security/SecurityManager.cpp
	modified:   src/cpp/rtps/security/SecurityManager.h
	modified:   src/cpp/rtps/security/accesscontrol/AccessControl.h
	modified:   src/cpp/rtps/security/authentication/Authentication.h
	modified:   src/cpp/security/accesscontrol/Permissions.cpp
	modified:   src/cpp/security/accesscontrol/Permissions.h
	modified:   src/cpp/security/authentication/PKIDH.cpp
	modified:   src/cpp/security/authentication/PKIDH.h
	modified:   test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.hpp
	modified:   test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes/RTPSParticipantAttributes.hpp
	modified:   test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.hpp
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAccessControlPlugin.h
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAuthenticationPlugin.h
	modified:   test/unittest/dds/participant/ParticipantTests.cpp
	modified:   test/unittest/rtps/security/SecurityTests.hpp
	modified:   test/unittest/security/accesscontrol/AccessControlTests.cpp
	modified:   test/unittest/security/authentication/AuthenticationPluginTests.hpp
	modified:   test/unittest/security/authentication/BuiltinPKIDHTests.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   include/fastdds/dds/publisher/DataWriter.hpp
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 7dd4b4d has failed:

On branch mergify/bp/2.14.x/pr-6370
Your branch is up to date with 'origin/2.14.x'.

You are currently cherry-picking commit 7dd4b4d17.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/security/accesscontrol/AccessControl.h
	modified:   include/fastdds/rtps/security/authentication/Authentication.h
	modified:   src/cpp/rtps/participant/RTPSParticipant.cpp
	modified:   src/cpp/rtps/security/SecurityManager.h
	modified:   src/cpp/security/accesscontrol/Permissions.cpp
	modified:   src/cpp/security/accesscontrol/Permissions.h
	modified:   src/cpp/security/authentication/PKIDH.cpp
	modified:   src/cpp/security/authentication/PKIDH.h
	modified:   test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAccessControlPlugin.h
	modified:   test/mock/rtps/SecurityPluginFactory/rtps/security/MockAuthenticationPlugin.h
	modified:   test/unittest/rtps/security/SecurityTests.hpp
	modified:   test/unittest/security/accesscontrol/AccessControlTests.cpp
	modified:   test/unittest/security/authentication/AuthenticationPluginTests.hpp
	modified:   test/unittest/security/authentication/BuiltinPKIDHTests.cpp

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   include/fastdds/dds/publisher/DataWriter.hpp
	both modified:   include/fastdds/rtps/attributes/RTPSParticipantAttributes.h
	both modified:   include/fastdds/rtps/participant/RTPSParticipant.h
	deleted by us:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp
	deleted by us:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp
	deleted by us:   src/cpp/fastdds/builtin/type_lookup_service/TypeLookupRequestListener.cpp
	both modified:   src/cpp/fastdds/domain/DomainParticipantImpl.cpp
	both modified:   src/cpp/rtps/builtin/BuiltinProtocols.cpp
	both modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
	both modified:   src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDP.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDPListener.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDPServerListener.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
	both modified:   src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
	both modified:   src/cpp/rtps/builtin/liveliness/WLP.cpp
	both modified:   src/cpp/rtps/flowcontrol/FlowControllerFactory.cpp
	both modified:   src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.h
	deleted by us:   src/cpp/rtps/reader/BaseReader.cpp
	both modified:   src/cpp/rtps/reader/StatefulReader.cpp
	both modified:   src/cpp/rtps/security/SecurityManager.cpp
	both modified:   test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h
	both modified:   test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes/RTPSParticipantAttributes.h
	both modified:   test/unittest/dds/participant/ParticipantTests.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

cferreiragonz added a commit that referenced this pull request May 27, 2026
* Refs #23923: Take mutex in getter and env file callback

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Only update mutable attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes in getter

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Undo copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Avoid calling get_attributes in SecurityManager constructor

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Protect missing cases

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create new method to avoid API break

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Doxygen & TODO in next major

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Copy method in RTPSParticipant

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Mock and tests changes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Revision

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Add missing mutable attribute

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create const copy

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Spelling

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Split const and mutable RTPSParticipantAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Fix Mutable & Constant attributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Apply methods and composition of BuiltinAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Update Tests

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Add ConstantDiscoverySettings

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Solve using statement visibility

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Store constant attributes set at 'setup_' methods

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Init const attributes and update later

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Improve doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 7dd4b4d)
MiguelCompany pushed a commit that referenced this pull request May 28, 2026
* Refs #23923: Take mutex in getter and env file callback



* Refs #23923: Only update mutable attributes



* Refs #23923: Copy attributes in getter



* Refs #23923: Undo copy attributes



* Refs #23923: Avoid calling get_attributes in SecurityManager constructor



* Refs #23923: Copy attributes



* Refs #23923: Protect missing cases



* Refs #23923: Create new method to avoid API break



* Refs #23923: Doxygen & TODO in next major



* Refs #23923: Copy method in RTPSParticipant



* Refs #23923: Mock and tests changes



* Refs #23923: Revision



* Refs #23923: Add missing mutable attribute



* Refs #23923: Create const copy



* Refs #23923: Uncrustify



* Refs #23923: Spelling



* Refs #23923: Split const and mutable RTPSParticipantAttributes



* Refs #23923: Review - Fix Mutable & Constant attributes



* Refs #23923: Review - Apply methods and composition of BuiltinAttributes



* Refs #23923: Review - Update Tests



* Refs #23923: Review - Add ConstantDiscoverySettings



* Refs #23923: Solve using statement visibility



* Refs #23923: Uncrustify



* Refs #23923: Store constant attributes set at 'setup_' methods



* Refs #23923: Init const attributes and update later



* Refs #23923: Review - Improve doxygen



---------




(cherry picked from commit 7dd4b4d)

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
cferreiragonz added a commit that referenced this pull request Jun 1, 2026
* Refs #23923: Take mutex in getter and env file callback

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Only update mutable attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes in getter

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Undo copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Avoid calling get_attributes in SecurityManager constructor

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Protect missing cases

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create new method to avoid API break

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Doxygen & TODO in next major

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Copy method in RTPSParticipant

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Mock and tests changes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Revision

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Add missing mutable attribute

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create const copy

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Spelling

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Split const and mutable RTPSParticipantAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Fix Mutable & Constant attributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Apply methods and composition of BuiltinAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Update Tests

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Add ConstantDiscoverySettings

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Solve using statement visibility

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Store constant attributes set at 'setup_' methods

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Init const attributes and update later

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Improve doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 7dd4b4d)

# Conflicts:
#	include/fastdds/dds/publisher/DataWriter.hpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
MiguelCompany pushed a commit that referenced this pull request Jun 1, 2026
* Fix RTPSParticipantAttributes internal data races (#6370)

* Refs #23923: Take mutex in getter and env file callback

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Only update mutable attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes in getter

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Undo copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Avoid calling get_attributes in SecurityManager constructor

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Protect missing cases

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create new method to avoid API break

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Doxygen & TODO in next major

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Copy method in RTPSParticipant

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Mock and tests changes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Revision

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Add missing mutable attribute

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create const copy

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Spelling

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Split const and mutable RTPSParticipantAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Fix Mutable & Constant attributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Apply methods and composition of BuiltinAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Update Tests

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Add ConstantDiscoverySettings

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Solve using statement visibility

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Store constant attributes set at 'setup_' methods

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Init const attributes and update later

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Improve doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 7dd4b4d)

# Conflicts:
#	include/fastdds/dds/publisher/DataWriter.hpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp

* Fix Conflicts

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Jun 2, 2026
* Refs #23923: Take mutex in getter and env file callback

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Only update mutable attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes in getter

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Undo copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Avoid calling get_attributes in SecurityManager constructor

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Protect missing cases

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create new method to avoid API break

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Doxygen & TODO in next major

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Copy method in RTPSParticipant

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Mock and tests changes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Revision

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Add missing mutable attribute

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create const copy

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Spelling

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Split const and mutable RTPSParticipantAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Fix Mutable & Constant attributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Apply methods and composition of BuiltinAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Update Tests

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Add ConstantDiscoverySettings

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Solve using statement visibility

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Store constant attributes set at 'setup_' methods

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Init const attributes and update later

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Improve doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 7dd4b4d)

# Conflicts:
#	include/fastdds/dds/publisher/DataWriter.hpp
#	include/fastdds/rtps/attributes/RTPSParticipantAttributes.h
#	include/fastdds/rtps/participant/RTPSParticipant.h
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupRequestListener.cpp
#	src/cpp/fastdds/domain/DomainParticipantImpl.cpp
#	src/cpp/rtps/builtin/BuiltinProtocols.cpp
#	src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
#	src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDP.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPListener.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPServerListener.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	src/cpp/rtps/builtin/liveliness/WLP.cpp
#	src/cpp/rtps/flowcontrol/FlowControllerFactory.cpp
#	src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.h
#	src/cpp/rtps/reader/BaseReader.cpp
#	src/cpp/rtps/reader/StatefulReader.cpp
#	src/cpp/rtps/security/SecurityManager.cpp
#	test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h
#	test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes/RTPSParticipantAttributes.h
#	test/unittest/dds/participant/ParticipantTests.cpp
MiguelCompany pushed a commit that referenced this pull request Jun 4, 2026
* Fix RTPSParticipantAttributes internal data races (#6370)

* Refs #23923: Take mutex in getter and env file callback

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Only update mutable attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes in getter

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Undo copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Avoid calling get_attributes in SecurityManager constructor

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Copy attributes

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23923: Protect missing cases

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create new method to avoid API break

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Doxygen & TODO in next major

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Copy method in RTPSParticipant

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Mock and tests changes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Revision

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Add missing mutable attribute

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Create const copy

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Spelling

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Split const and mutable RTPSParticipantAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Fix Mutable & Constant attributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Apply methods and composition of BuiltinAttributes

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Update Tests

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Add ConstantDiscoverySettings

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Solve using statement visibility

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Store constant attributes set at 'setup_' methods

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Init const attributes and update later

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Refs #23923: Review - Improve doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 7dd4b4d)

# Conflicts:
#	include/fastdds/dds/publisher/DataWriter.hpp
#	include/fastdds/rtps/attributes/RTPSParticipantAttributes.h
#	include/fastdds/rtps/participant/RTPSParticipant.h
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp
#	src/cpp/fastdds/builtin/type_lookup_service/TypeLookupRequestListener.cpp
#	src/cpp/fastdds/domain/DomainParticipantImpl.cpp
#	src/cpp/rtps/builtin/BuiltinProtocols.cpp
#	src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
#	src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDP.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPListener.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPServerListener.cpp
#	src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
#	src/cpp/rtps/builtin/discovery/participant/simple/PDPStatelessWriter.cpp
#	src/cpp/rtps/builtin/liveliness/WLP.cpp
#	src/cpp/rtps/flowcontrol/FlowControllerFactory.cpp
#	src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.h
#	src/cpp/rtps/reader/BaseReader.cpp
#	src/cpp/rtps/reader/StatefulReader.cpp
#	src/cpp/rtps/security/SecurityManager.cpp
#	test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h
#	test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes/RTPSParticipantAttributes.h
#	test/unittest/dds/participant/ParticipantTests.cpp

* Solve conflicts

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Handle diffs between Fast 3 and Fast 2

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Solve test conflicts in mocks

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Uncrustify

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

* Fix doxygen

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast dds pro ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter remote locators crash

4 participants