-
Notifications
You must be signed in to change notification settings - Fork 80
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
Nodelets not tear down when nodelet manager receives SIGINT #55
Comments
Confirmed. We have the server thread that must be properly shutdown in destructor (seems the recommended practice). By placing the log statement there we discovered that the destructor does not run while killing the application with CTRL-C. |
I'm experiencing what I believe is a related issue in ros-melodic.
On the other hand, if I don't have a separate roscore running, I can kill/relaunch the pipeline without issue. Is anyone aware of a workaround other than not having a separate roscore? Having to restart roscore can be problematic in larger distributed systems. |
I see a similar issue to what jpapon describes. I have a launch files that starts 350 nodes or nodelets. And if I do not restart the roscore when re-running the launch file I get problem with nodes (are nodelets) being killed because name duplication. But the different names should be in different namespace so that should not be an issue. If I let the launch file start the roscore then it works without any problems. rosnode list does not show any nodes left after I have killed the launch file. And ps doesn not show any hanging processes. rosnode cleanup did not help. |
I have the same issue with realsense2_camera (realsense-ros). |
Hi all,
I think the second point would be easy to verify, by adding a Further explanation Using this as reference: http://docs.ros.org/diamondback/api/roscpp/html/init_8cpp_source.html Request shutdown sets a global variable inside the node class that should smoothly shut down a node in the next iteration of spin. (Line 140) That request is serviced later by the Poll Manager object of the node, in an asynchronous manner. Shutdown actually shuts down the queues, time loggers and connections of a node. (Line 519) However, shutdown might not advance to shut down time, which is required to stop nodes that use ros::Rate and use custom signal handlers and threads. In this case you have to manually shut down the time tracking instance. In both cases there are recursive mutexes to prevent that multiple shutdown calls crash the node. |
A possible work around would be to kill the nodelet manager. For instance, assume the following nodes are running but need to be restarted:
By running the command:
all associated nodelets are killed and can then be restarted. Killing |
Reposting this as a standalone issue here . Thanks @dseifert for reporting this).
The text was updated successfully, but these errors were encountered: