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: Panic if newstack at runtime.acquireLockRank [1.15 backport] #40845

Closed
gopherbot opened this issue Aug 17, 2020 · 4 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ALTree requested issue #40843 to be considered for backport to the next 1.15 minor release.

@gopherbot, please backport to Go 1.15, as requested by prattmic.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 17, 2020
@gopherbot gopherbot added this to the Go1.15.1 milestone Aug 17, 2020
@aclements
Copy link
Member

Backport justification: This causes random runtime panics in programs compiled without optimizations (which mostly comes up when compiling for debugging; for example, Delve compiles targets without optimizations automatically). The fix is also extremely low-risk.

This doesn't need a 1.14 backport because it's part of lock rank checking, which was introduced in 1.15.

@cagedmantis
Copy link
Contributor

Approved because it is a critical issue without a workaround.

@cagedmantis cagedmantis added the CherryPickApproved Used during the release process for point releases label Aug 28, 2020
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Aug 28, 2020
@dmitshur dmitshur modified the milestones: Go1.15.1, Go1.15.2 Sep 1, 2020
@gopherbot
Copy link
Author

Change https://golang.org/cl/252339 mentions this issue: [release-branch.go1.15] runtime: fix panic if newstack at runtime.acquireLockRank

@gopherbot
Copy link
Author

Closed by merging a269e5f to release-branch.go1.15.

gopherbot pushed a commit that referenced this issue Sep 2, 2020
…uireLockRank

Process may crash becaues acquireLockRank and releaseLockRank may
be called in nosplit context. With optimizations and inlining
disabled, these functions won't get inlined or have their morestack
calls eliminated.
Nosplit is not strictly required for lockWithRank, unlockWithRank
and lockWithRankMayAcquire, just keep consistency with lockrank_on.go
here.

Updates #40843.
Fixes #40845.

Change-Id: I5824119f98a1da66d767cdb9a60dffe768f13c81
GitHub-Last-Rev: 38fd3cc
GitHub-Pull-Request: #40844
Reviewed-on: https://go-review.googlesource.com/c/go/+/248878
Reviewed-by: Dan Scales <danscales@google.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit b246c0e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/252339
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
claucece pushed a commit to claucece/go that referenced this issue Oct 22, 2020
…uireLockRank

Process may crash becaues acquireLockRank and releaseLockRank may
be called in nosplit context. With optimizations and inlining
disabled, these functions won't get inlined or have their morestack
calls eliminated.
Nosplit is not strictly required for lockWithRank, unlockWithRank
and lockWithRankMayAcquire, just keep consistency with lockrank_on.go
here.

Updates golang#40843.
Fixes golang#40845.

Change-Id: I5824119f98a1da66d767cdb9a60dffe768f13c81
GitHub-Last-Rev: 38fd3cc
GitHub-Pull-Request: golang#40844
Reviewed-on: https://go-review.googlesource.com/c/go/+/248878
Reviewed-by: Dan Scales <danscales@google.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit b246c0e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/252339
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants