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

fix: Fixed possible memory violation after remove_node #2767

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

jmachowinski
Copy link
Collaborator

Up until this change, after the call to remove node, entities of a node might still be in the use by the executor. Therefore direct deletion of the node after the call might result in a memory violation if an entity would do a callback into the node itself. From now on, by default the remove_node will be blocking until all entities are released by the executor, which should be the expected behavior for most users.

This commit fixes #2749

Up until this change, after the call to remove node, entities of a
node might still be in the use by the executor. Therefore direct deletion
of the node after the call might result in a memory violation if an entity
would do a callback into the node itself. From now on, by default the
remove_node will be blocking until all entities are released by the executor,
which should be the expected behavior for most users.

Signed-off-by: Janosch Machowinski <[email protected]>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with one comment.

@fujitatomoya
Copy link
Collaborator

@jmachowinski do we want to backport the similar fix to jazzy and humble without changing function signature?

@jmachowinski
Copy link
Collaborator Author

@jmachowinski do we want to backport the similar fix to jazzy and humble without changing function signature?

This would be a behavior change, so I think we can't backport

@jmachowinski
Copy link
Collaborator Author

Pulls: #2767
Gist: https://gist.githubusercontent.com/jmachowinski/4d53ebb774c3ac9d2a8237d958ac3bbd/raw/6a7d039e89a00abdaecdcc0ca187e49fdda5b0e7/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15412

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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.

🧑‍🌾 Windows test_executors regression: SEH Exception
2 participants