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: logical_props_builder.go:1764: comparison overload not found (×, ×, ×) (1) assertion failure Wraps: (2) attached stack trace -- stack trace: | github.com/cockroachdb/cockroach/pkg/sql/o... #135356

Closed
cockroach-sentry opened this issue Nov 15, 2024 · 2 comments
Labels
branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 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. T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Nov 15, 2024

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

Panic Message:

logical_props_builder.go:1764: comparison overload not found (×, ×, ×)
(1) assertion failure
Wraps: (2) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1764
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1818
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1818
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1818
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1818
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.(*logicalPropsBuilder).buildFiltersItemProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1611
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.(*FiltersItem).PopulateProps
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go:9798
  | github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructFiltersItem
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:13246
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildWhere
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1371
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1240
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1169
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1121
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).processWiths
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/with.go:116
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1120
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:356
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:299
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:280
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:259
  | github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:862
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:251
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2298
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1848
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1181
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3436
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2316
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2321
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2238
  | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:963
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommands
  | 	github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:256
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl.func4
  | 	github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:1136
Wraps: (3) comparison overload not found (×, ×, ×)
Error types: (1) *assert.withAssertionFailure (2) *withstack.withStack (3) *errutil.leafError
-- report composition:
*errutil.leafError: comparison overload not found (×, ×, ×)
logical_props_builder.go:1764: *withstack.withStack (top exception)
*assert.withAssertionFailure
Stacktrace (expand for inline code snippets):

defer procWg.Done()
c.processCommands(
ctx,

reservedOwned = false // We're about to pass ownership away.
retErr = sqlServer.ServeConn(
ctx,

}(ctx, h)
return h.ex.run(ctx, s.pool, reserved, cancel)
}

var err error
if err = ex.execCmd(); err != nil {
// Both of these errors are normal ways for the connExecutor to exit.

return err
}()
// Note: we write to ex.statsCollector.PhaseTimes, instead of ex.phaseTimes,

tcmd.LastInBatch || !implicitTxnForBatch)
ev, payload, err = ex.execStmt(
ctx, tcmd.Statement, nil /* portal */, nil /* pinfo */, stmtRes, canAutoCommit,

}
err = ex.execWithProfiling(ctx, ast, preparedStmt, func(ctx context.Context) error {
ev, payload, err = ex.execStmtInOpenState(ctx, parserStmt, portal, pinfo, res, canAutoCommit)

} else {
err = op(ctx)
}

err = ex.execWithProfiling(ctx, ast, preparedStmt, func(ctx context.Context) error {
ev, payload, err = ex.execStmtInOpenState(ctx, parserStmt, portal, pinfo, res, canAutoCommit)
return err

} else {
if err := ex.dispatchToExecutionEngine(stmtCtx, p, res); err != nil {
stmtThresholdSpan.Finish()

// between here and there needs to happen even if there's an error.
err = ex.makeExecPlan(ctx, planner)
defer planner.curPlan.close(ctx)

if err := planner.makeOptimizerPlan(ctx); err != nil {
log.VEventf(ctx, 1, "optimizer plan failed: %v", err)

execMemo, err := opc.buildExecMemo(ctx)
if err != nil {

bld := optbuilder.New(ctx, &p.semaCtx, p.EvalContext(), opc.catalog, f, opc.p.stmt.AST)
if err := bld.Build(); err != nil {
return nil, err

// and physical properties.
outScope := b.buildStmtAtRoot(b.stmt, nil /* desiredTypes */)

inScope := b.allocScope()
return b.buildStmtAtRootWithScope(stmt, desiredTypes, inScope)
}

b.ctes = nil
outScope = b.buildStmt(stmt, desiredTypes, inScope)
// Build With operators for any CTEs hoisted to the top level.

case *tree.Select:
return b.buildSelect(stmt, noLocking, desiredTypes, inScope)

return b.processWiths(with, inScope, func(inScope *scope) *scope {
return b.buildSelectStmtWithoutParens(

inScope.atRoot = false
outScope := buildStmt(inScope)
outScope.expr = b.buildWiths(outScope.expr, correlatedCTEs)

return b.processWiths(with, inScope, func(inScope *scope) *scope {
return b.buildSelectStmtWithoutParens(
wrapped, orderBy, limit, lockingClause, lockCtx, desiredTypes, inScope,

case *tree.SelectClause:
outScope = b.buildSelectClause(t, orderBy, lockCtx, desiredTypes, inScope)

b.processWindowDefs(sel, fromScope)
b.buildWhere(sel.Where, fromScope)

inScope.expr,
memo.FiltersExpr{b.factory.ConstructFiltersItem(filter)},
)

https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L13245-L13247
https://github.com/cockroachdb/cockroach/blob/8140b8e294fb16a293d0aae662bcf5c1d488c852/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L9797-L9799
func (b *logicalPropsBuilder) buildFiltersItemProps(item *FiltersItem, scalar *props.Scalar) {
BuildSharedProps(item.Condition, &scalar.Shared, b.evalCtx)

} else {
BuildSharedProps(e.Child(i), shared, evalCtx)
}

} else {
BuildSharedProps(e.Child(i), shared, evalCtx)
}

} else {
BuildSharedProps(e.Child(i), shared, evalCtx)
}

} else {
BuildSharedProps(e.Child(i), shared, evalCtx)
}

if !ok {
panic(errors.AssertionFailedf(
"comparison overload not found (%s, %s, %s)", e.Op(), leftType, rightType,

pkg/sql/pgwire/server.go in pkg/sql/pgwire.(*Server).serveImpl.func4 at line 1136
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommands at line 256
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 963
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2238
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2321
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2316
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 145
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 3436
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func1 at line 146
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 1181
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 1848
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).makeExecPlan at line 2298
pkg/sql/plan_opt.go in pkg/sql.(*planner).makeOptimizerPlan at line 251
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 862
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 259
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 280
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope at line 299
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 356
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1120
pkg/sql/opt/optbuilder/with.go in pkg/sql/opt/optbuilder.(*Builder).processWiths at line 116
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1 at line 1121
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1169
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectClause at line 1240
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildWhere at line 1371
bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructFiltersItem at line 13246
bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go in pkg/sql/opt/memo.(*FiltersItem).PopulateProps at line 9798
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.(*logicalPropsBuilder).buildFiltersItemProps at line 1611
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1818
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1818
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1818
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1818
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1764

Tags

Tag Value
Command server
Environment v24.2.4
Go Version go1.22.5 X:nocoverageredesign
Platform linux amd64
Distribution CCL
Cockroach Release v24.2.4
Cockroach SHA 8140b8e
# of CPUs 128
# of Goroutines 1363

Jira issue: CRDB-44468

@cockroach-sentry cockroach-sentry added branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 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 Nov 15, 2024
Copy link

blathers-crl bot commented Nov 15, 2024

CC'ing via the CODEOWNERS-based sentry heuristic:

  • @cockroachdb/sql-queries

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

@blathers-crl blathers-crl bot added T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner labels Nov 15, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Nov 15, 2024
@yuzefovich
Copy link
Member

we have quite a few reproductions already #132577, #130399, #128889, #94087, #83972

@github-project-automation github-project-automation bot moved this from Triage to Done in SQL Queries Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 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. T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner
Projects
Archived in project
Development

No branches or pull requests

2 participants