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 constantly increasing memory in std::list (backport #636) #649

Merged
merged 1 commit into from Feb 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 12, 2024

This is an automatic backport of pull request #636 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* Fix constantly increasing memory in std::list

When someone is constantly publishing with the same tf2 timestamp
(application error, I know), the storage_ of the tf2::TimeCache grows
unbounded causing system-wide memory leaks. In a ROS system, each tf2
Listener will spawn one of these TimeCache objects and thus, all ROS
nodes that have any sort of tf2 listener will slowly start allocating
more and more memory

And also fixed the situation where two different tf2 needs to be
introduced at the same timestamp.

Since the tests were failing I realized that I had to dive a bit deeper
into the simple solution. And extend a bit the TransformStorage clase to
be comparable, now instead of just looking to the timestamps, the
implementation avoids inserting duplicates in the buffer.

If for some reason, someone is publishing a different Transfrom
(xyz,rpy) at the same timestamp. Well, that case is not being captured
now, but I'd say that's another problem

Signed-off-by: Ignacio Vizzo <ignaciovizzo@gmail.com>
(cherry picked from commit 1621942)
@clalancette
Copy link
Contributor

CI:

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

@ahcorde ahcorde merged commit 97a0f4a into iron Feb 13, 2024
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mergify/bp/iron/pr-636 branch February 13, 2024 08:46
jplapp pushed a commit to pixel-robotics/geometry2 that referenced this pull request Feb 19, 2024
nachovizzo pushed a commit to nachovizzo/geometry2 that referenced this pull request Mar 12, 2024
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.

None yet

3 participants