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... #128547

Closed
cockroach-sentry opened this issue Aug 8, 2024 · 1 comment
Labels
branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 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 Aug 8, 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/5690128805/?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.(*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:9797
  | 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:13148
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildWhere
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1378
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1247
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1176
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1128
  | 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:1127
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:360
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildUnionClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/union.go:30
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1180
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1128
  | 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:1127
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:360
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildUnionClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/union.go:30
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1180
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1128
  | 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:1127
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:360
  | 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).buildReusableMemo
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:450
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).prepareUsingOptimizer
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:170
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).populatePrepared
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:344
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare.func2
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:284
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):

p.extendedEvalCtx.Annotations = &p.semaCtx.Annotations
flags, err = ex.populatePrepared(ctx, txn, placeholderHints, p, origin)
return err

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

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

}
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,

b.rejectIfLocking(lockCtx.locking, "UNION/INTERSECT/EXCEPT")
outScope = b.buildUnionClause(t, desiredTypes, inScope)

) (outScope *scope) {
leftScope := b.buildStmt(clause.Left, desiredTypes, inScope)
// Try to propagate types left-to-right, if we didn't already have desired

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,

b.rejectIfLocking(lockCtx.locking, "UNION/INTERSECT/EXCEPT")
outScope = b.buildUnionClause(t, desiredTypes, inScope)

) (outScope *scope) {
leftScope := b.buildStmt(clause.Left, desiredTypes, inScope)
// Try to propagate types left-to-right, if we didn't already have desired

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/9e10212477fde97f55ea4fff01797288c836575c/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L13147-L13149
https://github.com/cockroachdb/cockroach/blob/9e10212477fde97f55ea4fff01797288c836575c/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L9796-L9798
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,

pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare.func2 at line 284
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).populatePrepared at line 344
pkg/sql/plan_opt.go in pkg/sql.(*planner).prepareUsingOptimizer at line 170
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildReusableMemo at line 450
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 360
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1127
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 1128
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1180
pkg/sql/opt/optbuilder/union.go in pkg/sql/opt/optbuilder.(*Builder).buildUnionClause at line 30
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 360
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1127
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 1128
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1180
pkg/sql/opt/optbuilder/union.go in pkg/sql/opt/optbuilder.(*Builder).buildUnionClause at line 30
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 360
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelect at line 1127
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 1128
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens at line 1176
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectClause at line 1247
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildWhere at line 1378
bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructFiltersItem at line 13148
bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go in pkg/sql/opt/memo.(*FiltersItem).PopulateProps at line 9797
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 1764

Tags

Tag Value
Command start-single-node
Environment v24.1.3
Go Version go1.22.5 X:nocoverageredesign
Platform linux amd64
Distribution CCL
Cockroach Release v24.1.3
Cockroach SHA 9e10212
# of CPUs 128
# of Goroutines 1272

Jira issue: CRDB-41065

@cockroach-sentry cockroach-sentry added branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 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 Aug 8, 2024
@yuzefovich yuzefovich added T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner labels Nov 12, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Nov 12, 2024
@yuzefovich
Copy link
Member

dup of #132577 or #130399 or #128889

@github-project-automation github-project-automation bot moved this from Triage 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
branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 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