Skip to content

Clean up event handling code goroutine leaks #637

@DirectXMan12

Description

@DirectXMan12

Technically, we can leak goroutines when you create a manager, since the event initialization code used in CR creates new goroutines.

There's two places -- the first is when we create a new broadcaster, it launches some goroutines. As of kubernetes/kubernetes#83489, that can be shut down, but we probably need to move that to start.

The second is in the actual event provider setup code -- that launches some goroutines when we set up the sinks. If we grab the results of the setup functions, we can call their stop methods to clean them up. Those should probably also be moved to start.

Actually unwinding this will probably require some changes to the event setup flow, though, so if anyone comes across this, it might be tricky.

Not the highest priority since it only occurs if you repeated create managers -- the normal "1 manager per process" model doesn't actually care about this issue.

/kind bug
/priority important-longterm

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.kind/designCategorizes issue or PR as related to design.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions