A flawed script named safe_sleep.sh in the GitHub Actions Runner caused serious reliability issues for years

Viewed 5

The script attempted to replace the standard sleep command using a busy-waiting Bash loop based on the $SECONDS variable.

SECONDS=0
while [[ $SECONDS != $1 ]]; do
  :
done

Under real CI load, $SECONDS could skip past the target value, causing the loop to never terminate. When this happened, the script would spin indefinitely at ~100% CPU, leading to hung workflows, degraded runners, and long-running invisible processes.

The bug was easy to trigger in busy CI environments, widely reported, and long-lived. Although its impact was significant, it remained unfixed for an extended period, becoming emblematic of broader concerns around GitHub Actions reliability and engineering practices.

A fix was finally merged and released in 2025, correcting the infinite-loop behavior.

References

0 Answers