]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.4] runtime: fix deadlock in runtime.Stack
authorKeith Randall <khr@golang.org>
Mon, 15 Dec 2014 22:39:28 +0000 (14:39 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 14 Jan 2015 06:16:34 +0000 (06:16 +0000)
commit97b84fc4c86936ac0b012a7f091f70b1f791c11c
treec104e0cb16c2aaf278de99604353c62051f77dbf
parentadd1ee0ed5e0ace0a7d09d9aed38cbd7063f5f28
[release-branch.go1.4] runtime: fix deadlock in runtime.Stack

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 50bc3d5bbc6710663c082aa72c8ba4f9ee515ab3)
Reviewed-on: https://go-review.googlesource.com/2807
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/runtime/mprof.go
test/fixedbugs/issue9321.go [new file with mode: 0644]