-
Notifications
You must be signed in to change notification settings - Fork 90
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
Initialize participant on first use. Destroy participant after last node is destroyed. #176
Conversation
…ode is destroyed Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Wow, that's super quick! Of course I had to try, and I get:
which is
I may be able to help you here: the DDS spec says waitsets and guard conditions are things that you can create and delete at any time and that have no relationship with anything else. Cyclone DDS takes a slightly different tack and considers them regular entities that have a parent. Because the participant used to be created immediately in the context initialisation, it could use the participant as the owner of all guard conditions, which also means they are guaranteed to be cleaned up when you delete the participant entity. Now the participant is created later and In Cyclone you don't have to use a participant as the parent (once upon a time, yes, but that's not been the case for quite some time). Above the participant sits a domain entity (created at the same time as the first node), and above that sits the Cyclone library itself, which is a singleton object with constant, pre-defined handle: So if you use
|
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
@eboasson I was going to ask how to handle that situation, thanks for answering it beforehand.
Yes, all
Considering that wait sets can be created in |
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.
Thanks @ivanpauno! It basically looks good to me, except for the handling of failure during init
and what looks like a use-after-free in rmw_destroy_node
. I think both have trivial fixes.
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
@eboasson PTAL, I will re-run CI after approval. |
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.
Partial review; I'm not too familiar with this code base. Hope it's useful
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
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.
Looks good to me!
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
While investigating another issue, I run in a problem similar to the one commented here #176 (comment). New CI, this time limited to |
Ok, this solves most of the failures, but we've this new one https://ci.ros2.org/job/ci_windows/10483/testReport/junit/test_rclcpp/test_executor__rmw_cyclonedds_cpp/notify/ across all implementations. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
3d807fe 🤦♂️. |
CI summary: Looks good to merge to me
While there appears to be a new failure of test_parameter_server with cylconedds, there is a longstanding issue ros2/system_tests#420 for the same thing with Fast-RTPS. The console output shows this new failure happening in the same place as Fast-RTPS, so I'm inclined to think it's a test issue rather than caused by this PR
|
The same approach was used in
rmw_fastrtps
.Fixes #174.