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

aclements opened this issue Oct 17, 2019 · 0 comments

runtime: throw should print more diagnostics #34954

aclements opened this issue Oct 17, 2019 · 0 comments


Copy link

@aclements aclements commented Oct 17, 2019

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 label Oct 17, 2019
@aclements aclements added this to the Backlog milestone Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant