-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[internal/k8stest] Leaking goroutine when creating and deleting objects #31047
Comments
Pinging code owners for internal/k8stest: @crobert-1. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
More investigation:
Neither of these worked. I believe I've found the issue though, I believe this is frequency of kubernetes/kubernetes#109289. Implementing the workaround here solves the leak. |
Looks like a slightly different leak is occurring now, but only in Github. I was seeing the original goleak locally, but the current leak is only hit in GitHub CI.
The only call stacks for this trace are coming from This is still failing even though the context being passed in has a cancel func that's being called in shutdown. From what I can tell, the context's cancel is only useful in the delete call stack though, not the Update: Removing |
I realized the discovery client used by the internal k8s client also needed to use the workaround, along with close idle connections in shutdown, but this also didn't resolve the issue. It looks like the rest mapping call uses the discovery client, and its HTTP client when doing the call, but closing idle connections does not resolve the leak. It's somewhere in there though, from what I can tell. |
Also, the change that includes a context with cancel hasn't changed the resulting goleak output, so I don't believe this is necessary. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
internal/k8stest
Describe the issue you're reporting
Bug
I've attempted to add
goleak
checks to multiple k8s components, but so far all are failing on tests that useinternal/k8stest
functionality ofCreateObject
andDeleteObject
.Relevant PRs:
#30842
#30898
Investigation
k8stest.CreateObject
method.Foreground
.GracePeriod
of 0 seconds to ensure deletions happen instantly.None of my attempts have resulted in resolving the leaking goroutines.
The text was updated successfully, but these errors were encountered: