-
Notifications
You must be signed in to change notification settings - Fork 431
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
Memory leaks: Error in destruction of rcl action client handle: the Node Handle was destructed too early. #1545
Comments
could you share the complete procedure to reproduce this issue? i want to check if this still happens in source build. |
You can use this dockerfile to reproduce the environmental setting. In the docker container, you have a rox:foxy system with geometry2 Please let me know if anything unclear. |
memory leak confirmed with source build ros2/ros2@9552559
|
could be similar with #1296 |
just sharing debug information. stack trace via gdb
|
Just find out that the same memory leaks can be exposed by running three other binaries (besides
The leaks can be reproduced on the ros:foxy docker with the same dockerfile above. I have not tested with the recent rclcpp though (due to difficulties with source compilation). |
Besides, the same memory leak can also be triggered without sanitizers. Just compile with plain
|
Sorry. Just realized that the memory leaks have been addressed recently. |
we've fixed some memory leaks in a couple of month, but i can still see this problem. |
could you try #1562? i tried more than hundreds times, no memory leak observed. |
Just saw this. @fujitatomoya you mean try the newly merged one (related to another issue) ? By the way, I just realize that no Continuous Integration is used for rclcpp: https://index.ros.org/r/rclcpp/, or I may misunderstand? |
Unfortunately, the index doesn't understand all of the ways we do Continuous Integration. We actually have several forms of CI for rclcpp (and all of the core ROS 2 packages, for that matter). Every time a PR is opened a "PR job" is run (you can see one of the runs for rclcpp here). That job is helpful to give early feedback. The downside is that it only runs on Linux, and cannot test API changes across repositories. To handle the latter two things, we always run jobs on https://ci.ros2.org on all platforms, with all core packages built from source. You can see what that looks like here: #1562 (comment) |
yes, you can use either rolling or foxy from the source. (I already did confirm the problem is gone, but just in case) or if it is okay for you to close issue, we can do that too. |
@fujitatomoya Could you share a Dockerfile or something that specifies your environment where this bug disappears? Probably i misuse something as I still got the error with the following Dockerfile.
Perhaps something is wrong with this Dockerfile since it mixes rolling and foxy? |
Yes, that's a problem (we haven't backported all of the fixes from rolling to foxy). You should change that to:
(notice that we checkout the |
@fujitatomoya FYI, I tried with a corrected dockerfile (thanks to @clalancette),
I got no errors with a single run, but still got memory leaks after many runs
|
Can you give us the stack trace of the leak? |
i tried with source build https://github.com/ros2/ros2/blob/master/ros2.repos, cannot make that happen. |
Okay @fujitatomoya Then please ignore my message above. I thought you meant that testing on rolling would be, in this case, the same. Also, I do not know if this is easily doable: is it possible to have a Dockerfile published on the ROS website which specifies the build instructions of ROS2 from the latest source. In this way, if one finds a bug in a release version such as foxy, he/she can readily check it again on your latest source. For now, building ROS from source following instructions from the ROS website remains a tedious task for amateurs unfortunately, which could slow down the process of bug finding/reporting/confirming. |
@zhoulaifu thanks for the consideration, please feel free to re-open or open new issue anytime 😃 |
Memory leaks are found when running test_buffer_client of tf2_ros. with the Address Sanitizer (https://en.wikipedia.org/wiki/AddressSanitizer) on.
Below is the error message. Let me know if you need a dockerfile to reproduce it.
The text was updated successfully, but these errors were encountered: