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

Remove clear request callback in service destructor #143

Open
wants to merge 1 commit into
base: irobot/humble
Choose a base branch
from

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