]> Cypherpunks repositories - gostls13.git/commit
runtime: fix lock rank for work.spanSPMCs.lock
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 3 Nov 2025 21:40:33 +0000 (21:40 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 10 Nov 2025 17:55:57 +0000 (09:55 -0800)
commit052c192a4cf853f0a613eacc623beca35f8c0e24
tree796a1a46e60a86c98a31a67d6feb0505c363d9ba
parentbc5ffe5c79d45447648a012465e158f29ff5efa2
runtime: fix lock rank for work.spanSPMCs.lock

Currently this lock is treated like a leaf lock, but it's not one. It
can acquire the globalAlloc lock via fixalloc and persistentalloc.

This means we need to figure out where it can be acquired. In general,
it can be acquired by any write barrier, which is already incredibly
broad. AFAICT, it can't be acquired directly otherwise, except when
destroying a spanSPMC during procresize, in which case we'll be holding
sched.lock.

Fixes #75916.

Change-Id: I2da1f5b82c750bf4e8d6a8a562046b9a17fd44be
Reviewed-on: https://go-review.googlesource.com/c/go/+/717500
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/lockrank.go
src/runtime/mgc.go
src/runtime/mklockrank.go