safe_sleep.sh inadvertently top 100% CPU
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
safe_sleep.sh is built as while loop aiming to be safer than count on sleep or ping binaries. While loop the way function was implemented leads to 100% CPU usage without try another alternatives (Eg. Testing if sleep is available).
To Reproduce
Steps to reproduce the behavior:
- Start runner
- Wait
Expected behavior
A lesser CPU usage from runner while idle.
Actual behavior

Runner Version and Platform
Linux 2.300.2 running on Docker.
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
Start by locating safe_sleep.sh and inspect the while loop used while the runner is idle. Reproduce the behavior with the Linux runner in Docker, then verify that an idle runner no longer reaches 100% CPU while preserving the safer sleep behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100