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

sentry: conn_executor.go:506: panic with explain and needed column family ids in a constraint span #57678

Closed
cockroach-teamcity opened this issue Dec 7, 2020 · 1 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.

Comments

@cockroach-teamcity
Copy link
Member

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

Sentry link: https://sentry.io/organizations/cockroach-labs/issues/2077932958/?referrer=webhooks_plugin

Panic message:

conn_executor.go:506: panic: ×
--
*errutil.leafError: panic: × (1)
conn_executor.go:506: *withstack.withStack (top exception)
*safedetails.withSafeDetails: while executing: SELECT ., format_type(., .), pg_get_expr(., .), ., ., ., ., col_description(., .) AS _ FROM _ AS _ LEFT JOIN _ AS _ ON (. = .) AND (. = .) LEFT JOIN _ AS _ ON . = . LEFT JOIN _ AS _ ON (. = .) AND (. != .) WHERE ((. = ::REGCLASS) AND (._ > _)) AND (NOT .) ORDER BY . (2)
conn_executor.go:506: *withstack.withStack (3)
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

r := recover()
h.ex.closeWrapper(ctx, r)
}()
in pkg/sql.(*Server).ServeConn.func1
/usr/local/go/src/runtime/panic.go#L678-L680 in runtime.gopanic
if family0 == nil {
panic("column family 0 not found")
}
in pkg/sql/rowenc.NeededColumnFamilyIDs
if !forDelete && needed.Len() > 0 && span.Key.Equal(span.EndKey) {
neededFamilyIDs := rowenc.NeededColumnFamilyIDs(needed, s.table, s.index)
if s.CanSplitSpanIntoSeparateFamilies(len(neededFamilyIDs), cs.StartKey().Length(), containsNull) {
in pkg/sql/span.(*Builder).appendSpansFromConstraintSpan
for i := 0; i < c.Spans.Count(); i++ {
spans, err = s.appendSpansFromConstraintSpan(spans, c.Spans.Get(i), needed, forDelete)
if err != nil {
in pkg/sql/span.(*Builder).SpansFromConstraint
}
return sb.SpansFromConstraint(params.IndexConstraint, params.NeededCols, false /* forDelete */)
}
in pkg/sql.generateScanSpans
}
spans, err := generateScanSpans(codec, tabDesc, idxDesc, scanParams)
if err != nil {
in pkg/sql.emitExplain.func1
if e.ob.flags.Verbose {
return e.spanFormatFn(table, index, scanParams)
}
in pkg/sql/opt/exec/explain.(*emitter).spansStr
) {
e.ob.Attr(field, e.spansStr(table, index, scanParams))
}
in pkg/sql/opt/exec/explain.(*emitter).emitSpans
if !(a.Table.IsVirtualTable() && a.Params.IndexConstraint == nil) {
e.emitSpans("spans", a.Table, a.Index, a.Params)
}
in pkg/sql/opt/exec/explain.(*emitter).emitNodeAttributes
ob.EnterNode(name, columns, ordering)
if err := e.emitNodeAttributes(n); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
for _, c := range n.children {
if err := walk(c); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1
if len(plan.Subqueries) == 0 && len(plan.Cascades) == 0 && len(plan.Checks) == 0 {
return walk(plan.Root)
}
in pkg/sql/opt/exec/explain.Emit
return explain.Emit(explainPlan, ob, spanFormatFn)
}
in pkg/sql.emitExplain

cockroach/pkg/sql/plan.go

Lines 469 to 471 in 150c591

})
if err := emitExplain(ob, p.codec, p.explainPlan, distribution, vectorized); err != nil {
p.planString = fmt.Sprintf("error emitting plan: %v", err)
in pkg/sql.(*planTop).savePlanInfo

cockroach/pkg/sql/plan.go

Lines 438 to 440 in 150c591

if p.explainPlan != nil && p.flags.IsSet(planFlagExecDone) {
p.savePlanInfo(ctx)
}
in pkg/sql.(*planTop).close
/usr/local/go/src/runtime/panic.go#L678-L680 in runtime.gopanic
if family0 == nil {
panic("column family 0 not found")
}
in pkg/sql/rowenc.NeededColumnFamilyIDs
if !forDelete && needed.Len() > 0 && span.Key.Equal(span.EndKey) {
neededFamilyIDs := rowenc.NeededColumnFamilyIDs(needed, s.table, s.index)
if s.CanSplitSpanIntoSeparateFamilies(len(neededFamilyIDs), cs.StartKey().Length(), containsNull) {
in pkg/sql/span.(*Builder).appendSpansFromConstraintSpan
for i := 0; i < c.Spans.Count(); i++ {
spans, err = s.appendSpansFromConstraintSpan(spans, c.Spans.Get(i), needed, forDelete)
if err != nil {
in pkg/sql/span.(*Builder).SpansFromConstraint
}
return sb.SpansFromConstraint(params.IndexConstraint, params.NeededCols, false /* forDelete */)
}
in pkg/sql.generateScanSpans
}
spans, err := generateScanSpans(codec, tabDesc, idxDesc, scanParams)
if err != nil {
in pkg/sql.emitExplain.func1
if e.ob.flags.Verbose {
return e.spanFormatFn(table, index, scanParams)
}
in pkg/sql/opt/exec/explain.(*emitter).spansStr
) {
e.ob.Attr(field, e.spansStr(table, index, scanParams))
}
in pkg/sql/opt/exec/explain.(*emitter).emitSpans
if !(a.Table.IsVirtualTable() && a.Params.IndexConstraint == nil) {
e.emitSpans("spans", a.Table, a.Index, a.Params)
}
in pkg/sql/opt/exec/explain.(*emitter).emitNodeAttributes
ob.EnterNode(name, columns, ordering)
if err := e.emitNodeAttributes(n); err != nil {
return err
in pkg/sql/opt/exec/explain.Emit.func1

pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn.func1 at line 506
/usr/local/go/src/runtime/panic.go in runtime.gopanic at line 679
pkg/sql/rowenc/index_encoding.go in pkg/sql/rowenc.NeededColumnFamilyIDs at line 362
pkg/sql/span/span_builder.go in pkg/sql/span.(*Builder).appendSpansFromConstraintSpan at line 265
pkg/sql/span/span_builder.go in pkg/sql/span.(*Builder).SpansFromConstraint at line 218
pkg/sql/opt_exec_factory.go in pkg/sql.generateScanSpans at line 140
pkg/sql/explain_plan.go in pkg/sql.emitExplain.func1 at line 83
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).spansStr at line 728
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).emitSpans at line 715
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).emitNodeAttributes at line 359
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 49
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 53
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit at line 62
pkg/sql/explain_plan.go in pkg/sql.emitExplain at line 102
pkg/sql/plan.go in pkg/sql.(*planTop).savePlanInfo at line 470
pkg/sql/plan.go in pkg/sql.(*planTop).close at line 439
/usr/local/go/src/runtime/panic.go in runtime.gopanic at line 679
pkg/sql/rowenc/index_encoding.go in pkg/sql/rowenc.NeededColumnFamilyIDs at line 362
pkg/sql/span/span_builder.go in pkg/sql/span.(*Builder).appendSpansFromConstraintSpan at line 265
pkg/sql/span/span_builder.go in pkg/sql/span.(*Builder).SpansFromConstraint at line 218
pkg/sql/opt_exec_factory.go in pkg/sql.generateScanSpans at line 140
pkg/sql/explain_plan.go in pkg/sql.emitExplain.func1 at line 83
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).spansStr at line 728
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).emitSpans at line 715
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.(*emitter).emitNodeAttributes at line 359
pkg/sql/opt/exec/explain/emit.go in pkg/sql/opt/exec/explain.Emit.func1 at line 49
Tag Value
Cockroach Release v20.2.0
Cockroach SHA: 150c591
Platform linux amd64
Distribution CCL
Environment v20.2.0
Command server
Go Version ``
# of CPUs
# of Goroutines
@cockroach-teamcity cockroach-teamcity 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 Dec 7, 2020
@jordanlewis jordanlewis changed the title sentry: conn_executor.go:506: panic: × -- *errutil.leafError: panic: × (1) conn_executor.go:506: *withstack.withStack (top exception) *safedetails.withSafeDetails: while executing: SELECT _._, format_type(_._, _._), pg_get_expr(_._, _._), _._, _._, _._, _._, col_description(_._, _._) AS _ FROM _ AS _ LEFT JOIN _ AS _ ON (_._ = _._) AND (_._ = _._) LEFT JOIN _ AS _ ON _._ = _._ LEFT JOIN _ AS _ ON (_._ = _._) AND (_._ != _._) WHERE ((_._ = _::REGCLASS) AND (_._ > _)) AND (NOT _._) ORDER BY _._ (2) conn_executor.go:506: *withstack.withStack (3) (check the extra data payloads) sentry: conn_executor.go:506: panic with explain and needed column family ids in a constraint span Dec 7, 2020
@RaduBerinde
Copy link
Member

The panic is column family 0 not found. This is the same with #58208.

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

2 participants