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
Closing the terminal doesn't kill the node in ROS2 Humble running on Docker #721
Comments
Also, from some discussion at our weekly triage meeting, it seems like the issue may be in how signals are handled by the entry point. |
Thanks for reporting. @maxkonrad @audrow
Is it possible to provide a reproducible example by providing a full dockerfile and other files copied in the container (e.g. the entrypoint.sh)? Can you reproduce the issue with a vanilla ros:humble image without extra custom configs and files ? |
I will try to reproduce with both again today and share the process I followed sorry for late answer I was busy these days. |
1st of all, container is still running state after close the terminal? in other word, how did you start the docker e.g a couple of more questions.
thanks, |
entrypoint.sh:
bashrc:
dockerfile:
my_py_pkg simply contains basic number publisher and subscriber scripts to test connection. run command: !!! important -> I am connected to jetson via ssh and closed the terminal on my host. I will try to reproduce the issue again with ros/humble image in a few minutes |
docker running code: yes they are on the same network I will try again today to reproduce the issue, again as you said: maybe it takes time to un-discover because of ssh connection or docker?? |
I quickly prepared a video for this link to youtube video |
besides this, can you check that container status with |
No, actually I only close one instance of docker terminal I created with exec command. Docker container still runs. @fujitatomoya |
And also I just realized I wasn't using osrf's desktop image on jetson (besides there is no arm image for osrf ros2 desktop afaik) I, by mistake copied the wrong code from private repo, there only FROM command and all its line should be changed to FROM ros:humble. I know that makes it irrelevant to osrf and it is about ros maybe I should move this issue again. Sorry again for mistake. @audrow after corrections the Dockerfile should be as the following:
Sorry again for the mistake I am new to software and open source world :( |
i can reproduce this issue on my env without ros. i say current work-around is to make sure exit the process spawned by ### start container
tomoyafujita@~/DVT/work >docker run -it --network=host --ipc=host test
Provided arguments: bash
root@tomoyafujita:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 22:30 pts/0 00:00:00 bash
root 46 1 0 22:30 pts/0 00:00:00 ps -ef
root@tomoyafujita:/#
### start another session
tomoyafujita@~/DVT >docker exec -it c1922deefec2 /bin/bash
root@tomoyafujita:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 22:30 pts/0 00:00:00 bash
root 47 0 0 22:31 pts/1 00:00:00 /bin/bash
root 54 47 0 22:31 pts/1 00:00:00 ps -ef
### closing terminal without exit
root@tomoyafujita:/# sleep 60
root@tomoyafujita:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 22:30 pts/0 00:00:00 bash
root 47 0 0 22:31 pts/1 00:00:00 /bin/bash
root 56 47 0 22:32 pts/1 00:00:00 sleep 60
root 57 1 0 22:32 pts/0 00:00:00 ps -ef
### give it 60 seconds
root@tomoyafujita:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 22:30 pts/0 00:00:00 bash
root 47 0 0 22:31 pts/1 00:00:00 /bin/bash
root 59 1 0 22:32 pts/0 00:00:00 ps -ef the problem is PID moby/moby#9098 seems related. |
@fujitatomoya thanks so much, I think mods can close this issue then. |
Yeah, looks like an upstream issue with exec. Closing here. |
Bug report
Required Info:
Steps to reproduce issue
1- I connected to jetson nano host via ssh using my Ubuntu22.04 pc's Terminator terminal.
2- I ran a docker instance with the following Dockerfile
3- There are two std_msgs.msg int64 publishers I am using on the my_py_pkg python package, one of them publishes to /number_count topic and both of them publishes to /number topic. (idk if two nodes publishing to one topic is a problem)
4- Close the terminal or change the network.
Expected behavior
I expected running nodes to kill.
Actual behavior
Running nodes show when I run
ros2 node list
but when I runros2 lifecycle set <topic name> shutdown
it returns Node not found on terminal. I don't know if node is alive or not.Additional information
The text was updated successfully, but these errors were encountered: