-
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
[processor/k8sattributesprocessor] Fix memory leak #30842
Conversation
Investigating e2e test failure - I believe it is an existing failure, unrelated to my changes, but it needs to be resolved before merging. |
From debugging locally it looks like this is an issue within the
How do we get to newClientConn?
How do we get to addConnIfNeeded?
How do we get to queueForDial?
|
I'm going to close for now until I have more time to investigate. |
Description:
This PR contains 3 main changes:
Start
instead ofNew
. This should allow proper behavior. This also means thatStart
should always be called on the kube client, rather than simply whenpassthroughMode: false
, as theStart
method now internally accounts forpassthroughMode
. I've filed [processor/k8sattributesprocessor] Leaking goroutine caused by invalid kube client init #30841 to discuss this bug and potential solution.shutdown
method to the mutlitest object, and call it in many places. This was the source of many leaks as the log, metric, and trace processors were being started but never shutdown.k8sattributeprocessor
.Link to tracking Issue:
#30438
Fixes #30841
Testing:
Existing tests are all passing, added goleak checks are now passing as well.