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: datum.go:3946: expected *DArray, found tree.dNull -- *errutil.leafError: expected *DArray, found tree.dNull (1) datum.go:3946: *withstack.withStack (top exception) *assert.withAssertionFailure (check the extra data payloads) #77957

Closed
cockroach-teamcity opened this issue Mar 16, 2022 · 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

cockroach-teamcity commented Mar 16, 2022

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/3107866421/?referrer=webhooks_plugin

Panic message:

datum.go:3946: expected *DArray, found tree.dNull
--
*errutil.leafError: expected *DArray, found tree.dNull (1)
datum.go:3946: *withstack.withStack (top exception)
*assert.withAssertionFailure
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

if !ok {
panic(errors.AssertionFailedf("expected *DArray, found %T", e))
}
in pkg/sql/sem/tree.MustBeDArray
Fn: func(ctx *EvalContext, left Datum, right Datum) (Datum, error) {
needles := MustBeDArray(left)
haystack := MustBeDArray(right)
in pkg/sql/sem/tree.glob..func138
result, err := o.Fn(c.f.evalCtx, lDatum, rDatum)
if err != nil {
in pkg/sql/opt/norm.(*CustomFuncs).FoldComparison
https://github.com/cockroachdb/cockroach/blob/c7cfac57476f06e3154b2fc38e77982a8bbc64c2/pkg/sql/opt/norm/factory.og.go#L16765-L16767 in pkg/sql/opt/norm.(*Factory).ConstructContainedBy
https://github.com/cockroachdb/cockroach/blob/c7cfac57476f06e3154b2fc38e77982a8bbc64c2/pkg/sql/opt/norm/factory.og.go#L22243-L22245 in pkg/sql/opt/norm.(*Factory).Replace
}
return c.f.Replace(e, replace)
}
in pkg/sql/opt/norm.(*CustomFuncs).inlineConstants.func1
}
return replace(e)
}
in pkg/sql/opt/norm.(*CustomFuncs).inlineConstants
newProjections[i] = c.f.ConstructProjectionsItem(
c.inlineConstants(item.Element, input, constCols).(opt.ScalarExpr),
item.Col,
in pkg/sql/opt/norm.(*CustomFuncs).InlineProjectionConstants
https://github.com/cockroachdb/cockroach/blob/c7cfac57476f06e3154b2fc38e77982a8bbc64c2/pkg/sql/opt/norm/factory.og.go#L1348-L1350 in pkg/sql/opt/norm.(*Factory).ConstructProject
return b.factory.ConstructProject(input, projections, passthrough)
}
in pkg/sql/opt/optbuilder.(*Builder).constructProject
} else {
projectionsScope.expr = b.constructProject(
inScope.expr.(memo.RelExpr),
in pkg/sql/opt/optbuilder.(*Builder).constructProjectForScope
mb.b.constructProjectForScope(mb.outScope, projectionsScope)
mb.outScope = projectionsScope
in pkg/sql/opt/optbuilder.(*mutationBuilder).addCheckConstraintCols
// Add any check constraint boolean columns to the input.
mb.addCheckConstraintCols(false /* isUpdate */)
in pkg/sql/opt/optbuilder.(*mutationBuilder).buildInsert
// Build the final insert statement, including any returned expressions.
mb.buildInsert(returning)
in pkg/sql/opt/optbuilder.(*Builder).buildInsert
return b.processWiths(stmt.With, inScope, func(inScope *scope) *scope {
return b.buildInsert(stmt, inScope)
})
in pkg/sql/opt/optbuilder.(*Builder).buildStmt.func2
inScope.atRoot = false
outScope := buildStmt(inScope)
outScope.expr = b.buildWiths(outScope.expr, correlatedCTEs)
in pkg/sql/opt/optbuilder.(*Builder).processWiths
case *tree.Insert:
return b.processWiths(stmt.With, inScope, func(inScope *scope) *scope {
return b.buildInsert(stmt, inScope)
in pkg/sql/opt/optbuilder.(*Builder).buildStmt
b.ctes = nil
outScope = b.buildStmt(stmt, desiredTypes, inScope)
// Build With operators for any CTEs hoisted to the top level.
in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
stmtScope := b.buildStmtAtRoot(explain.Statement, nil /* desiredTypes */)
in pkg/sql/opt/optbuilder.(*Builder).buildExplain
case *tree.Explain:
return b.buildExplain(stmt, inScope)
in pkg/sql/opt/optbuilder.(*Builder).buildStmt
b.ctes = nil
outScope = b.buildStmt(stmt, desiredTypes, inScope)
// Build With operators for any CTEs hoisted to the top level.
in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
// and physical properties.
outScope := b.buildStmtAtRoot(b.stmt, nil /* desiredTypes */)
in pkg/sql/opt/optbuilder.(*Builder).Build
bld := optbuilder.New(ctx, &p.semaCtx, p.EvalContext(), &opc.catalog, f, opc.p.stmt.AST)
if err := bld.Build(); err != nil {
return nil, err
in pkg/sql.(*optPlanningCtx).buildExecMemo
execMemo, err := opc.buildExecMemo(ctx)
if err != nil {
in pkg/sql.(*planner).makeOptimizerPlan
func (ex *connExecutor) makeExecPlan(ctx context.Context, planner *planner) error {
if err := planner.makeOptimizerPlan(ctx); err != nil {
log.VEventf(ctx, 1, "optimizer plan failed: %v", err)
in pkg/sql.(*connExecutor).makeExecPlan
// between here and there needs to happen even if there's an error.
err := ex.makeExecPlan(ctx, planner)
// We'll be closing the plan manually below after execution; this
in pkg/sql.(*connExecutor).dispatchToExecutionEngine
if err := ex.dispatchToExecutionEngine(ctx, p, res); err != nil {
stmtThresholdSpan.Finish()
in pkg/sql.(*connExecutor).execStmtInOpenState
} else {
ev, payload, err = ex.execStmtInOpenState(ctx, parserStmt, prepared, pinfo, res)
}
in pkg/sql.(*connExecutor).execStmt
ev, payload, err = ex.execStmt(ctx, tcmd.Statement, nil /* prepared */, nil /* pinfo */, stmtRes)
return err
in pkg/sql.(*connExecutor).execCmd.func1
return err
}()
// Note: we write to ex.statsCollector.PhaseTimes, instead of ex.phaseTimes,
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

pkg/sql/sem/tree/datum.go in pkg/sql/sem/tree.MustBeDArray at line 3946
pkg/sql/sem/tree/eval.go in pkg/sql/sem/tree.glob..func138 at line 2567
pkg/sql/opt/norm/fold_constants_funcs.go in pkg/sql/opt/norm.(*CustomFuncs).FoldComparison at line 439
pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructContainedBy at line 16766
pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).Replace at line 22244
pkg/sql/opt/norm/inline_funcs.go in pkg/sql/opt/norm.(*CustomFuncs).inlineConstants.func1 at line 93
pkg/sql/opt/norm/inline_funcs.go in pkg/sql/opt/norm.(*CustomFuncs).inlineConstants at line 95
pkg/sql/opt/norm/inline_funcs.go in pkg/sql/opt/norm.(*CustomFuncs).InlineProjectionConstants at line 55
pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructProject at line 1349
pkg/sql/opt/optbuilder/project.go in pkg/sql/opt/optbuilder.(*Builder).constructProject at line 61
pkg/sql/opt/optbuilder/project.go in pkg/sql/opt/optbuilder.(*Builder).constructProjectForScope at line 36
pkg/sql/opt/optbuilder/mutation_builder.go in pkg/sql/opt/optbuilder.(*mutationBuilder).addCheckConstraintCols at line 908
pkg/sql/opt/optbuilder/insert.go in pkg/sql/opt/optbuilder.(*mutationBuilder).buildInsert at line 669
pkg/sql/opt/optbuilder/insert.go in pkg/sql/opt/optbuilder.(*Builder).buildInsert at line 288
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt.func2 at line 293
pkg/sql/opt/optbuilder/with.go in pkg/sql/opt/optbuilder.(*Builder).processWiths at line 111
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 292
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 241
pkg/sql/opt/optbuilder/explain.go in pkg/sql/opt/optbuilder.(*Builder).buildExplain at line 31
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 308
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 241
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 215
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 521
pkg/sql/plan_opt.go in pkg/sql.(*planner).makeOptimizerPlan at line 194
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).makeExecPlan at line 1260
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 972
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 709
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 129
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 1705
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1707
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1629
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 668
Tag Value
Cockroach Release v21.2.6
Cockroach SHA: c7cfac5
Platform linux amd64
Distribution CCL
Environment v21.2.6
Command start-single-node
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-13872

@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 Mar 16, 2022
@yuzefovich
Copy link
Member

dup of #77745

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