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: detect zombie goroutines #5308

Open
dvyukov opened this issue Apr 17, 2013 · 4 comments
Open

runtime: detect zombie goroutines #5308

dvyukov opened this issue Apr 17, 2013 · 4 comments
Labels
FeatureRequest NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Apr 17, 2013

Runtime can detect goroutines blocked on unreachable chans/mutexes/etc and report such
cases.
This needs an interface in http/pprof to query zombie goroutines on running services.
And probably testing package integration to test for absence of zombie goroutines.
@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 1:

Sounds halting problem-esque to me.

Status changed to Invalid.

@dvyukov
Copy link
Member Author

dvyukov commented Jul 30, 2013

Comment 2:

The idea is as follows:
Do GC-like scan of memory, but do not consider stacks of goroutines blocked on channels
as roots. If a channel is marked as reachable, make all goroutines blocked on it as
reachable and include their stacks into roots. At the end of the scan goroutines not
marked as reachable are reported as dead.
This can be extended to other synchronization primitives and timers (timer which Time
chan is not reachable other than from the timer is dead).

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-main.

@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 4:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants