Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: self-deadlock on mheap_.lock [1.21 backport] #64073

Closed
gopherbot opened this issue Nov 11, 2023 · 2 comments
Closed

runtime: self-deadlock on mheap_.lock [1.21 backport] #64073

gopherbot opened this issue Nov 11, 2023 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link
Contributor

@mknyszek requested issue #64067 to be considered for backport to the next 1.21 minor release.

@gopherbot Please open a backport issue for Go 1.21.

This issue can cause deadlocks in running programs. It's rare but there are no workarounds. It also only applies to code that landed in Go 1.21.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Nov 11, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Nov 11, 2023
@gopherbot gopherbot added this to the Go1.21.5 milestone Nov 11, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/541955 mentions this issue: [release-branch.go1.21] runtime: call enableMetadataHugePages and its callees on the systemstack

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Nov 15, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Nov 15, 2023
@gopherbot
Copy link
Contributor Author

Closed by merging 3684d19 to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue Nov 28, 2023
… callees on the systemstack

These functions acquire the heap lock. If they're not called on the
systemstack, a stack growth could cause a self-deadlock since stack
growth may allocate memory from the page heap.

This has been a problem for a while. If this is what's plaguing the
ppc64 port right now, it's very surprising (and probably just
coincidental) that it's showing up now.

For #64050.
For #64062.
For #64067.
Fixes #64073.

Change-Id: I2b95dc134d17be63b9fe8f7a3370fe5b5438682f
Reviewed-on: https://go-review.googlesource.com/c/go/+/541635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Paul Murphy <murp@ibm.com>
(cherry picked from commit 5f08b44)
Reviewed-on: https://go-review.googlesource.com/c/go/+/541955
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
2 participants