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

Closed
cockroach-sentry opened this issue Jun 24, 2024 · 1 comment
Labels
branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.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.

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Jun 24, 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/5532005334/?referrer=webhooks_plugin

Panic Message:

logical_props_builder.go:1699: 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:1699
  | github.com/cockroachdb/cockroach/pkg/sql/opt/memo.(*logicalPropsBuilder).buildFiltersItemProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/memo/logical_props_builder.go:1546
  | 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/norm.(*Factory).ConstructConstFilter
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/norm/factory.go:529
  | github.com/cockroachdb/cockroach/pkg/sql/opt/lookupjoin.(*ConstraintBuilder).Build.func3
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/lookupjoin/constraint_builder.go:338
  | github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).DisableOptimizationsTemporarily
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/norm/factory.go:215
  | github.com/cockroachdb/cockroach/pkg/sql/opt/lookupjoin.(*ConstraintBuilder).Build
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/lookupjoin/constraint_builder.go:337
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*CustomFuncs).generateLookupJoinsImpl.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/join_funcs.go:432
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*scanIndexIter).ForEachStartingAfter
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/scan_index_iter.go:305
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*scanIndexIter).ForEach
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/scan_index_iter.go:208
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*CustomFuncs).generateLookupJoinsImpl
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/join_funcs.go:412
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*CustomFuncs).GenerateLookupJoins
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/join_funcs.go:261
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*explorer).exploreInnerJoin
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go:868
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*explorer).exploreGroupMember
  | 	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go:28
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*explorer).exploreGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/explorer.go:185
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:536
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeExpr
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:299
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:578
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:523
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeEnforcer
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:717
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).enforceProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:678
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:563
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:523
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeExpr
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:299
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:578
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:523
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeExpr
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:299
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:578
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeGroup
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:523
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).optimizeEnforcer
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:717
  | github.com/cockroachdb/cockroach/pkg/sql/opt/xform.(*Optimizer).enforceProps
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/xform/optimizer.go:678
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:1699: *withstack.withStack (top exception)
*assert.withAssertionFailure
Stacktrace (expand for inline code snippets):

}
fullyOptimized = o.optimizeEnforcer(state, getEnforcer, required, member)

memberProps := BuildChildPhysicalProps(o.mem, enforcer, 0, enforcerProps)
innerState := o.optimizeGroup(member, memberProps)
fullyOptimized = innerState.fullyOptimized

// Optimize the group member with respect to the required properties.
memberOptimized := o.optimizeGroupMember(state, member, required)

// Optimize the child with respect to those properties.
childCost, childOptimized := o.optimizeExpr(member.Child(i), childRequired)

case memo.RelExpr:
state := o.optimizeGroup(t, required)
return state.cost, state.fullyOptimized

// Optimize the group member with respect to the required properties.
memberOptimized := o.optimizeGroupMember(state, member, required)

// Optimize the child with respect to those properties.
childCost, childOptimized := o.optimizeExpr(member.Child(i), childRequired)

case memo.RelExpr:
state := o.optimizeGroup(t, required)
return state.cost, state.fullyOptimized

// Optimize the group member with respect to the required properties.
memberOptimized := o.optimizeGroupMember(state, member, required)

// of requiring one of the merge join children to be sorted.
fullyOptimized = o.enforceProps(state, member, required)

}
fullyOptimized = o.optimizeEnforcer(state, getEnforcer, required, member)

memberProps := BuildChildPhysicalProps(o.mem, enforcer, 0, enforcerProps)
innerState := o.optimizeGroup(member, memberProps)
fullyOptimized = innerState.fullyOptimized

// Optimize the group member with respect to the required properties.
memberOptimized := o.optimizeGroupMember(state, member, required)

// Optimize the child with respect to those properties.
childCost, childOptimized := o.optimizeExpr(member.Child(i), childRequired)

case memo.RelExpr:
state := o.optimizeGroup(t, required)
return state.cost, state.fullyOptimized

