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 sigint guard condition's lifecycle bug #288

Merged
merged 1 commit into from
Mar 20, 2019
Merged

Conversation

reed-lau
Copy link
Contributor

@reed-lau reed-lau commented Mar 18, 2019

@tfoote tfoote added the in review Waiting for review (Kanban column) label Mar 18, 2019
@reed-lau
Copy link
Contributor Author

reed-lau commented Mar 18, 2019

in the executor.py 'sigint_gc' is related with rclpy_get_sigint_guard_condition, rclpy_wait_set_add_entity, rclpy_destroy_entity these three functions. the rclpy_get_sigint_guard_condition assign the sigint_gc to the global static variable g_sigint_gc_handle, but the rclpy_destroy_entity function does not remove it. so sometimes, when we destroy it, and at the same time Ctrl-C is triggered, the catch_function(signal handler function) will using the valid pointer, which could cause segmentfault.

Copy link
Contributor

@sloretz sloretz 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 green CI

@sloretz
Copy link
Contributor

sloretz commented Mar 19, 2019

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@reed-lau
Copy link
Contributor Author

reed-lau commented Mar 19, 2019

change the code to the offical style, re-ci please @sloretz

@sloretz
Copy link
Contributor

sloretz commented Mar 19, 2019

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz
Copy link
Contributor

sloretz commented Mar 20, 2019

CI ( I messed up the test parameters last time)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz
Copy link
Contributor

sloretz commented Mar 20, 2019

Thanks for the fix @reed-lau !

@sloretz sloretz merged commit 28a7773 into ros2:master Mar 20, 2019
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Mar 20, 2019
@reed-lau
Copy link
Contributor Author

will this patch backport to bouncy-branch? as we're still using bouncy, compiling for source.

@sloretz sloretz mentioned this pull request Mar 21, 2019
7 tasks
@sloretz
Copy link
Contributor

sloretz commented Mar 21, 2019

@reed-lau I've added this PR to the list: ros2/ros2#575, though I don't know whether or not another bouncy patch release will happen.

@sloretz sloretz mentioned this pull request Mar 27, 2019
sloretz pushed a commit that referenced this pull request Mar 29, 2019
sloretz pushed a commit that referenced this pull request Mar 29, 2019
* fix #215

Signed-off-by: reed-lau <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
sloretz added a commit that referenced this pull request Mar 29, 2019
* fix #215

Signed-off-by: reed-lau <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
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.

rclpy segmentfault when Ctrl-C
3 participants