How To Debug CPU Load Bugs

In some situations PulseAudio ends up spinning in a loop eating 100% CPU time. This will then be detected by PA's internal CPU load limiter which will then cause a daemon shutdown with the messages "Soft CPU time limit exhausted, terminating" and "Hard CPU time limit exhausted, terminating forcibly."

There might be multiple reasons for this: actual bugs in PulseAudio, or bugs in the ALSA drivers. Or simply clients that ask for very low latency, which results in high CPU load. (the latter you can find out by using "pactl list" and looking at the latency settings listed therein)

Please use oprofile to gather some data about where the CPU load is lost

It might be worth trying to disable timer scheduling (i.e. "glitch-free") by passing tsched=0 to module-hal-detect. When g-f is enabled PA will dynamically shorten wakeup times when an underrun is hit, to lower the chance that it happens again. Shorter wakeup times mean higher CPU load. Often enough the underruns are caused by broken timing of sound drivers. See Broken Sound Drivers for more information on that.

Also, while debugging you probably want to disable the CPU load limiter by passing --no-cpu-limit.