]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add edge from lock rank edge from forceGC to traceStackTab
authorDan Scales <danscales@google.com>
Sat, 1 May 2021 20:57:00 +0000 (13:57 -0700)
committerDan Scales <danscales@google.com>
Mon, 3 May 2021 16:25:05 +0000 (16:25 +0000)
commitd75fbac54d34484041a5ecb0b65f298b821cd963
tree0b2c4e2c125debe9806f16cffe13de5ec5175660
parent7b768d43d0f0e3e734369496bb1caa409d4bd0bb
cmd/compile:  add edge from lock rank edge from forceGC to traceStackTab

This edge can happen when forcegchelper() calls
goparkunlock(&forcegc.lock, ...) while holding the forcegc lock.
goparkunlock() eventually calls park_m(). In park_m(), traceGoPark()
(which leads to (*traceStackTable).put() and acquires the traceStackTab
lock) can be called before the forcegc lock is released.

Fixes #45774

Change-Id: If0fceab596712eb9ec0b9b47326778bc0ff80913
Reviewed-on: https://go-review.googlesource.com/c/go/+/316029
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Trust: Carlos Amedee <carlos@golang.org>
src/runtime/lockrank.go