-
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
[Bug]: Goroutine leak in plugin/storage/es/ #5083
Comments
I'll look into it |
i think, this error could be because of Elasticsearch client is not properly closed at some parts of code in plugin/storage/es/factory_test.go The |
@akagami-harsh where do you see specific places where Close is not called? |
One possible approach is to switch the tests to use this constructor from
It does not start any bg routines so would be more suitable for tests, but it will also introduce an extra complexity (e.g. in |
in but the test passes without calling |
Yes, there should be f.Close there, but since it's using mock client it shouldn't affect anything (still worth adding close) |
## Which problem is this PR solving? - Part of #5083 ## Description of the changes - Add goleak checks to individual tests suspected of causing the leaks, this might help confirming which ones are at fault, since the main VerifyGoLeak check cannot distinguish between tests in the package. ## How was this change tested? ``` $ go test -count 100 ./plugin/storage/es ok github.com/jaegertracing/jaeger/plugin/storage/es 8.246s ``` --------- Signed-off-by: Yuri Shkuro <github@ysh.us>
## Which problem is this PR solving? - Part of #5083 ## Description of the changes - Added f.close() in TestArhiveEnabled based on #5083 (comment) ## How was this change tested? - CI workflow ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com> Signed-off-by: Yuri Shkuro <github@ysh.us> Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Co-authored-by: Yuri Shkuro <github@ysh.us>
This issue is still unresolved. |
Most likely the same issue as #4743 |
What happened?
Unrelated PR failed with goleak:
Steps to reproduce
Unknown, this appears to be a spurious condition when ES clients are not being stopped properly (they kick off a bg healthcheck go routine). It's possible that there is a race condition between starting and stopping the client, since we already spent time fixing these go leaks.
Expected behavior
No go leaks in the package.
The text was updated successfully, but these errors were encountered: