How to kill zombie node in ROS2? [closed]

asked 2020-03-28 04:03:45 -0600

yyatk gravatar image

updated 2020-03-29 21:10:54 -0600

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by yyatk
close date 2020-04-06 03:33:29.708844

Comments

Did you try to use kill -9 PID from the host?

docker exec -it <container> ps -aux

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.

Weasfas gravatar image Weasfas  ( 2020-03-29 08:17:45 -0600 )edit

This zombie node can't be seen by ps -aux So, I can't kill this process by kill -9 PID

yyatk gravatar image yyatk  ( 2020-03-29 21:14:34 -0600 )edit

This zombie node may be happened when node process is killed by SIGKILL or SIGTERM.

yyatk gravatar image yyatk  ( 2020-03-30 01:18:25 -0600 )edit

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.

Weasfas gravatar image Weasfas  ( 2020-03-30 04:52:48 -0600 )edit

OK. I'll also ask in docker forum. Thank you.

yyatk gravatar image yyatk  ( 2020-03-31 04:02:08 -0600 )edit

This was not zombie node. It was because other people also ran same program in same network. So, I close this question.

yyatk gravatar image yyatk  ( 2020-04-06 03:31:54 -0600 )edit

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...

marguedas gravatar image marguedas  ( 2020-04-06 05:11:31 -0600 )edit

I tried to use different ROS_DOMAIN_ID and I could solve this problem. Thank you.

yyatk gravatar image yyatk  ( 2020-04-06 21:28:22 -0600 )edit