ROS-TCP-Endpoint
ROS-TCP-Endpoint copied to clipboard
Docker container memory usage increases with time, possible memory leak
Describe the bug When the Unity client connects, and starts subscribing to a ROS2 topic, the ROS-TCP-ENDPOINT docker container memory usage starts to go up. Container memory usage increases only if the client is connected and the topic is being subscibed to. Once the client disconnects or there is no more ros2 messages being published, the memory usage stays the same.
Console logs / stack traces No errors or anything out of the ordinary in either ROS-TCP-Endpoint or ROS-TCP-Connector logs.
Expected behavior Container memory usage should not increase with time
Screenshots
Environment:
- Unity Version: Unity 2021.1.17f1
- Unity machine OS + version: Windows 11, Windows 10 & Android 11
- ROS machine OS + version: Ubuntu 20.04 ROS Foxy
- ROS–Unity communication: Docker (Running on either Ubuntu 20.04 host or Windows 11 host)
- ROS-TCP-Connector version: both v0.6.0 and v. 0.5.0
- ROS-TCP-Endpoint branch: both dev-ros2 and main-ros2
Additional context Used msg packages: ros built-in messages, geographic_msgs, unique_identifier_msgs, and a custom message type. Only 1 topic.
Did some profiling. Here is a docker profiling log and graph
as-ros-to-unity-profiling-log.zip
Thanks for reporting the issue and the detailed information. We created a ticket to investigate the issue [AIRO-1686]
This issue has been marked stale because it has been open for 14 days with no activity. Please remove the stale label or comment on this issue, or the issue will be automatically closed in the next 14 days.
Hi! Any updates on this issue?
It seems this issue can be resolved by changing ros2 version from Foxy to Galactic. The problem seems to be in Foxy rclpy serialization.