Memory leak in ActionServer. taken_data = self._handle.take_goal_request
#1300
Labels
enhancement
New feature or request
taken_data = self._handle.take_goal_request
#1300
Bug report
Required Info:
Steps to reproduce issue
NOTE: The zipped fibonacci_package.zip ROS2 package contains all the files required to reproduce the issue.
Action definition
Fibonacci.action
is similar to https://docs.ros.org/en/jazzy/Tutorials/Intermediate/Creating-an-Action.html.I adapted the action client and server from https://docs.ros.org/en/jazzy/Tutorials/Intermediate/Writing-an-Action-Server-Client/Py.html.
Action client
fibonacci_action_client.py
:Action server
fibonacci_action_server.py
:Start the client before the server, each in a separate terminal:
Expected behavior
Constant memory footprint of both server and client. (Below 100 MiB per process.)
Actual behavior
The client memory footprint is constant (below 78 MiB). However, the server memory footprint grows over time at the rate of ca. 1.3 GiB per minute.
The server prints:
Additional information
The memory leak seems to happen in
/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/action/server.py
, note the allocated 1325 MiB reported by tracemalloc.Line 453 of
/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/action/server.py
is:which calls https://github.com/ros2/rclpy/blob/humble/rclpy/src/rclpy/action_server.cpp#L127.
The text was updated successfully, but these errors were encountered: