-
Notifications
You must be signed in to change notification settings - Fork 770
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
[15766] Update shared_mutex thirdparty to don't prioritize writers #2976
Conversation
@richiprosima Please test this for me 🤯 |
1 similar comment
@richiprosima Please test this for me 🤯 |
97e3f18
to
afcb602
Compare
@richiprosima please test this |
afcb602
to
1c149b0
Compare
@richiprosima Please I have to rebase in order to fix docs ci, test this again 😅 |
1c149b0
to
5af6af9
Compare
@richiprosima Please I have to rebase in order to fix docs ci, test this again 😅 |
@richiprosima please test this |
Is there any progress? |
@richiprosima Please test this |
Some of the checked checklist steps look incorrect:
|
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
…mework prioritizes writing. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
…texes. Now they always allow them. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
…_MUTEX value is already specified. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
@richiprosima Please test this for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from my comment below, please investigate this failure
0474f1a
to
adf2351
Compare
@richiprosima Please test this for me |
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
adf2351
to
50388f0
Compare
@richiprosima Please test this for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI!
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
@richiprosima Please test this for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Mergifyio backport 2.7.x 2.6.x |
✅ Backports have been created
|
* Add test for multithreaded creation of readers on a single subscriber. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Add DataWriter. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 15766: Refactor of shared_mutex to select writer priority Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: CMake update to force third party shared mutex if the framework prioritizes writing. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add atomic support for some debian distros Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Allow recursiveness on participant endpoint collection mutexes. Now they always allow them. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter pass Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Generate the config.h file when the USE_THIRDPARTY_SHARED_MUTEX value is already specified. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Mandatory piggyback: avoid polution on free_pools_ collection Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add some missing members to shared_lock thirdparty Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. shared_mutex testing Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. fixing gtest backward compatibility issues Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Add a new test to check priority is right Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing gcc build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing clang build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Make thirdparty versions always available even if none is used as eprosima::shared_mutex. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Addressing reviewers comments Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing sync issue on ProxyPool. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
* Add test for multithreaded creation of readers on a single subscriber. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Add DataWriter. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 15766: Refactor of shared_mutex to select writer priority Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: CMake update to force third party shared mutex if the framework prioritizes writing. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add atomic support for some debian distros Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Allow recursiveness on participant endpoint collection mutexes. Now they always allow them. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter pass Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Generate the config.h file when the USE_THIRDPARTY_SHARED_MUTEX value is already specified. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Mandatory piggyback: avoid polution on free_pools_ collection Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add some missing members to shared_lock thirdparty Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. shared_mutex testing Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. fixing gtest backward compatibility issues Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Add a new test to check priority is right Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing gcc build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing clang build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Make thirdparty versions always available even if none is used as eprosima::shared_mutex. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Addressing reviewers comments Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing sync issue on ProxyPool. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
* Update shared_mutex thirdparty to not prioritize writers (#2976) * Add test for multithreaded creation of readers on a single subscriber. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Add DataWriter. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 15766: Refactor of shared_mutex to select writer priority Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: CMake update to force third party shared mutex if the framework prioritizes writing. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add atomic support for some debian distros Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Allow recursiveness on participant endpoint collection mutexes. Now they always allow them. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter pass Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Generate the config.h file when the USE_THIRDPARTY_SHARED_MUTEX value is already specified. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Mandatory piggyback: avoid polution on free_pools_ collection Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add some missing members to shared_lock thirdparty Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. shared_mutex testing Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. fixing gtest backward compatibility issues Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Add a new test to check priority is right Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing gcc build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing clang build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Make thirdparty versions always available even if none is used as eprosima::shared_mutex. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Addressing reviewers comments Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing sync issue on ProxyPool. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com> * Fixing gcc warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * make sure config.h is always included through fastrtps_dll.h as is expected. Do we need a foreport? Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: Miguel Barro <miguelbarro@eprosima.com>
* Add test for multithreaded creation of readers on a single subscriber. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Add DataWriter. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 15766: Refactor of shared_mutex to select writer priority Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: CMake update to force third party shared mutex if the framework prioritizes writing. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add atomic support for some debian distros Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Allow recursiveness on participant endpoint collection mutexes. Now they always allow them. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter pass Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Generate the config.h file when the USE_THIRDPARTY_SHARED_MUTEX value is already specified. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Mandatory piggyback: avoid polution on free_pools_ collection Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: Add some missing members to shared_lock thirdparty Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766: linter Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. shared_mutex testing Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. fixing gtest backward compatibility issues Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Add a new test to check priority is right Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing gcc build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing clang build warnings Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Make thirdparty versions always available even if none is used as eprosima::shared_mutex. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Addressing reviewers comments Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 15766. Fixing sync issue on ProxyPool. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
Description
The C++ standard requirements for
shared_mutex
do not specify if exclusive lock operation should preempt the shared lock one. Posix allows both behaviors but defaults to not preempting shared locks. STL implementations are split on this subject:PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
)PTHREAD_RWLOCK_PREFER_READER_NP
)In order to prevent deadlock scenarios:
Documentation: eProsima/Fast-DDS-docs#413
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist