]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: add scavenge -> traceBuf to lock partial order
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 30 Apr 2020 19:13:41 +0000 (19:13 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 30 Apr 2020 20:18:38 +0000 (20:18 +0000)
commit0f8fecaba762c352db481d4919edf404f5590d22
treeee01cbb9bb31d12efabe418514e90cbf4e86ad32
parent2491c5fd2451783e4ba6630345805de1e7761e3b
runtime: add scavenge -> traceBuf to lock partial order

Under the scavenge lock it's possible to ready a goroutine (or now
injectglist, which has mostly the same effect) which could cause an
unpark trace event to be emitted. If there's no active trace buffer for
the P, then we might acquire the lock. The total order between the two
is correct, but there's no partial order edge between them. Add in the
edge.

Change-Id: I3fc5d86a3b6bdd0b5648181fb76b5ebc90c3d69f
Reviewed-on: https://go-review.googlesource.com/c/go/+/231197
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/runtime/lockrank.go