When we are crashing from an unrecovered panic, we freeze the world, and print stack traces for all goroutines if GOTRACEBACK is set to a high enough level. Freezing the world is best effort, so there could still be goroutines that are not preempted, and so its stack trace is unavailable and printed as "goroutine running on other thread". As we're crashing and not resuming execution on preempted goroutines, we can make preemption more aggressive, preempting cases that are not safe for resumption or stack scanning. This may make goroutines more likely to be preempted in freezing the world and have their stacks available. Change-Id: Ie16269e2a05e007efa61368b695addc28d7a97ee Reviewed-on: https://go-review.googlesource.com/c/go/+/546135 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.