Skip to content

safe_sleep.sh inadvertently top 100% CPU  #2380

Open
@leleobhz

Description

@leleobhz

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:

  1. Start runner
  2. Wait

Expected behavior

A lesser CPU usage from runner while idle.

Actual behavior

image

Runner Version and Platform

Linux 2.300.2 running on Docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood-first-issuekeepLabel can be added as soon as we are sure the work on the issue is necessary

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions