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

opt: v23.1.11: comparison overload not found (×, ×, ×): unredact operator and type names #117162

Closed
cockroach-sentry opened this issue Dec 29, 2023 · 2 comments
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. T-sql-queries SQL Queries Team

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Dec 29, 2023

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

Panic Message:

logical_props_builder.go:1682: 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:1682
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1733
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.BuildSharedProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1733
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.(*logicalPropsBuilder).buildFiltersItemProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1529
  | 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:9299
  | 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:12834
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildWhere
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1253
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1124
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1069
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1038
  | 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:1037
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:332
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:272
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:246
  | github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildReusableMemo
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:433
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).prepareUsingOptimizer
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:164
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).populatePrepared
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:333
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare.func2
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:271
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:276
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).addPreparedStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:115
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execPrepare
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:76
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2314
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2105
  | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:902
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:310
  | runtime.goexit
  | 	GOROOT/src/runtime/asm_amd64.s:1594
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:1682: *withstack.withStack (top exception)
*assert.withAssertionFailure
Stacktrace (expand for inline code snippets):

GOROOT/src/runtime/asm_amd64.s#L1593-L1595

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.

stmtCtx := withStatement(ctx, ex.curStmtAST)
ev, payload = ex.execPrepare(stmtCtx, tcmd)
case DescribeStmt:

stmt := makeStatement(parseCmd.Statement, ex.server.cfg.GenerateID())
_, err := ex.addPreparedStmt(
ctx,

// Prepare the query. This completes the typing of placeholders.
prepared, err := ex.prepare(ctx, stmt, placeholderHints, rawTypeHints, origin)
if err != nil {

// Use the existing transaction.
if err := prepare(ctx, ex.state.mu.txn); err != nil {
if origin != PreparedStatementOriginSessionMigration {

p.semaCtx.Annotations = tree.MakeAnnotations(stmt.NumAnnotations)
flags, err = ex.populatePrepared(ctx, txn, placeholderHints, p, origin)
return err

// and execute paths.
flags, err := p.prepareUsingOptimizer(ctx)
if err != nil {

memo, err := opc.buildReusableMemo(ctx)
if err != nil {

bld.KeepPlaceholders = true
if err := bld.Build(); err != nil {
return nil, err

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

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, noRowLocking, 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, locking, desiredTypes, inScope,

case *tree.SelectClause:
outScope = b.buildSelectClause(t, orderBy, locking, 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/8d065df26e25a762a1abbbf2b1e475456b341a00/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L12833-L12835
https://github.com/cockroachdb/cockroach/blob/8d065df26e25a762a1abbbf2b1e475456b341a00/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L9298-L9300
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)
}

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

GOROOT/src/runtime/asm_amd64.s in runtime.goexit at line 1594
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 310
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 902
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2105
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2314
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).execPrepare at line 76
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).addPreparedStmt at line 115
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare at line 276
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare.func2 at line 271
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).populatePrepared at line 333
pkg/sql/plan_opt.go in pkg/sql.(*planner).prepareUsingOptimizer at line 164
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildReusableMemo at line 433
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 246
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 272
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 332
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1037
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 1038
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1069
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectClause at line 1124
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildWhere at line 1253
bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructFiltersItem at line 12834
bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go in pkg/sql/opt/memo.(*FiltersItem).PopulateProps at line 9299
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.(*logicalPropsBuilder).buildFiltersItemProps at line 1529
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1733
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1733
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1682

Tags

Tag Value
Command start-single-node
Environment v23.1.13
Go Version go1.19.13
Platform linux amd64
Distribution CCL
Cockroach Release v23.1.13
Cockroach SHA 8d065df
# of CPUs 128
# of Goroutines 1193

Jira issue: CRDB-35018

@cockroach-sentry cockroach-sentry added O-sentry Originated from an in-the-wild panic report. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. labels Dec 29, 2023
@yuzefovich yuzefovich changed the title Sentry: logical_props_builder.go:1682: comparison overload not found (×, ×, ×) (1) assertion failure Wraps: (2) attached stack trace -- stack trace: | github.com/cockroachdb/cockroach/pkg/sql/o... opt: v23.1.11: comparison overload not found (×, ×, ×): unredact operator and type names Jan 8, 2024
@yuzefovich yuzefovich added the T-sql-queries SQL Queries Team label Jan 8, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Jan 8, 2024
This was referenced Jan 8, 2024
@yuzefovich yuzefovich moved this from Triage to Active in SQL Queries Jan 17, 2024
@yuzefovich
Copy link
Member

@michae2 another spot for unredacting type names is mentioned in #117484.

@yuzefovich
Copy link
Member

We now have multiple reproductions of this issue (#132577, #130399, #128889, #94087, #83972), so I don't think we need to do this anymore.

@github-project-automation github-project-automation bot moved this from Bugs to Fix to Done in SQL Queries Nov 12, 2024
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. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

3 participants