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 goroutine in memorylimiterprocessor #9099

Closed
jskiba opened this issue Dec 13, 2023 · 2 comments
Closed

Leaking goroutine in memorylimiterprocessor #9099

jskiba opened this issue Dec 13, 2023 · 2 comments
Labels
bug Something isn't working processor/memory_limiter

Comments

@jskiba
Copy link
Contributor

jskiba commented Dec 13, 2023

Describe the bug
Memorylimiter processor never leaves that loop https://github.com/open-telemetry/opentelemetry-collector/blob/1d0d1ef21baebfcc9ed1d67f0237437ceb9a0049/processor/memorylimiterprocessor/memorylimiter.go#L230C1-L230C1. In result this goroutine or many of them leak every time after shutdown procedure.

Steps to reproduce
jskiba@2f8ee15
The only leaking goroutine is the one from this bug #8945.

What did you expect to see?
No leaking goroutine and correct exit from for loop.

What did you see instead?
Goroutine

never exits. When a ticker is stopped it does not return information that it was closed, different mechanism should be used.

What version did you use?
1d0d1ef

What config did you use?
not applicable

Environment
OS: Debian 12.4 bookworm
Compiler(if manually compiled): go 1.21.5"

Additional context

@dmitryax
Copy link
Member

@jskiba thanks for reporting. Do you have a chance to help with a PR?

@jskiba
Copy link
Contributor Author

jskiba commented Dec 13, 2023

@dmitryax it's already approved #9100

bogdandrutu pushed a commit that referenced this issue Dec 21, 2023
**Description:**
Fixing a bug - described here
#9099

**Link to tracking Issue:**
#9099

**Testing:**
No tests added.
Unit tests were run

**Documentation:**
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working processor/memory_limiter
Projects
None yet
Development

No branches or pull requests

2 participants