Skip to content

Goroutine leak detector #12989

Closed
Closed
@klauspost

Description

@klauspost

In my experience it could be very valuable to have a goroutine "leak" detection similar to the race detector we already have. It should be able to detect goroutines that will never we runnable again, and therefore is "leaked".

I have created a playground example of the things I could imagine would be detectable, which are blocking selects, sync.Mutex, sync.WaitGroup, sync.Cond, where no other goroutine holds a reference to the item needing to unblock it.

The examples are of course very simple, but I don't see why it shouldn't apply in a much bigger scope.

I imagine this could be used in a similar fashion as the race detector, so it is an option that can be used for testing, problem identification, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions