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

Memory leak of spans with grpc server stats handler #6446

Open
atoulme opened this issue Dec 13, 2024 · 2 comments
Open

Memory leak of spans with grpc server stats handler #6446

atoulme opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
area: instrumentation Related to an instrumentation package bug Something isn't working instrumentation: otelgrpc

Comments

@atoulme
Copy link

atoulme commented Dec 13, 2024

Description

See open-telemetry/opentelemetry-collector#11875 for original filing.

The gRPC server stats handler set by the OTLP receiver exposes a leak of spans over a long period of time.

From review of the code, it is possible the spans are not always closed by the stats_handler.go.

The span.End() call is made upon receiving the *stats.End event:

It seems in light of the leak, given the pprof dumps provided in the original report, that the event is not always received.

@dmathieu
Copy link
Member

cc @dashpole as code owner.

@dashpole dashpole changed the title Memory leak of spans with grpc server interceptor Memory leak of spans with grpc server stats handler Dec 13, 2024
@dashpole
Copy link
Contributor

Updated the title and description. Looks like you are using the stats handler, rather than the interceptor.

@dashpole dashpole self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: instrumentation Related to an instrumentation package bug Something isn't working instrumentation: otelgrpc
Projects
None yet
Development

No branches or pull requests

3 participants