// other expressions in this group.
if o.shouldExplore(required) && !o.explorer.exploreGroup(grp, required).fullyExplored {
fullyOptimized = false

if memberExplored := e.exploreGroupMember(state, member, i, required); memberExplored {
// No more rules can ever match this expression, so skip it in

https://github.com/cockroachdb/cockroach/blob/fceb4cf5c378bfb53b3cf12c672716168192f1fe/bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go#L27-L29
https://github.com/cockroachdb/cockroach/blob/fceb4cf5c378bfb53b3cf12c672716168192f1fe/bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go#L867-L869
) {
c.generateLookupJoinsImpl(
grp, joinType,

iter.Init(c.e.evalCtx, c.e.f, c.e.mem, &c.im, scanPrivate, on, rejectInvertedIndexes)
iter.ForEach(func(index cat.Index, onFilters memo.FiltersExpr, indexCols opt.ColSet, _ bool, _ memo.ProjectionsExpr) {
// Skip indexes that do not cover all virtual projection columns, if

func (it *scanIndexIter) ForEach(f enumerateIndexFunc) {
it.ForEachStartingAfter(cat.PrimaryIndex-1, f)
}

f(index, filters, indexCols, isCovering, constProj)

}
lookupConstraint, foundEqualityCols := cb.Build(index, onFilters, optionalFilters, derivedfkOnFilters)
if lookupConstraint.IsUnconstrained() {

// non-canonical expression.
b.f.DisableOptimizationsTemporarily(func() {
valsFilter = b.f.ConstructConstFilter(idxCol, foundVals)

f.DisableOptimizations()
fn()
f.matchedRule = originalMatchedRule

b.f.DisableOptimizationsTemporarily(func() {
valsFilter = b.f.ConstructConstFilter(idxCol, foundVals)
})

}
return f.ConstructFiltersItem(f.ConstructIn(
f.ConstructVariable(col),

https://github.com/cockroachdb/cockroach/blob/fceb4cf5c378bfb53b3cf12c672716168192f1fe/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go#L12833-L12835
https://github.com/cockroachdb/cockroach/blob/fceb4cf5c378bfb53b3cf12c672716168192f1fe/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)

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

pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).enforceProps at line 678
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeEnforcer at line 717
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 523
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember at line 578
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeExpr at line 299
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 523
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember at line 578
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeExpr at line 299
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 523
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember at line 563
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).enforceProps at line 678
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeEnforcer at line 717
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 523
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroupMember at line 578
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeExpr at line 299
pkg/sql/opt/xform/optimizer.go in pkg/sql/opt/xform.(*Optimizer).optimizeGroup at line 536
pkg/sql/opt/xform/explorer.go in pkg/sql/opt/xform.(*explorer).exploreGroup at line 185
bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go in pkg/sql/opt/xform.(*explorer).exploreGroupMember at line 28
bazel-out/k8-opt/bin/pkg/sql/opt/xform/explorer.og.go in pkg/sql/opt/xform.(*explorer).exploreInnerJoin at line 868
pkg/sql/opt/xform/join_funcs.go in pkg/sql/opt/xform.(*CustomFuncs).GenerateLookupJoins at line 261
pkg/sql/opt/xform/join_funcs.go in pkg/sql/opt/xform.(*CustomFuncs).generateLookupJoinsImpl at line 412
pkg/sql/opt/xform/scan_index_iter.go in pkg/sql/opt/xform.(*scanIndexIter).ForEach at line 208
pkg/sql/opt/xform/scan_index_iter.go in pkg/sql/opt/xform.(*scanIndexIter).ForEachStartingAfter at line 305
pkg/sql/opt/xform/join_funcs.go in pkg/sql/opt/xform.(*CustomFuncs).generateLookupJoinsImpl.func1 at line 432
pkg/sql/opt/lookupjoin/constraint_builder.go in pkg/sql/opt/lookupjoin.(*ConstraintBuilder).Build at line 337
pkg/sql/opt/norm/factory.go in pkg/sql/opt/norm.(*Factory).DisableOptimizationsTemporarily at line 215
pkg/sql/opt/lookupjoin/constraint_builder.go in pkg/sql/opt/lookupjoin.(*ConstraintBuilder).Build.func3 at line 338
pkg/sql/opt/norm/factory.go in pkg/sql/opt/norm.(*Factory).ConstructConstFilter at line 529
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 1546
pkg/sql/opt/memo/logical_props_builder.go in pkg/sql/opt/memo.BuildSharedProps at line 1699

Tags

Tag Value
Command server
Environment v23.1.21
Go Version go1.19.13
Platform linux amd64
Distribution CCL
Cockroach Release v23.1.21
Cockroach SHA fceb4cf
# of CPUs 16
# of Goroutines 1881

Jira issue: CRDB-39788

@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. branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 labels Jun 24, 2024
@yuzefovich
Copy link
Member

dup of #117162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.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.
Projects
None yet
Development

No branches or pull requests

2 participants