[23923] Fix RTPSParticipantAttributes internal data races#6370
[23923] Fix RTPSParticipantAttributes internal data races#6370MiguelCompany merged 26 commits intomasterfrom
Conversation
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>
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>
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>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
|
259 Data Races reported by ASAN, none of them related with |
MiguelCompany
left a comment
There was a problem hiding this comment.
Just one nit. It does not require to rerun CI.
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
|
@Mergifyio backport 3.4.x 3.2.x 2.14.x |
✅ Backports have been createdDetails
Cherry-pick of 7dd4b4d has failed: 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: 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: 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 |
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 likeupdate_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
versions.mdfile (if applicable).Reviewer Checklist