Skip to content

Conversation

@bpwilcox
Copy link

@bpwilcox bpwilcox commented Mar 2, 2024

When using lifecycle nodes, the node creates services from an rcl service handle owned by the node's rcl state machine, not the service itself. Because the EventsExecutor also clears the service callbacks manually in its destructor, there is a segfault that occurs depending on the order of destruction if the rcl/rmw service handle is destroyed underneath before the callback has been removed.

From what I can tell, this clear is unnecessary in the service destructor. This clear is also not in the upstream rclcpp.

I tested this change on a local unit test that adds a lifecycle node to an events executor (also a SingleThreadedExectutor) and it passes.

remove clear_on_new_request_callback from service destructor
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.

1 participant