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

Goleaks while using opentelemetry #744

Closed
glazychev-art opened this issue Mar 1, 2021 · 3 comments
Closed

Goleaks while using opentelemetry #744

glazychev-art opened this issue Mar 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@glazychev-art
Copy link
Contributor

Description

If we start opentelemetry instead of opentracing, there will be goleaks in sandbox tests.

The problem occurs if there is refresh request in test. It was found that there are goleaks after MonitorConnections calls from the first nsc.Requst(). It may also be related to incorrect opentelemetry.StreamClientInterceptor behavior.

Logs

=== RUN   TestNSMGR_LocalUsecase
    leaks.go:78: found unexpected goroutines:
        [Goroutine 174 in state chan receive, with go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.wrapClientStream.func1 on top of the stack:
        goroutine 174 [chan receive]:
        go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.wrapClientStream.func1(0xc00069e960, 0xc00069e900, 0xc00069e9c0)
        	/home/art/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.17.1-0.20210222002102-f011c951891d/interceptor.go:214 +0xb7
        created by go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.wrapClientStream
        	/home/art/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.17.1-0.20210222002102-f011c951891d/interceptor.go:208 +0xc9
        
         Goroutine 175 in state chan receive, with go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.StreamClientInterceptor.func1.1 on top of the stack:
        goroutine 175 [chan receive]:
        go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.StreamClientInterceptor.func1.1(0xc00042bd00, 0x15163e0, 0x1b21fa8)
        	/home/art/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.17.1-0.20210222002102-f011c951891d/interceptor.go:290 +0x85
        created by go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.StreamClientInterceptor.func1
        	/home/art/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.17.1-0.20210222002102-f011c951891d/interceptor.go:289 +0xac6

Steps to reproduce

  1. Enable opentelemetry
  2. Run sandbox test, where refresh request is simulated (ex. TestNSMGR_LocalUsecase)
  3. Goleaks
@glazychev-art
Copy link
Contributor Author

opentelemetry support - #628

@denis-tingaikin denis-tingaikin added the bug Something isn't working label Mar 1, 2021
@glazychev-art
Copy link
Contributor Author

Created an issue for opentelemtry: open-telemetry/opentelemetry-go-contrib#839

@glazychev-art
Copy link
Contributor Author

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

No branches or pull requests

2 participants