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

Panic on close of closed channel #2094

Closed
jpkrohling opened this issue Feb 27, 2020 · 1 comment · Fixed by #2096
Closed

Panic on close of closed channel #2094

jpkrohling opened this issue Feb 27, 2020 · 1 comment · Fixed by #2096
Assignees
Labels

Comments

@jpkrohling
Copy link
Contributor

The following happens when stopping the all-in-one when badger is being used as storage, probably related to #2076:

$ SPAN_STORAGE_TYPE=badger go run -tags ui ./cmd/all-in-one 
...
^C{"level":"info","ts":1582817948.1366558,"caller":"flags/service.go:145","msg":"Shutting down"}
{"level":"info","ts":1582817948.1367006,"caller":"healthcheck/handler.go:128","msg":"Health Check state change","status":"unavailable"}
{"level":"info","ts":1582817948.136725,"caller":"app/agent.go:89","msg":"shutting down agent's HTTP server","addr":"[::]:5778"}
{"level":"info","ts":1582817948.136871,"caller":"app/agent.go:73","msg":"agent's http server exiting"}
{"level":"info","ts":1582817948.1374054,"caller":"healthcheck/handler.go:128","msg":"Health Check state change","status":"unavailable"}
panic: close of closed channel

goroutine 1 [running]:
github.com/jaegertracing/jaeger/plugin/storage/badger.(*Factory).Close(0xc0001a0180, 0x1df6d01, 0x7f6ba409f120)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/plugin/storage/badger/factory.go:167 +0x33
github.com/jaegertracing/jaeger/plugin/storage/badger/spanstore.(*SpanWriter).Close(0xc0003b5a40, 0x1df49a0, 0xc0003b5a40)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/plugin/storage/badger/spanstore/writer.go:197 +0x34
main.main.func1.1()
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/cmd/all-in-one/main.go:156 +0x123
github.com/jaegertracing/jaeger/cmd/flags.(*Service).RunAndThen(0xc00005a980, 0xc0003219a0)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/cmd/flags/service.go:149 +0x1f6
main.main.func1(0xc000458240, 0x2995420, 0x0, 0x0, 0x0, 0x0)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/cmd/all-in-one/main.go:150 +0x1627
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).execute(0xc000458240, 0xc00003c1d0, 0x0, 0x0, 0xc000458240, 0xc00003c1d0)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:698 +0x42c
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000458240, 0xc000458240, 0xc000215eb8, 0x9)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:783 +0x2c9
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).Execute(...)
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:736
main.main()
	/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger/cmd/all-in-one/main.go:185 +0x6f7
exit status 2
@jpkrohling jpkrohling added bug area/storage storage/badger Issues related to badger storage labels Feb 27, 2020
@ghost ghost added the needs-triage label Feb 27, 2020
@jpkrohling jpkrohling self-assigned this Feb 27, 2020
@jpkrohling jpkrohling removed storage/badger Issues related to badger storage area/storage labels Feb 27, 2020
@jpkrohling
Copy link
Contributor Author

Turns out, this is not specific to badger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant