-
Notifications
You must be signed in to change notification settings - Fork 145
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
Shutdown hangs on SIGINT #473
Comments
I can confirm the issue also affects Rolling. |
I've transferred this issue since it affects import sys
from launch import LaunchDescription
from launch import LaunchService
import launch.actions
def generate_launch_description():
return LaunchDescription([
launch.actions.ExecuteProcess(cmd=['./simple_script.bash'], output='screen')
])
if __name__ == '__main__':
ls = LaunchService(argv=sys.argv)
ls.include_launch_description(generate_launch_description())
sys.exit(ls.run()) Launch with: python3 simple.launch.py then kill with something like: pkill -2 python3 |
It looks like
|
I'm not sure why, but we never reach the following line when sigint is sent from a separate shell:
|
Yep. |
I don't have time right now to look into a patch (I'm not sure exactly where in the code a fix needs to land); help is appreciated. |
So do I. |
Ok, there are several different issues here:
I'm not sure how to deal with (1.). Perhaps we could let |
Putting it in for Galactic solely because signal handling seems broken. FYI @clalancette. |
I believe this has been solved. I'll proceed to close this ticket. Feel free to reopen if needed. |
Bug report
Required Info:
Steps to reproduce issue
Any rarely logging binary/script, e.g.
/tmp/simple_script.bash
:A launch file
/tmp/simple.launch.py
:Run the launch file with debug option:
In separate terminal tab send SIGINT to launcher process:
Expected behavior
In best case I expect launcher would forward SIGINT to my bash subprocess and both processes terminate gracefully. At least I expect launcher would terminate in finite time.
Actual behavior
Nothing happens until subprocess echoes. Looks like Shutdown event stuck in queue. In the log below you can see there's about 19 second between emitting Shutdown event and processing one:
Additional information
This behaviour is not observed when sending SIGINT with Ctrl+C in terminal, since TTY machinery sends signal to the whole process group and subprocesses terminate without parent's help.
In my case I tried to run
ros2 launch
in docker container.docker stop
sends specified signal only to parent process.The text was updated successfully, but these errors were encountered: