Skip to content

Revert "Revert "Store the subscriber, client, service and timer""#449

Merged
wjwwood merged 3 commits intomasterfrom
revert-448-revert-431-issue-349
Mar 20, 2018
Merged

Revert "Revert "Store the subscriber, client, service and timer""#449
wjwwood merged 3 commits intomasterfrom
revert-448-revert-431-issue-349

Conversation

@wjwwood
Copy link
Copy Markdown
Member

@wjwwood wjwwood commented Mar 14, 2018

Reverts #448

@guillaumeautran and @deng02 FYI.

@wjwwood wjwwood added the in progress Actively being worked on (Kanban column) label Mar 14, 2018
@guillaumeautran
Copy link
Copy Markdown
Contributor

Hey @wjwwood, Yes, I see the problem. Sorry about that. Looking to clean that up now.

@guillaumeautran
Copy link
Copy Markdown
Contributor

Ok, I found at least one of the root cause of the issue. it is explained here: http://floating.io/2017/07/lambda-shared_ptr-memory-leak/
fixing it...

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Mar 14, 2018

No worries, that's why we have CI and nightlies 😄. It's not a hurry. I reverted it, so it's not affecting other people. I'll also have a look at it tomorrow if I can.

@guillaumeautran
Copy link
Copy Markdown
Contributor

Ok, I've got a fix for these. @wjwwood could you please have a look and tell me if it is acceptable?
Change is here: clearpathrobotics@3bbb5dc

Note, that for simplicity purposes, the node_handle shared pointer (which does not work with lambda) is replaced by a weak pointer. This means that if the node handle is destructed before the service / subscriber handle, the rcl datastructure will leak (since the fini destructor needs a valid node pointer).

@guillaumeautran
Copy link
Copy Markdown
Contributor

I'm also looking at UT this change but currently struggling to come up with a B/W test.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Mar 15, 2018

@guillaumeautran the patch looks pretty good to me, can you open a pull request against this pull requests's branch (revert-448-revert-431-issue-349)?

guillaumeautran and others added 2 commits March 19, 2018 11:13
Converts all rcl_*_t types in the memory allocation strategy to shared pointers to prevent crash happening when a subscriber is reset.

Issue: #349
@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 19, 2018
@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Mar 19, 2018

CI:

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

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Mar 20, 2018

I carefully went through the failures on each CI job and I believe them all to be unrelated this time. So I'll merge this. Thanks @guillaumeautran for helping fix it up!

@wjwwood wjwwood merged commit 9ce5aaa into master Mar 20, 2018
@wjwwood wjwwood deleted the revert-448-revert-431-issue-349 branch March 20, 2018 04:05
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Mar 20, 2018
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user.

Resolves ros2#449

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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.

2 participants