aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceback.go
diff options
context:
space:
mode:
authorRichard Musiol <mail@richard-musiol.de>2019-10-06 22:39:08 +0200
committerRichard Musiol <neelance@gmail.com>2019-10-07 18:13:27 +0000
commit1c8e6077f67ea33b752ebf93483517b03ad9393f (patch)
tree5ca4e368df0ce24133fe73fbf8fb15f4c69e42d0 /src/runtime/traceback.go
parent30521d5126c47c9db0dd4cafc3de5bcf3c6348dd (diff)
downloadgo-1c8e6077f67ea33b752ebf93483517b03ad9393f.tar.gz
go-1c8e6077f67ea33b752ebf93483517b03ad9393f.zip
runtime: do not omit stack trace of goroutine that handles async events
On wasm there is a special goroutine that handles asynchronous events. Blocking this goroutine often causes a deadlock. However, the stack trace of this goroutine was omitted when printing the deadlock error. This change adds an exception so the goroutine is not considered as an internal system goroutine and the stack trace gets printed, which helps with debugging the deadlock. Updates #32764 Change-Id: Icc8f5ba3ca5a485d557b7bdd76bf2f1ffb92eb3e Reviewed-on: https://go-review.googlesource.com/c/go/+/199537 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r--src/runtime/traceback.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go
index ef48c9fa1f..5153390f1d 100644
--- a/src/runtime/traceback.go
+++ b/src/runtime/traceback.go
@@ -997,8 +997,8 @@ func topofstack(f funcInfo, g0 bool) bool {
// isSystemGoroutine reports whether the goroutine g must be omitted
// in stack dumps and deadlock detector. This is any goroutine that
-// starts at a runtime.* entry point, except for runtime.main and
-// sometimes runtime.runfinq.
+// starts at a runtime.* entry point, except for runtime.main,
+// runtime.handleAsyncEvents (wasm only) and sometimes runtime.runfinq.
//
// If fixed is true, any goroutine that can vary between user and
// system (that is, the finalizer goroutine) is considered a user
@@ -1009,7 +1009,7 @@ func isSystemGoroutine(gp *g, fixed bool) bool {
if !f.valid() {
return false
}
- if f.funcID == funcID_runtime_main {
+ if f.funcID == funcID_runtime_main || f.funcID == funcID_handleAsyncEvents {
return false
}
if f.funcID == funcID_runfinq {