Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15905] Fix dataraces when creating DataWriters #3008

Merged
merged 5 commits into from
Oct 14, 2022

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Oct 11, 2022

Signed-off-by: Eduardo Ponz eduardoponz@eprosima.com

Description

This PR fixes a segmentation fault that may arise when calling RTPSParticipantImpl::createWriter on the same participants in parallel from different threads.

@Mergifyio backport 2.7.x 2.6.x 2.3.x 2.1.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.
  • N/A: Any new/modified methods have been properly documented using Doxygen.
  • Fast DDS test suite has been run locally.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • Documentation builds and tests pass locally.
  • 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.

Reviewer Checklist

  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

Changes LGTM, but we should add a test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
…ace regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
@EduPonz EduPonz force-pushed the hotfix/paralell_create_writer branch from 00a4a04 to 4987408 Compare October 13, 2022 14:06
Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
@MiguelCompany
Copy link
Member

@richiprosima Please test this

@MiguelCompany
Copy link
Member

@richiprosima Please test mac

Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

LGTM

@MiguelCompany MiguelCompany changed the title [15905] Declare the PublishMode running flag as atomic [15905] Fix dataraces when creating DataWriters Oct 14, 2022
@MiguelCompany MiguelCompany merged commit 4391864 into master Oct 14, 2022
@MiguelCompany MiguelCompany deleted the hotfix/paralell_create_writer branch October 14, 2022 11:10
@MiguelCompany
Copy link
Member

https://github.com/Mergifyio backport 2.7.x 2.6.x 2.3.x 2.1.x

mergify bot pushed a commit that referenced this pull request Oct 14, 2022
* Refs #15905: Declare the PublishMode running flag as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add RTPS regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add DomainParticipantImpl::create_instance_handle data race regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Set DomainParticipantImpl::next_instance_id_ as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Apply suggestions

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
(cherry picked from commit 4391864)
mergify bot pushed a commit that referenced this pull request Oct 14, 2022
* Refs #15905: Declare the PublishMode running flag as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add RTPS regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add DomainParticipantImpl::create_instance_handle data race regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Set DomainParticipantImpl::next_instance_id_ as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Apply suggestions

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
(cherry picked from commit 4391864)
mergify bot pushed a commit that referenced this pull request Oct 14, 2022
* Refs #15905: Declare the PublishMode running flag as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add RTPS regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add DomainParticipantImpl::create_instance_handle data race regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Set DomainParticipantImpl::next_instance_id_ as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Apply suggestions

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
(cherry picked from commit 4391864)

# Conflicts:
#	src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
#	test/blackbox/common/DDSBlackboxTestsBasic.cpp
#	test/blackbox/common/RTPSBlackboxTestsBasic.cpp
@mergify
Copy link
Contributor

mergify bot commented Oct 14, 2022

backport 2.7.x 2.6.x 2.3.x 2.1.x

✅ Backports have been created

EduPonz added a commit that referenced this pull request Oct 28, 2022
* Refs #15905: Declare the PublishMode running flag as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add RTPS regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Add DomainParticipantImpl::create_instance_handle data race regression test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Set DomainParticipantImpl::next_instance_id_ as atomic

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

* Refs #15905: Apply suggestions

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
(cherry picked from commit 4391864)
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.

2 participants