-
Notifications
You must be signed in to change notification settings - Fork 224
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 leak in ActionServer. taken_data = self._handle.take_goal_request
#1300
Comments
Please note that the results will be retained on the action server for a while (the default is 900 seconds). rclpy/rclpy/rclpy/action/server.py Line 200 in 091f7eb
You can modify this parameter to determine if it's causing the issue. |
i think this can be resolved with #1171, default value is way too big... |
Thank you @Barry-Xu-2018 and @fujitatomoya for the suggestions. Setting |
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: