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

x/debug: add core dump reader #21356

Closed
randall77 opened this issue Aug 8, 2017 · 7 comments
Closed

x/debug: add core dump reader #21356

randall77 opened this issue Aug 8, 2017 · 7 comments

Comments

@randall77
Copy link
Contributor

I propose to develop a set of packages to enable the reading of core dumps generated by Go programs.
This set of packages will enable writing tools which can perform post-mortems on crashing Go servers.  An example might be out-of-memory analysis: looking for how many allocated objects of each type they are, why they are considered live, etc.

This proposal is particularly about the library that can read core dumps. The actual tools based on this library are a separate proposal.

I propose to add these packages somewhere in x/tools.

I've written up a small design doc with more details.

@gopherbot gopherbot added this to the Proposal milestone Aug 8, 2017
@rsc
Copy link
Contributor

rsc commented Aug 14, 2017

x/tools is fine (even without resolving exactly what x/tools is for, it's close enough to this).
Will leave design details to others, but as far as I'm concerned you can approve this whenever.

/cc @aclements @dr2chase @heschik @RLH @ianlancetaylor

@rsc
Copy link
Contributor

rsc commented Oct 9, 2017

Going to mark this accepted to move out of the proposal queue. I assume you know the right people to discuss the design with.

@rsc rsc changed the title proposal: core dump reader x/tool: core dump reader Oct 9, 2017
@rsc rsc changed the title x/tool: core dump reader x/tools: core dump reader Oct 9, 2017
@rsc rsc changed the title x/tools: core dump reader x/tools: add core dump reader Oct 9, 2017
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/72830 mentions this issue: x/debug/core: add initial implementation

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/73191 mentions this issue: x/debug/gocore: add gocore reader

@randall77 randall77 changed the title x/tools: add core dump reader x/debug: add core dump reader Oct 24, 2017
gopherbot pushed a commit to golang/debug that referenced this issue Jan 16, 2018
Add library for reading core dumps.

Update golang/go#21356

Change-Id: Ia7fa09d9e78a7c30fbdec184a5cf6f73b0994c4a
Reviewed-on: https://go-review.googlesource.com/72830
Reviewed-by: Peter Weinberger <[email protected]>
gopherbot pushed a commit to golang/debug that referenced this issue Feb 6, 2018
Add a library that can extract a bunch of information from a Go core dump.

Update golang/go#21356

Change-Id: I9997c80452a4ad205d0799f89b2e268b4a5a9e2f
Reviewed-on: https://go-review.googlesource.com/73191
Reviewed-by: Austin Clements <[email protected]>
@randall77
Copy link
Contributor Author

This now exists: golang.org/x/debug/cmd/viewcore (+ internal helpers).
Closing.

@lrstanley
Copy link

Unless I'm mistaken, @randall77, that does not resolve the original issue. This issue is about the packages, not the tooling.

This proposal is particularly about the library that can read core dumps. The actual tools based on this library are a separate proposal.

I propose to add these packages somewhere in x/tools.

More specifically, I'm seeing that the packages used by viewcore are internal only.

https://github.com/golang/debug/blob/547453c34fb121ed0dae9624edc8a7a0c1e4e87d/cmd/viewcore/main.go#L24-L25

@randall77
Copy link
Contributor Author

@lrstanley True. I argued for external, but was convinced otherwise by the folks who were actually going to maintain the tool.
You can always fork those libraries if you'd like to use them.

@golang golang locked and limited conversation to collaborators Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants