Memory leak occurred when rosparam enable_statistics was set to true with autoware_health_checker
Required information:
- Operating system and version:
- Ubuntu 16.04
- Autoware installation type:
- From source
- Autoware version or commit hash
- v1.10 (Probably also occurs in v1.12)
- ROS distribution and version:
- kinetic kame
- ROS installation type:
- From binaries(apt)
- Package or library, if applicable:
- N/A
Description of the bug
The flag (rosparam enable_statistics
) that triggers the memory leak has been turned on with autoware_health_checker.
- This bug should be discussed in ros_comm, but as a provisional response until ros_comm is completely corrected, it must be included in Autoware.
Steps to reproduce the bug
- Launch
roscore
- Launch the health_checker using
roslaunch autoware_health_checker health_checker.launch
(or simplyrosparam set /enable_statistics true
) - Launch
while [ 1 ] ; do rostopic pub -1 /test std_msgs/Empty "{}" ; sleep 0.1 ; done
- Launch
rostopic echo /test
- Keep it moving for hours.
- Compare the resources immediately after startup with those after a few hours.
- See the memory leak.
Additional information
ROS subscriber has a function to output statistical information /statistics
when rosparam /enable_statistics
is enabled.
When a long-term durability test was performed with this function enabled, a memory leak problem was observed.
Similar discussions have been made about the melodic environment, but it has not been verified. https://github.com/ros/ros_comm/issues/1626
Edited by Yuma Nihei