How to kill zombie node in ROS2? [closed]
In the docker, I can get node list by this command.
ros2 node list
/zombie_node
But, when I run this command to kill the node, daemon returns "Node not found".
ros2 lifecycle set /zombie_node shutdown
How can I kill this node? I tried reboot and docker kill. However, this zombie node can't be killed and this node continues to output message. Only docker rebuild can erase zombie_node
Did you try to use
kill -9 PID
from the host?should list the PID inside the docker container, maybe you can use from the host the kill command to end that process. A quick search gives me:
However, the kernel may not be able to successfully kill the process in some situations. If the process is waiting for network or disk I/O, the kernel won’t be able to stop it. Zombie processes and processes caught in an uninterruptible sleep cannot be stopped by the kernel, either. A reboot is required to clear those processes from the system.
This zombie node can't be seen by
ps -aux
So, I can't kill this process bykill -9 PID
This zombie node may be happened when node process is killed by SIGKILL or SIGTERM.
Mm that is weird. To kill a zombie process you have to kill its parent process, so you may try to kill the parent. Maybe this and this are usefull.
But I am afraid you are going to need specific help from the docker community, maybe posting in the docker forum gives you any clue.
OK. I'll also ask in docker forum. Thank you.
This was not zombie node. It was because other people also ran same program in same network. So, I close this question.
IDK if this applies to your network but a good way to segregate network users and avoid interference is to use different ROS_DOMAIN_ID on each independent ROS2 system: https://index.ros.org/doc/ros2/Tutori...
I tried to use different ROS_DOMAIN_ID and I could solve this problem. Thank you.