-
Notifications
You must be signed in to change notification settings - Fork 21
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
Possible memory leak (after dis-, then reconnect of Agent) #35
Comments
Summary of earlier findings/comments:
|
Just as an update to this, I am running iron, which includes the previously mentioned PR (micro-ROS/rmw_microxrcedds#280). But it seems to still have the same memory issues. Here's a table showing the memory free and delta on my YRC1000 with Iron
It is still unclear to me where the problem is. But it seems like at the very least, the problem is not solved by the linked PR. I can try to track it down. But with how inconsistent it is, it might be tough to tell what exactly is going wrong. |
On my very ugly branch, I have fixed seemingly all of the memory leaks from disconnect/reconnect cycles except for one. I believe that I have narrowed down the remaining leak to My branch is a branch off of If anybody has any ideas on how to fix this last leak, please let me know. |
I created a new branch off of main and copied over the relevant fix from my fork and made a PR. This will make it more clear what changes I made, and decrease the impact of the memory leak for the time being. The other leak that I mentioned in my previous comment is still present, though. |
I believe that I have found the second memory leak. The problem is seemingly this line in I talked to Ted, and it seems to be an upstream problem, so I'm not suggesting that we merge the branch that I just made into our fork's main, but I wanted to share what I did to get rid of the leak. I think that I will create an issue upstream. |
Yes, that is an issue upstream. Seeing as the same code is in I would however suggest to check whether it's been perhaps already fixed in upstream's Humble, Jazzy or Rolling branches and we / micro-ROS is just lagging those. Just to avoid posting about an already resolved issue.
indeed, I don't believe that'd be necessary. The leak is very small and it doesn't affect functionality in MotoROS2. I would suggest we wait until upstream patches it and then we can update to those versions. |
I created an issue here ros2/rcl#1198 |
Apparently it is the responsibility of the rmw to free that memory. So I opened a new issue here: micro-ROS/rmw_microxrcedds#311. |
As mentioned in the Known issues & limitations section of the README (here), MotoROS2 currently appears to suffer from a small memory leak.
Testing shows the following values for used and free memory after several consecutive connect and disconnect cycles with a Galactic micro-ROS Agent:
As a table:
No changes to the config file between
rebootsdis-and-re-connects.It's unclear what causes this at this point.
The text was updated successfully, but these errors were encountered: