CPU high because infinite loop
If CPU is pegged and one process is responsible, an infinite loop or busy-wait pattern is a common culprit.
Common symptoms
- One process pegs a core immediately
- No useful output despite high CPU
- Restart temporarily fixes it
Likely causes
- Missing break condition
- Polling without sleep
- Retry without backoff
Evidence to look for
Same function repeats in profiling samples
CPU stays high with no progress
Process restarts clear the issue temporarily
What it usually means
The process is repeating the same work endlessly without making forward progress.
What to do next
- 1Add exit conditions and sleep intervals
- 2Log iteration counts to prove the loop
- 3Profile to identify the spinning function
See what's causing your CPU
cpum.ai turns CPU, process, disk, and memory signals into plain-English explanations with evidence.
Open cpum.ai