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

server: stopper.Stop called twice #32148

Closed
tbg opened this issue Nov 4, 2018 · 3 comments
Closed

server: stopper.Stop called twice #32148

tbg opened this issue Nov 4, 2018 · 3 comments
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report.

Comments

@tbg
Copy link
Member

tbg commented Nov 4, 2018

https://sentry.io/cockroach-labs/cockroachdb/issues/752391374/

stopper.go:179: runtime.plainError: close of closed channel

github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Stop

stacktrace: {u'frames': [{u'function': u'func1', u'abs_path': u'/go/src/github.com/cockroachdb/cockroach/pkg/server/admin.go', u'module': u'github.com/cockroachdb/cockroach/pkg/server.(*adminServer).Drain', u'filename': u'github.com/cockroachdb/cockroach/pkg/server/admin.go', u'lineno': 1261, u'in_app': True}, {u'function': u'Stop', u'abs_path': u'/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go', u'module': u'github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper)', u'filename': u'github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go', u'lineno': 478, u'in_app': True}, {u'function': u'closechan', u'abs_path': u'/usr/local/go/src/runtime/chan.go', u'module': u'runtime', u'filename': u'runtime/chan.go', u'lineno': 333, u'in_app': False}, {u'function': u'gopanic', u'abs_path': u'/usr/local/go/src/runtime/panic.go', u'module': u'runtime', u'filename': u'runtime/panic.go', u'lineno': 505, u'in_app': False}, {u'function': u'call32', u'abs_path': u'/usr/local/go/src/runtime/asm_amd64.s', u'module': u'runtime', u'filename': u'runtime/asm_amd64.s', u'lineno': 573, u'in_app': False}]}
type: *log.safeError
value: stopper.go:179: runtime.plainError: close of closed channel

@tbg tbg added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report. labels Nov 4, 2018
@jordanlewis
Copy link
Member

2.0.6, read of closed channel in admin.go.

@tbg
Copy link
Member Author

tbg commented Nov 12, 2018

The stopper has no protection against multiple racing calls to Stop, yet that's what can happen.

This is in the same code as #31692, so I'll fix it there.

@tbg tbg changed the title sentry: stopper.go:179: runtime.plainError: close of closed channel server: stopper.Stop called twice Nov 12, 2018
@knz
Copy link
Contributor

knz commented May 8, 2020

fixed in #37668

@knz knz closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report.
Projects
None yet
Development

No branches or pull requests

3 participants