cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.18k stars 3.82k forks source link

Sentry: panic.go:770: runtime error: index out of range [0] with length 0 (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:770 | runtime.goPanicIndex ... #136186

Open cockroach-sentry opened 13 hours ago

cockroach-sentry commented 13 hours ago

This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.

Sentry Link: https://cockroach-labs.sentry.io/issues/6090945329/?referrer=webhooks_plugin

Panic Message:

panic.go:770: runtime error: index out of range [0] with length 0
(1) attached stack trace
  -- stack trace:
  | runtime.gopanic
  |     GOROOT/src/runtime/panic.go:770
  | runtime.goPanicIndex
  |     GOROOT/src/runtime/panic.go:114
  | github.com/prometheus/client_golang/prometheus.(*histogram).Write
  |     github.com/prometheus/client_golang/prometheus/external/com_github_prometheus_client_golang/prometheus/histogram.go:754
  | github.com/cockroachdb/cockroach/pkg/util/metric.(*Histogram).WindowedSnapshot
  |     github.com/cockroachdb/cockroach/pkg/util/metric/pkg/util/metric/metric.go:457
  | github.com/cockroachdb/cockroach/pkg/server/status.extractValue
  |     github.com/cockroachdb/cockroach/pkg/server/status/recorder.go:703
  | github.com/cockroachdb/cockroach/pkg/server/status.(*MetricsRecorder).GenerateNodeStatus.eachRecordableValue.func6
  |     github.com/cockroachdb/cockroach/pkg/server/status/recorder.go:733
  | github.com/cockroachdb/cockroach/pkg/util/metric.(*Registry).Each.func1
  |     github.com/cockroachdb/cockroach/pkg/util/metric/pkg/util/metric/registry.go:196
  | github.com/cockroachdb/cockroach/pkg/util/metric.(*Histogram).Inspect
  |     github.com/cockroachdb/cockroach/pkg/util/metric/pkg/util/metric/metric.go:478
  | github.com/cockroachdb/cockroach/pkg/util/metric.(*Registry).Each
  |     github.com/cockroachdb/cockroach/pkg/util/metric/pkg/util/metric/registry.go:195
  | github.com/cockroachdb/cockroach/pkg/server/status.eachRecordableValue
  |     github.com/cockroachdb/cockroach/pkg/server/status/recorder.go:732
  | github.com/cockroachdb/cockroach/pkg/server/status.(*MetricsRecorder).GenerateNodeStatus
  |     github.com/cockroachdb/cockroach/pkg/server/status/recorder.go:579
  | github.com/cockroachdb/cockroach/pkg/server.(*Node).writeNodeStatus.func1
  |     github.com/cockroachdb/cockroach/pkg/server/node.go:1373
  | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTask
  |     github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:320
  | github.com/cockroachdb/cockroach/pkg/server.(*Node).writeNodeStatus
  |     github.com/cockroachdb/cockroach/pkg/server/node.go:1372
  | github.com/cockroachdb/cockroach/pkg/server.(*Node).startWriteNodeStatus.func2
  |     github.com/cockroachdb/cockroach/pkg/server/node.go:1353
  | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
  |     github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:485
  | runtime.goexit
  |     src/runtime/asm_amd64.s:1695
Wraps: (2) runtime error: index out of range [0] with length 0
Error types: (1) *withstack.withStack (2) runtime.boundsError
-- report composition:
runtime.boundsError
panic.go:770: *withstack.withStack (top exception)
Stacktrace (expand for inline code snippets): [src/runtime/asm_amd64.s#L1694-L1696](src/runtime/asm_amd64.s#L1694-L1696) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/stop/stopper.go#L484-L486](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/stop/stopper.go#L484-L486) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1352-L1354](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1352-L1354) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1371-L1373](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1371-L1373) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/stop/stopper.go#L319-L321](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/stop/stopper.go#L319-L321) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1372-L1374](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/node.go#L1372-L1374) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L578-L580](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L578-L580) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L731-L733](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L731-L733) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/registry.go#L194-L196](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/registry.go#L194-L196) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/metric.go#L477-L479](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/metric.go#L477-L479) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/registry.go#L195-L197](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/registry.go#L195-L197) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L732-L734](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L732-L734) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L702-L704](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/server/status/recorder.go#L702-L704) [https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/metric.go#L456-L458](https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/pkg/util/metric/pkg/util/metric/metric.go#L456-L458) [github.com/prometheus/client_golang/prometheus/external/com_github_prometheus_client_golang/prometheus/histogram.go#L753-L755](github.com/prometheus/client_golang/prometheus/external/com_github_prometheus_client_golang/prometheus/histogram.go#L753-L755) [GOROOT/src/runtime/panic.go#L113-L115](GOROOT/src/runtime/panic.go#L113-L115) [GOROOT/src/runtime/panic.go#L769-L771](GOROOT/src/runtime/panic.go#L769-L771)
src/runtime/asm_amd64.s in runtime.goexit at line 1695
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 485
pkg/server/node.go in pkg/server.(*Node).startWriteNodeStatus.func2 at line 1353
pkg/server/node.go in pkg/server.(*Node).writeNodeStatus at line 1372
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunTask at line 320
pkg/server/node.go in pkg/server.(*Node).writeNodeStatus.func1 at line 1373
pkg/server/status/recorder.go in pkg/server/status.(*MetricsRecorder).GenerateNodeStatus at line 579
pkg/server/status/recorder.go in pkg/server/status.eachRecordableValue at line 732
pkg/util/metric/pkg/util/metric/registry.go in pkg/util/metric.(*Registry).Each at line 195
pkg/util/metric/pkg/util/metric/metric.go in pkg/util/metric.(*Histogram).Inspect at line 478
pkg/util/metric/pkg/util/metric/registry.go in pkg/util/metric.(*Registry).Each.func1 at line 196
pkg/server/status/recorder.go in pkg/server/status.(*MetricsRecorder).GenerateNodeStatus.eachRecordableValue.func6 at line 733
pkg/server/status/recorder.go in pkg/server/status.extractValue at line 703
pkg/util/metric/pkg/util/metric/metric.go in pkg/util/metric.(*Histogram).WindowedSnapshot at line 457
github.com/prometheus/client_golang/prometheus/external/com_github_prometheus_client_golang/prometheus/histogram.go in github.com/prometheus/client_golang/prometheus.(*histogram).Write at line 754
GOROOT/src/runtime/panic.go in runtime.goPanicIndex at line 114
GOROOT/src/runtime/panic.go in runtime.gopanic at line 770

Tags

Tag Value
Command start-single-node
Environment v24.2.4
Go Version go1.22.5 X:nocoverageredesign
Platform linux amd64
Distribution CCL
Cockroach Release v24.2.4
Cockroach SHA 8140b8e294fb16a293d0aae662bcf5c1d488c852
# of CPUs 20
# of Goroutines 569

Jira issue: CRDB-44907

blathers-crl[bot] commented 13 hours ago

CC'ing via the CODEOWNERS-based sentry heuristic:

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.