geometry2 icon indicating copy to clipboard operation
geometry2 copied to clipboard

Memory leak on exception

Open maxlein opened this issue 4 years ago • 5 comments

Bug report

I have 2 nodes which lookup a transform from base_link -> map.
As soon as the map transform is not published anymore, in my case the node crashed, memory usage is increasing linearly as seen on the screenshot.
Probably due to the exception being thrown during lookup.

base_link -> static
odom -> still publishing
map -> stopped publishing

On the screenshot you see a purple line which suddenly ends. ( -> Map Tf publisher died )
And after that 2 lines are linearly increasing. ( memory usage of the 2 nodes which lookup the transform )

image

The exact exception which causes this:
Exception when looking up transform: Lookup would require extrapolation into the past. Requested time 1575061102.81358 but the earliest data is at time 1575275920.42176, when looking up transform from frame [base_link] to frame [map]

Required Info:

  • Operating System:
    • Ubuntu 18.04, ros dashing
  • Installation type:
    • binaries
  • Version or commit hash:
    • dashing release
  • DDS implementation:
    • opensplice 0.7.3
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

tf.lookupTransform(targetFrame, tf2_time, sourceFrame, tf2_time, targetFrame);

Expected behavior

Memory usage stays constant

Actual behavior

Memory usage increases linearly

maxlein avatar Dec 02 '19 08:12 maxlein