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: improve "sweep increased allocation count" diagnostics #21729

Open
aclements opened this issue Sep 1, 2017 · 1 comment
Open

runtime: improve "sweep increased allocation count" diagnostics #21729

aclements opened this issue Sep 1, 2017 · 1 comment
Labels
Milestone

Comments

@aclements
Copy link
Member

@aclements aclements commented Sep 1, 2017

The infamous "sweep increased allocation count" panic is not very informative. What it really means is that a free object was found to be live. It should say that, and it should say which object it is and dump its contents. Essentially, it can cheaply give half of the information that gccheckmark can. This half may even be enough to debug the problem from a core dump and a heap graph.

The comments around the panic should give additional context (not worth printing), like saying that common causes are bad liveness maps, past-the-end pointers, unsafe conversions from pointers to integers and back to pointers, and just plain wild pointers. The comments should suggest running with GODEBUG=gccheckmark=1 to find the source of bad pointer.

/cc @RLH @randall77

@aclements aclements added this to the Go1.10 milestone Sep 1, 2017
@rsc rsc removed this from the Go1.10 milestone Nov 22, 2017
@rsc rsc added this to the Go1.11 milestone Nov 22, 2017
@ianlancetaylor ianlancetaylor removed this from the Go1.11 milestone Jul 10, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Jul 10, 2018
@andybons andybons removed this from the Go1.12 milestone Feb 12, 2019
@andybons andybons added this to the Go1.13 milestone Feb 12, 2019
@andybons andybons removed this from the Go1.13 milestone Jul 8, 2019
@andybons andybons added this to the Go1.14 milestone Jul 8, 2019
@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
@jiacai2050
Copy link

@jiacai2050 jiacai2050 commented Dec 16, 2019

Is anyone working on this? This tricky issue happens several times one day in my app, the stack log is useless for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants