Skip to content

fix sigint guard condition's lifecycle bug - #288

Merged
sloretz merged 1 commit into
ros2:masterfrom
reed-lau:master
Mar 20, 2019
Merged

sloretz merged 1 commit into
ros2:masterfrom
reed-lau:master

Conversation

@reed-lau

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

Copy link
Copy Markdown
Contributor

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

reed-lau commented Mar 18, 2019 •

Copy link
Copy Markdown
Contributor Author

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.

@sloretz sloretz left a comment

Copy link
Copy Markdown
Contributor

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

sloretz commented Mar 19, 2019

Copy link
Copy Markdown
Contributor

CI

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

@reed-lau

reed-lau commented Mar 19, 2019 •

Copy link
Copy Markdown
Contributor Author

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

@sloretz

sloretz commented Mar 19, 2019

Copy link
Copy Markdown
Contributor

CI

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

@sloretz

sloretz commented Mar 20, 2019

Copy link
Copy Markdown
Contributor

CI ( I messed up the test parameters last time)

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

@sloretz

sloretz commented Mar 20, 2019

Copy link
Copy Markdown
Contributor

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
@nuclearsandwich nuclearsandwich mentioned this pull request Mar 20, 2019
8 tasks done
@reed-lau

Copy link
Copy Markdown
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
1 of 7 tasks
@sloretz

sloretz commented Mar 21, 2019

Copy link
Copy Markdown
Contributor

@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