runtime/pprof: StopCPUProfile occasionally stuck with 100% CPU and process hang #52912
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In tidb-server there is a feature with a pattern that repeatedly run pprof CPU profiler for 1 second (StartCPUProfile -> wait 1 sec -> StopCPUProfile -> StartCPUProfile -> wait 1 sec -> ...).
Recently in my MacOS M1 with this feature enabled, I observed that the tidb-server process was hang with 100% (1 core) CPU and it cannot process any requests.
According to the CPU profiling data provided by Instruments, looks like
StopCPUProfile
was looping infinitely atgo/src/runtime/proc.go
Line 4641 in 016d755
I have no idea how this issue can be reliably reproduced. Hope the stack provided by the Instruments helps.
What did you expect to see?
StopCPUProfile should not cause process hang.
What did you see instead?
Process was hanging.
The text was updated successfully, but these errors were encountered: