Skip to content

Leaking goroutine in memorylimiterprocessor #9099

Closed
@jskiba

Description

@jskiba

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions