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: "fatal error: schedule: holding locks" during runtime.Stack() #9321
Comments
It seems this is due to two goroutines running runtime.Stack() concurrently |
/cc @rsc, @randall77 |
It occurs even if the other goroutine is not runtime.Stack(). Extremely, it crashes with runtime.GC(), wow! In src/runtime/mprof.go#L581, goroutine X does I'm not sure for runtime, but it seems that it should |
Fix at tip pending here: https://go-review.googlesource.com/1600 I'll work on a 1.4 patch as well. |
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes #9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes golang#9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes golang#9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes golang#9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes golang#9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
It shouldn't semacquire() inside an acquirem(), the runtime thinks that means deadlock. It actually isn't a deadlock, but it looks like it because acquirem() does m.locks++. Candidate for inclusion in 1.4.1. runtime.Stack with all=true is pretty unuseable in GOMAXPROCS>1 environment. fixes golang#9321 Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805 Reviewed-on: https://go-review.googlesource.com/1600 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 50bc3d5) Reviewed-on: https://go-review.googlesource.com/2807 Reviewed-by: Andrew Gerrand <adg@golang.org>
info
test code
result
The text was updated successfully, but these errors were encountered: