-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: preempt more aggressively when panicking
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 <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]>
- Loading branch information
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters