]> Cypherpunks repositories - gostls13.git/commit
runtime: fix deadlock in runtime.Stack
authorKeith Randall <khr@golang.org>
Mon, 15 Dec 2014 22:39:28 +0000 (14:39 -0800)
committerKeith Randall <khr@golang.org>
Tue, 16 Dec 2014 17:04:45 +0000 (17:04 +0000)
commit50bc3d5bbc6710663c082aa72c8ba4f9ee515ab3
treec6bd70290604d573c47db3a9370503704deb8557
parent8f36655346396e32952c6a7c9cfbc16c73a1ff4d
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>
src/runtime/mprof.go
test/fixedbugs/issue9321.go [new file with mode: 0644]