-
Notifications
You must be signed in to change notification settings - Fork 168
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
[rcl_lifecycle] Do not share transition event message between nodes #956
Conversation
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.
LGTM pending green CI
… idl C types API Signed-off-by: Ivan Santiago Paunovic <[email protected]>
I cannot reproduce https://ci.ros2.org/job/ci_linux-aarch64/10476/console with local environment. CI(retry): |
ros2/rmw_implementation#202 should be fixing that |
…os2#956) Signed-off-by: Ivan Santiago Paunovic <[email protected]>
This is a simple bug that was never hit before.
The following sequence of events will end up in an error being triggered by the rmw implementation:
The issue is that the third step finalized the static lifetime transition event message shared by all the nodes, and the transition label will still be uninitialized when rcl_lifecycle_com_interface_publish_notification() is called.
(rmw implementations don't accept null c typesupport strings, they need an allocated string "\0")
It was pretty easy to hit the bug when working in ros2/rclpy#865, as it's not obvious when destruction happens when you have a garbage collector.
Note: this change breaks ABI, the backport will need to initialize and fini a new message in rcl_lifecycle_com_interface_publish_notification().
That's a bit not ideal because it triggers an allocation each time, but considering how our C type mapping works there doesn't seem to be a better way to do it.