The linux runner does not gracefully shutdown on SIGINT
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
According to https://github.com/actions/runner/issues/2190#issuecomment-1273302389, the runner should wait for the job is finished and then stop. But it doesn't happen, and new tasks are assigned to the runner with an old PID.
To Reproduce
Steps to reproduce the behavior:
- Go to a runner with a running job and execute
pgrep -af Runner.Listener - Remember it and execute
pkill -INT Runner.Listener - Wait for a one task finished, and another one is started on the same runner.
- The
pgrep -af Runner.Listenerdoes not change/is still there - The
pkill -INT run.shdoes not work as well
Expected behavior
The runner should gracefully shutdown. If it does not by SIGINT, there must be another way to stop it right after the job is finished, before assigning a new one
Runner Version and Platform
Linux 2.298.2 amd64
What's not working?
Please include error messages and screenshots.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue on a Linux runner using the listed pgrep and pkill commands against Runner.Listener and run.sh. Trace the runner's shutdown behavior while a job is active; done means SIGINT prevents another task from being assigned and the runner exits after the current job finishes, or a documented alternative stop mechanism works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, linux
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100