Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: throw should print more diagnostics #34954

Open
aclements opened this issue Oct 17, 2019 · 0 comments
Open

runtime: throw should print more diagnostics #34954

aclements opened this issue Oct 17, 2019 · 0 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@aclements
Copy link
Member

As of Go 1.14 tip, runtime.throw enables slightly more diagnostic information in the traceback. It would help with debugging runtime crashes if it printed more diagnostics, such as:

  1. FP/SP/and PC for all frames in all goroutines, not just the throwing goroutine (which doesn't even work if the throw happens on a system stack)
  2. Runtime frames on all goroutines.
  3. The *g of each goroutine. When a crash involves the scheduler or GC, we often see g pointers in arguments, but generally can't match these up to goroutines in the traceback.
  4. Whether or not the world is stopped, or GC is running.

Most calls to runtime.throw are for internal runtime issues, but some of them are user errors that can't be caught and need to tear down the process (e.g., deadlocks, map races, out of memory). We probably want to distinguish these so the user errors don't include potentially confusing runtime-internal diagnostics.

/cc @mknyszek

@aclements aclements added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 17, 2019
@aclements aclements added this to the Backlog milestone Oct 17, 2019
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Triage Backlog
Development

No branches or pull requests

2 participants