]> Cypherpunks repositories - gostls13.git/commit
runtime: ignore SIGPROF if profiling disable for thread
authorIan Lance Taylor <iant@golang.org>
Wed, 9 Sep 2020 17:40:11 +0000 (10:40 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 9 Sep 2020 18:04:10 +0000 (18:04 +0000)
commit2556eb76c8e752907600274d323a52e97418d14f
treeb96ff9b9ae8d3d87cc25ac6a5b3346773dd10fe1
parent34835df04891a1d54394888b763af88f9476101d
runtime: ignore SIGPROF if profiling disable for thread

This avoids a deadlock on prof.signalLock between setcpuprofilerate
and cpuprof.add if a SIGPROF is delivered to the thread between the
call to setThreadCPUProfiler and acquiring prof.signalLock.

Fixes #41014

Change-Id: Ie825e8594f93a19fb1a6320ed640f4e631553596
Reviewed-on: https://go-review.googlesource.com/c/go/+/253758
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/proc.go