Skip to content
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

Leaking cancel contexts. #16

Open
urso opened this issue Aug 6, 2020 · 3 comments
Open

Leaking cancel contexts. #16

urso opened this issue Aug 6, 2020 · 3 comments
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team v7.11.0

Comments

@urso
Copy link

urso commented Aug 6, 2020

The client uses WithContext to create a context for signaling shutdown to sub go-routines. This seems to make the context leak when the workers return without cancelling the context. The cancel function must be run always.

It seams the context that is generated on 'Start' is leaked at least if the Dial fails. The workaround is to call Stop always. There or other contexts that are generated via WithCancel, that look suspiciously like leaks, but I didn't check if that is the case.

@urso urso added the bug Something isn't working label Aug 6, 2020
@ph ph assigned blakerouse and michalpristas and unassigned blakerouse Aug 17, 2020
@ph
Copy link
Contributor

ph commented Nov 6, 2020

@blakerouse @michalpristas we probably have a leak?

@michalpristas
Copy link
Contributor

oh this one's sitting here for a while. we can plan it for this release, seems like easy fix
wdyt @ph

@ph ph assigned michalpristas and unassigned michalpristas Nov 6, 2020
@michalpristas michalpristas added the Team:Elastic-Agent Label for the Agent team label Nov 6, 2020
@ph ph added the v7.11.0 label Nov 6, 2020
@ph
Copy link
Contributor

ph commented Nov 6, 2020

I will mark it for 7.11, the fix is easy but there are multiple PR involved.

v1v pushed a commit to v1v/elastic-agent-client that referenced this issue Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team v7.11.0
Projects
None yet
Development

No branches or pull requests

4 participants