Skip to content
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 on 0.5.0 #38

Closed
vooon opened this issue Jun 28, 2014 · 5 comments
Closed

Memory leak on 0.5.0 #38

vooon opened this issue Jun 28, 2014 · 5 comments

Comments

@vooon
Copy link
Member

vooon commented Jun 28, 2014

I tested mavros_node for a while and found a memory leak (about 300 KiB/min).
This is strange, because i use smart pointers everywhere. But I have little experience in C++.
For current tasks of leakage is not critical, but should be corrected to the next big release.

Test environment:

  • ROS Indigo compiled from source for armhf
  • Wandboard Quad host machine
  • mavros 0.5.0 connected to APM 2.6 via USB at 57600
  • ros2ntpd 1.0.0 connected to /mavros/time_reference topic
@vooon vooon added this to the Versoin 0.6.0 milestone Jun 28, 2014
@vooon vooon added bug labels Jun 28, 2014
@vooon
Copy link
Member Author

vooon commented Jul 11, 2014

Testing under valgrind shows errors in log4cxx, but it is very strange.

rosparam set /mavros/plugin_blacklist '["*"]'
rosrun --prefix 'valgrind --leak-check=full --trace-children=yes --show-leak-kinds=all --log-file=mavros.vglog' mavros mavros_node _serial_port:=/tmp/fcu2
rosrun --prefix 'valgrind --leak-check=full --trace-children=yes --show-leak-kinds=all --log-file=ros_udp.vglog' mavros ros_udp _bind_port:=45000
rosrun mavros ros_udp _bind_port:=45001 _gcs_host:=localhost _gcs_port:=45000

Results: mavros.vdlog, ros_udp.vglog.

@vooon
Copy link
Member Author

vooon commented Jul 11, 2014

With --track-origins=yes: mavros.vglog, ros_udp.vglog.

vooon added a commit that referenced this issue Jul 11, 2014
vooon added a commit that referenced this issue Jul 11, 2014
WARNING: this change broke external plugins.
Please add const to get_name() and get_supported_messages().

Part of #38.
@vooon
Copy link
Member Author

vooon commented Jul 14, 2014

Now leak speed reduced to ~150 KiB/min. Still don't know source.

@vooon vooon mentioned this issue Jul 14, 2014
@vooon vooon modified the milestones: Versoin 0.7.0, Versoin 0.6.0 Jul 15, 2014
@vooon
Copy link
Member Author

vooon commented Jul 20, 2014

I think #54 remove this leak. It was in udp code.

@vooon
Copy link
Member Author

vooon commented Jul 20, 2014

Node works about a hour and no new space allocated. I think it's closed.

@vooon vooon closed this as completed Jul 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant