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

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/5690172716/?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.(*logicalPropsBuilder).buildProjectionsItemProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1666
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.(*ProjectionsItem).PopulateProps
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go:9565
  | github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructProjectionsItem
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:13107
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).constructProject
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/project.go:56
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).constructProjectForScope
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/project.go:37
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectClause
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1294
  | 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).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
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:289
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).addPreparedStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:122
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execPrepare
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:83
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2423
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2214
  | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
  | 	github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:965
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommands
  | 	github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:253
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl.func3
  | 	github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:997
  | runtime.goexit
  | 	src/runtime/asm_amd64.s:1695
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):

src/runtime/asm_amd64.s#L1694-L1696

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.

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

tree.FmtFlags(queryFormattingForFingerprintsMask.Get(ex.server.cfg.SV())))
_, 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.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,

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

// Construct the projection.
b.constructProjectForScope(outScope, projectionsScope)
outScope = projectionsScope

} else {
projectionsScope.expr = b.constructProject(
inScope.expr,

} else {
projections = append(projections, b.factory.ConstructProjectionsItem(scalar, id))
}

https://github.com/cockroachdb/cockroach/blob/9e10212477fde97f55ea4fff01797288c836575c/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L13106-L13108
https://github.com/cockroachdb/cockroach/blob/9e10212477fde97f55ea4fff01797288c836575c/bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go#L9564-L9566
item.Typ = item.Element.DataType()
BuildSharedProps(item.Element, &scalar.Shared, b.evalCtx)
}

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

src/runtime/asm_amd64.s in runtime.goexit at line 1695
pkg/sql/pgwire/server.go in pkg/sql/pgwire.(*Server).serveImpl.func3 at line 997
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommands at line 253
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 965
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2214
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2423
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).execPrepare at line 83
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).addPreparedStmt at line 122
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare at line 289
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 1176
pkg/sql/opt/optbuilder/select.go in pkg/sql/opt/optbuilder.(*Builder).buildSelectClause at line 1294
pkg/sql/opt/optbuilder/project.go in pkg/sql/opt/optbuilder.(*Builder).constructProjectForScope at line 37
pkg/sql/opt/optbuilder/project.go in pkg/sql/opt/optbuilder.(*Builder).constructProject at line 56
bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go in pkg/sql/opt/norm.(*Factory).ConstructProjectionsItem at line 13107
bazel-out/k8-opt/bin/pkg/sql/opt/memo/expr.og.go in pkg/sql/opt/memo.(*ProjectionsItem).PopulateProps at line 9565
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.(*logicalPropsBuilder).buildProjectionsItemProps at line 1666
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 1289

Jira issue: CRDB-41072

@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