-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: Panic if newstack at runtime.acquireLockRank #40843
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
Comments
gcflags="all=-N -l"
The function named `acquireLockRank` at `src/runtime/lockrank_on.go` with `go:nosplit`, but at `src/runtime/lockrank_off.go` without `go:nosplit`. GOEXPERIMENT="" in default, process will panic if newstack at runtime.acquireLockRank with `gcflags="all=-N -l"`. Similarly, function `lockWithRank`, `unlockWithRank`, `releaseLockRank` and `lockWithRankMayAcquire`. Fixes golang#40843
Change https://golang.org/cl/248878 mentions this issue: |
@gopherbot, please backport to Go 1.15, as requested by prattmic. |
Backport issue(s) opened: #40845 (for 1.15). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
I have commited a pull request #40844 for solving this issue, please check it . Thx. |
Process may crash becaues acquireLockRank and releaseLockRank may be called in nosplit context. With optimization s 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. Fixes golang#40843
Process may crash becaues acquireLockRank and releaseLockRank may be called in nosplit context. With optimization s 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. Fixes golang#40843
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. Fixes golang#40843
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. Fixes golang#40843
Change https://golang.org/cl/252339 mentions this issue: |
…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 <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> (cherry picked from commit b246c0e) Reviewed-on: https://go-review.googlesource.com/c/go/+/252339 Run-TryBot: Dmitri Shuralyov <[email protected]>
…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 <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> (cherry picked from commit b246c0e) Reviewed-on: https://go-review.googlesource.com/c/go/+/252339 Run-TryBot: Dmitri Shuralyov <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
No painc.
What did you see instead?
Reason
I dive this issue then find this issue #38922 and this commit
The function named
acquireLockRank
atsrc/runtime/lockrank_on.go
withgo:nosplit
, but atsrc/runtime/lockrank_off.go
withoutgo:nosplit
. (GOEXPERIMENT="" in default )Similarly, function
lockWithRank
/unlockWithRank
/releaseLockRank
/lockWithRankMayAcquire
.The text was updated successfully, but these errors were encountered: