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: decorrelate_funcs.go:425: expected expression to have key -- *errutil.leafError: expected expression to have key (1) decorrelate_funcs.go:425: *withstack.withStack (top exception) *assert.withAssertionFailure (check the extra data payloads) #58105

Closed
cockroach-teamcity opened this issue Dec 20, 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/2103833249/?referrer=webhooks_plugin

Panic message:

decorrelate_funcs.go:425: expected expression to have key
--
*errutil.leafError: expected expression to have key (1)
decorrelate_funcs.go:425: *withstack.withStack (top exception)
*assert.withAssertionFailure
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

if !ok {
panic(errors.AssertionFailedf("expected expression to have key"))
}
in pkg/sql/opt/norm.(*CustomFuncs).NonKeyCols
https://github.com/cockroachdb/cockroach/blob/89dd2d14c29787378c434ed54937757ef5d9877c/pkg/sql/opt/xform/explorer.og.go#L383-L385 in pkg/sql/opt/xform.(*explorer).exploreSelect
https://github.com/cockroachdb/cockroach/blob/89dd2d14c29787378c434ed54937757ef5d9877c/pkg/sql/opt/xform/explorer.og.go#L19-L21 in pkg/sql/opt/xform.(*explorer).exploreGroupMember
if memberExplored := e.exploreGroupMember(state, member, i); memberExplored {
// No more rules can ever match this expression, so skip it in
in pkg/sql/opt/xform.(*explorer).exploreGroup
// other expressions in this group.
if o.shouldExplore(required) && !o.explorer.exploreGroup(grp).fullyExplored {
fullyOptimized = false
in pkg/sql/opt/xform.(*Optimizer).optimizeGroup
case memo.RelExpr:
state := o.optimizeGroup(t, required)
return state.cost, state.fullyOptimized
in pkg/sql/opt/xform.(*Optimizer).optimizeExpr
// Optimize the child with respect to those properties.
childCost, childOptimized := o.optimizeExpr(member.Child(i), childRequired)
in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember
// Optimize the group member with respect to the required properties.
memberOptimized := o.optimizeGroupMember(state, member, required)
in pkg/sql/opt/xform.(*Optimizer).optimizeGroup
rootProps := o.mem.RootProps()
o.optimizeGroup(root, rootProps)
in pkg/sql/opt/xform.(*Optimizer).Optimize
opc.log(ctx, "optimizing (no placeholders)")
if _, err := opc.optimizer.Optimize(); err != nil {
return nil, err
in pkg/sql.(*optPlanningCtx).buildReusableMemo
memo, err := opc.buildReusableMemo(ctx)
if err != nil {
in pkg/sql.(*planner).prepareUsingOptimizer
// future.
flags, err := p.prepareUsingOptimizer(ctx)
if err != nil {
in pkg/sql.(*connExecutor).populatePrepared
p.semaCtx.Annotations = tree.MakeAnnotations(stmt.NumAnnotations)
flags, err = ex.populatePrepared(ctx, txn, placeholderHints, p)
return err
in pkg/sql.(*connExecutor).prepare.func1
// Use the existing transaction.
if err := prepare(ctx, txn); err != nil {
return nil, err
in pkg/sql.(*connExecutor).prepare
// Prepare the query. This completes the typing of placeholders.
prepared, err := ex.prepare(ctx, stmt, placeholderHints, origin)
if err != nil {
in pkg/sql.(*connExecutor).addPreparedStmt
ps, err := ex.addPreparedStmt(
ctx,
in pkg/sql.(*connExecutor).execPrepare
stmtCtx := withStatement(ctx, ex.curStmt)
ev, payload = ex.execPrepare(stmtCtx, tcmd)
case DescribeStmt:
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(ex.Ctx()); err != nil {
if errors.IsAny(err, io.EOF, errDrainingComplete) {
in pkg/sql.(*connExecutor).run
}()
return h.ex.run(ctx, s.pool, reserved, cancel)
}
in pkg/sql.(*Server).ServeConn
reservedOwned = false // We're about to pass ownership away.
retErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)
}()
in pkg/sql/pgwire.(*conn).processCommandsAsync.func1
/usr/local/go/src/runtime/asm_amd64.s#L1356-L1358 in runtime.goexit

pkg/sql/opt/norm/decorrelate_funcs.go in pkg/sql/opt/norm.(*CustomFuncs).NonKeyCols at line 425
pkg/sql/opt/xform/explorer.og.go in pkg/sql/opt/xform.(*explorer).exploreSelect at line 384
pkg/sql/opt/xform/explorer.og.go in pkg/sql/opt/xform.(*explorer).exploreGroupMember at line 20
pkg/sql/opt/xform/explorer.go in pkg/sql/opt/xform.(*explorer).exploreGroup at line 178
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 463
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeExpr at line 250
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember at line 505
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 450
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).Optimize at line 224
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildReusableMemo at line 409
pkg/sql/plan_opt.go in pkg/sql.(*planner).prepareUsingOptimizer at line 126
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).populatePrepared at line 252
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare.func1 at line 194
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare at line 200
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).addPreparedStmt at line 120
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).execPrepare at line 66
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1551
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1391
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 508
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 626
/usr/local/go/src/runtime/asm_amd64.s in runtime.goexit at line 1357
Tag Value
Cockroach Release v20.2.3
Cockroach SHA: 89dd2d1
Platform linux amd64
Distribution CCL
Environment v20.2.3
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 20, 2020
@yuzefovich
Copy link
Member

dup of #58104

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