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

Collector shutdown leaks a goroutine #8945

Closed
jskiba opened this issue Nov 17, 2023 · 0 comments · Fixed by #10406
Closed

Collector shutdown leaks a goroutine #8945

jskiba opened this issue Nov 17, 2023 · 0 comments · Fixed by #10406
Labels
bug Something isn't working

Comments

@jskiba
Copy link
Contributor

jskiba commented Nov 17, 2023

Describe the bug
Otel Collector shutdown leaves a leaking goroutine
reproduced here: https://github.com/jskiba/opentelemetry-collector/blob/main/cmd/otelcorecol/main_test.go

=== RUN   TestCollector_Shutdown
    main_test.go:23: found unexpected goroutines:
        [Goroutine 19 in state select, with go.opencensus.io/stats/view.(*worker).start on top of the stack:
        go.opencensus.io/stats/view.(*worker).start(0xc0001d3400)
        	/Users/jakub.skiba/go/pkg/mod/go.opencensus.io@v0.24.0/stats/view/worker.go:292 +0x9f
        created by go.opencensus.io/stats/view.init.0 in goroutine 1
        	/Users/jakub.skiba/go/pkg/mod/go.opencensus.io@v0.24.0/stats/view/worker.go:34 +0x8d
        ]
--- FAIL: TestCollector_Shutdown (0.44s)

I haven't investigated that but opencensus seems to be archived so if it is not a bug in otel collector then it might be problematic.

Steps to reproduce
https://github.com/jskiba/opentelemetry-collector/blob/main/cmd/otelcorecol/main_test.go

What did you expect to see?
No leaking goroutines

What did you see instead?
Leaking goroutine

What version did you use?
Version: abdeacb

What config did you use?
Config: nono
It reproduces every time. The config does not matter here.

Environment
OS: macOS Sonoma 14.1.1
Compiler: go 1.21.1

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

Successfully merging a pull request may close this issue.

1 participant