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.16k stars 3.82k forks source link

sql: v24.3.0-alpha: nil pointer in populateStmtInsights #131057

Open cockroach-sentry opened 2 months ago

cockroach-sentry commented 2 months 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/5876187538/?referrer=webhooks_plugin

Panic Message:

panic.go:770: runtime error: invalid memory address or nil pointer dereference
(1) attached stack trace
  -- stack trace:
  | runtime.gopanic
  |     GOROOT/src/runtime/panic.go:770
  | runtime.panicmem
  |     GOROOT/src/runtime/panic.go:261
  | runtime.sigpanic
  |     GOROOT/src/runtime/signal_unix.go:881
  | github.com/cockroachdb/cockroach/pkg/sql.populateStmtInsights
  |     github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:8495
  | github.com/cockroachdb/cockroach/pkg/sql.init.func737
  |     github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:8445
  | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
  |     github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:661
  | github.com/cockroachdb/cockroach/pkg/sql.setupGenerator.func3
  |     github.com/cockroachdb/cockroach/pkg/sql/virtual_table.go:127
  | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
  |     github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:484
  | runtime.goexit
  |     src/runtime/asm_arm64.s:1222
Wraps: (2) runtime error: invalid memory address or nil pointer dereference
Error types: (1) *withstack.withStack (2) runtime.errorString
-- report composition:
runtime.errorString
panic.go:770: *withstack.withStack (top exception)
Stacktrace (expand for inline code snippets): [src/runtime/asm_arm64.s#L1221-L1223](src/runtime/asm_arm64.s#L1221-L1223) [https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/util/stop/stopper.go#L483-L485](https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/util/stop/stopper.go#L483-L485) [https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/virtual_table.go#L126-L128](https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/virtual_table.go#L126-L128) [https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/virtual_schema.go#L660-L662](https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/virtual_schema.go#L660-L662) [https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/crdb_internal.go#L8444-L8446](https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/crdb_internal.go#L8444-L8446) [https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/crdb_internal.go#L8494-L8496](https://github.com/cockroachdb/cockroach/blob/67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867/pkg/sql/crdb_internal.go#L8494-L8496) [GOROOT/src/runtime/signal_unix.go#L880-L882](GOROOT/src/runtime/signal_unix.go#L880-L882) [GOROOT/src/runtime/panic.go#L260-L262](GOROOT/src/runtime/panic.go#L260-L262) [GOROOT/src/runtime/panic.go#L769-L771](GOROOT/src/runtime/panic.go#L769-L771)
src/runtime/asm_arm64.s in runtime.goexit at line 1222
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 484
pkg/sql/virtual_table.go in pkg/sql.setupGenerator.func3 at line 127
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 at line 661
pkg/sql/crdb_internal.go in pkg/sql.init.func737 at line 8445
pkg/sql/crdb_internal.go in pkg/sql.populateStmtInsights at line 8495
GOROOT/src/runtime/signal_unix.go in runtime.sigpanic at line 881
GOROOT/src/runtime/panic.go in runtime.panicmem at line 261
GOROOT/src/runtime/panic.go in runtime.gopanic at line 770

Tags

Tag Value
Command server
Environment development
Go Version go1.22.5 X:nocoverageredesign
Platform linux arm64
Distribution CCL
Cockroach Release v24.3.0-alpha.00000000-dev-67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867
Cockroach SHA 67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867
# of CPUs 32
# of Goroutines 4051

Jira issue: CRDB-42348

blathers-crl[bot] commented 2 months ago

Hi @cockroach-sentry, please add branch-* labels to identify which branch(es) this C-bug affects.

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