PR2 / pr2_mechanism

Infrastructure to control the PR2 robot in a hard realtime control loop.
Other
29 stars 27 forks source link

Controller Manager hangs (sporadically) on shutdown (ros ticket #4514) #293

Closed ahendrix closed 11 years ago

ahendrix commented 11 years ago

When roslaunching gazebo repeatedly, the gazebo process sometimes hangs on shutdown (about 1 in 40 times). I've taken a backtrace from just before roslaunch escalates to SIGTERM, and hopefully identified the stalled thread.

{{{ Thread 20 (Thread 0x7f16b3b90910 (LWP 6688)):

0 0x00007f16f8474f51 in nanosleep () from /lib/libc.so.6

1 0x00007f16f84a9bb4 in usleep () from /lib/libc.so.6

---Type to continue, or q to quit---

2 0x00007f16d2f8f902 in pr2_controller_manager::ControllerManager::unloadController(std::string const&) ()

from /u/sglaser/ros/dev/pr2_mechanism/pr2_controller_manager/lib/libpr2_controller_manager.so

3 0x00007f16d2f90298 in pr2_controller_manager::ControllerManager::unloadControllerSrv(pr2_mechanism_msgs::UnloadControllerRequest_std::allocator&, pr2_mechanism_msgs::UnloadControllerResponse_std::allocator&) ()

}}}

Here, the controller manager is waiting for the realtime process to make use of the new controller list, but the realtime process is no longer running (as it has been shutdown already).

trac data:

ahendrix commented 11 years ago

[wim] $ svn ci -m "fix potential lockup on shutdown. #4514" Sending pr2_controller_manager/src/controller_manager.cpp Transmitting file data . Committed revision r40440.