]> Cypherpunks repositories - gostls13.git/commit
runtime: don't do a direct G handoff in semrelease on systemstack
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 9 Jun 2025 21:45:33 +0000 (21:45 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 10 Jun 2025 14:07:57 +0000 (07:07 -0700)
commita189516d3a1623f2560f80569c4b64bdffc4ac78
tree2006a819cd6ff3a27e051801ff1c84b1167f7e1f
parentf18d046568496dd331657df4ba90218821cb9ffd
runtime: don't do a direct G handoff in semrelease on systemstack

semrelease is safe to call on the system stack (since it just readies
goroutines) except for the fact that it might perform a direct G
handoff and call into the scheduler. If handoff is set to false this is
exceptionally rare, but could happen, and has happened for the trace
reader goroutine which releases a trace.doneSema.

Fixes #73469.

Change-Id: I37ece678bc4721bbb6e5879d74daac762b7d742a
Reviewed-on: https://go-review.googlesource.com/c/go/+/680315
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/runtime/sema.go