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

gopherbot opened this issue Aug 17, 2020 · 4 comments

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

gopherbot opened this issue Aug 17, 2020 · 4 comments


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.

Copy link

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

Copy link

@cagedmantis cagedmantis commented Aug 28, 2020

Approved because it is a critical issue without a workaround.

Copy link

@gopherbot gopherbot commented Sep 1, 2020

Change mentions this issue: [release-branch.go1.15] runtime: fix panic if newstack at runtime.acquireLockRank

Copy link

@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

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

Updates #40843.
Fixes #40845.

Change-Id: I5824119f98a1da66d767cdb9a60dffe768f13c81
GitHub-Last-Rev: 38fd3cc
GitHub-Pull-Request: #40844
Reviewed-by: Dan Scales <>
Run-TryBot: Emmanuel Odeke <>
TryBot-Result: Gobot Gobot <>
(cherry picked from commit b246c0e)
Run-TryBot: Dmitri Shuralyov <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.