[go] runtime: fix lock rank for work.spanSPMCs.lock

1 view
Skip to first unread message

Michael Knyszek (Gerrit)

unread,
Nov 10, 2025, 12:56:01 PM (2 days ago) Nov 10
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Go LUCI, golang-co...@googlegroups.com

Michael Knyszek submitted the change

Change information

Commit message:
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-by: Michael Pratt <mpr...@google.com>
Files:
  • M src/runtime/lockrank.go
  • M src/runtime/mgc.go
  • M src/runtime/mklockrank.go
Change size: S
Delta: 3 files changed, 10 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Michael Pratt
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I2da1f5b82c750bf4e8d6a8a562046b9a17fd44be
Gerrit-Change-Number: 717500
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages