Skip to content

Test that we don't leak goroutines on start and stop #724

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

Closed
DirectXMan12 opened this issue Dec 10, 2019 · 6 comments
Closed

Test that we don't leak goroutines on start and stop #724

DirectXMan12 opened this issue Dec 10, 2019 · 6 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@DirectXMan12
Copy link
Contributor

We should have tests for simple operations that make sure they don't leak goroutines. Namely, manager.Start & stop and controller.New, both of which leaked in the past.

We can use the runtime package to get the goroutine count.

/good-first-issue

@k8s-ci-robot
Copy link
Contributor

@DirectXMan12:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

We should have tests for simple operations that make sure they don't leak goroutines. Namely, manager.Start & stop and controller.New, both of which leaked in the past.

We can use the runtime package to get the goroutine count.

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Dec 10, 2019
@knabben
Copy link
Member

knabben commented Dec 11, 2019

Any ideas on how to filter only the goroutines from manager/controller?

Using the NumGoroutines directly in the test case returns all (including from test suite, its around ~43), do makes sense to iterate on this list and extract by file path maybe?

@alvaroaleman
Copy link
Member

Any ideas on how to filter only the goroutines from manager/controller?

Maybe by counting them before starting & stopping the manager or a controller, then checking if the count is back at where it was initially?

@hypnoglow
Copy link
Contributor

Is there anything else to be done here? The PR is merged so I believe the issue can be closed.

@vincepri
Copy link
Member

Closing given that #738 has been merged

/close

@k8s-ci-robot
Copy link
Contributor

@vincepri: Closing this issue.

In response to this:

Closing given that #738 has been merged

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

6 participants