]> Cypherpunks repositories - gostls13.git/commit
runtime: print stack of G during a signal
authorKeith Randall <khr@golang.org>
Tue, 28 Apr 2015 21:53:19 +0000 (14:53 -0700)
committerKeith Randall <khr@golang.org>
Wed, 29 Apr 2015 19:25:10 +0000 (19:25 +0000)
commit4b78c9575d3b1190c63b25761dfb86f4d1715c2e
tree24fafe6727ebc1c0868c23e3d4a2110b3375148a
parent4d1ab2d8d10283925e486ad75237ae694f3b6cce
runtime: print stack of G during a signal

Sequence of operations:
- Go code does a systemstack call
- during the systemstack call, receive a signal
- signal requests a traceback of all goroutines

The orignal G is still marked as _Grunning, so the traceback code
refuses to print its stack.

Fix by allowing traceback of Gs whose caller is on the same M as G is.
G can't be modifying its stack if that is the case.

Fixes #10546

Change-Id: I2bcea48c0197fbf78ab6fa080027cd80181083ad
Reviewed-on: https://go-review.googlesource.com/9435
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/traceback.go