-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
When using rclcpp::spin_some(node);, the node resources increase forever.
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- binaries
- Version or commit hash:
- Rolling
- DDS implementation:
- Fast-RTPS or CycloneDDS
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
Compile and execute this simple node.
#include <rclcpp/rclcpp.hpp>
int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
auto node = std::make_shared<rclcpp::Node>("foo");
while(rclcpp::ok())
{
rclcpp::spin_some(node);
}
rclcpp::shutdown();
return 0;
}Using htop you will see the resources of the process increase.
Expected behavior
The node resources should be stable.
Actual behavior
The node resources increase until the OS kills the node because of memory storage.
Out of memory: Killed process
Additional information
It can be easily bypassed by creating an executor out of the loop and spinning it inside.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working