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

runtime: Panic if newstack at runtime.acquireLockRank [1.15 backport] #40845

gopherbot opened this issue Aug 17, 2020 · 4 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 17, 2020

@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.

@aclements
Copy link
Member

@aclements aclements commented Aug 20, 2020

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

@cagedmantis cagedmantis commented Aug 28, 2020

Approved because it is a critical issue without a workaround.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Sep 1, 2020

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

@gopherbot gopherbot commented Sep 2, 2020

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

@gopherbot gopherbot closed this Sep 2, 2020
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.