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: type_desc.go:701: type × (223): referencing × 256 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.backward_references.type] Wraps: (2) keys: [sql.schema... #114164

Closed
cockroach-sentry opened this issue Nov 9, 2023 · 1 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.

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Nov 9, 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/4617483779/?referrer=webhooks_plugin

Panic Message:

type_desc.go:701: type × (223): referencing × 256 was dropped without dependency unlinking
(1) keys: [sql.schema.validation_errors.read.backward_references.type]
Wraps: (2) keys: [sql.schema.validation_errors.read.backward_references.type]
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).decorate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:253
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:177
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.(*immutable).ValidateBackReferences
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:701
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate.func3
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:105
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:193
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:100
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).Validate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/validate.go:36
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).finalizeDescriptors
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:566
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.getDescriptorsByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:203
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).getDescriptorByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:88
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.makeMutableTypeLookupFunc.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/hydrate.go:125
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc.MakeTypeLookupFuncForHydration.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc/hydrate.go:74
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.TypeLookupFunc.GetTypeDescriptor
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:797
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.EnsureTypeIsHydrated
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:840
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.HydrateTypesInTableDescriptor
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:854
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc.Hydrate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc/hydrate.go:53
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).hydrateDescriptors
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/hydrate.go:73
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.getDescriptorsByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:207
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).getDescriptorByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:88
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).getDescriptorByName
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:336
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetObjectByName
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/object.go:53
  | github.com/cockroachdb/cockroach/pkg/sql.(*schemaResolver).LookupObject
  | 	github.com/cockroachdb/cockroach/pkg/sql/schema_resolver.go:118
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver.ResolveExisting
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver/resolver.go:440
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver.ResolveExistingObject
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver/resolver.go:198
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver.ResolveMutableExistingTableObject
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver/resolver.go:155
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).ResolveMutableTableDescriptorEx
  | 	github.com/cockroachdb/cockroach/pkg/sql/resolver.go:1271
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).AlterTable
  | 	github.com/cockroachdb/cockroach/pkg/sql/alter_table.go:82
  | github.com/cockroachdb/cockroach/pkg/sql.planOpaque
  | 	github.com/cockroachdb/cockroach/pkg/sql/opaque.go:124
  | github.com/cockroachdb/cockroach/pkg/sql.buildOpaque
  | 	github.com/cockroachdb/cockroach/pkg/sql/opaque.go:63
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/opaque.go:70
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  | 	github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:421
Wraps: (4) type × (223)
Wraps: (5) assertion failure
Wraps: (6) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.(*immutable).ValidateBackReferences
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:701
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate.func3
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:105
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:193
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:100
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).Validate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/validate.go:36
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).finalizeDescriptors
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:566
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.getDescriptorsByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:203
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).getDescriptorByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:88
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.makeMutableTypeLookupFunc.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/hydrate.go:125
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc.MakeTypeLookupFuncForHydration.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc/hydrate.go:74
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.TypeLookupFunc.GetTypeDescriptor
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:797
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.EnsureTypeIsHydrated
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:840
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.HydrateTypesInTableDescriptor
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/type_desc.go:854
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc.Hydrate
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/hydrateddesc/hydrate.go:53
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).hydrateDescriptors
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/hydrate.go:73
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.getDescriptorsByID
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/desc...
Stacktrace (expand for inline code snippets):

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

// See if we have an opaque handler registered for this statement type.
if outScope := b.tryBuildOpaque(stmt, inScope); outScope != nil {
// The opaque handler may resolve objects; we don't care about caching

}
obj, err := info.buildFn(b.ctx, b.semaCtx, b.evalCtx, stmt)
if err != nil {

var err error
plan, err = planOpaque(ctx, p, stmt)
if err != nil {

cockroach/pkg/sql/opaque.go

Lines 123 to 125 in af6752b

case *tree.AlterTable:
return p.AlterTable(ctx, n)
case *tree.AlterTableLocality:

prefix, tableDesc, err := p.ResolveMutableTableDescriptorEx(
ctx, n.Table, !n.IfExists, tree.ResolveRequireTableDesc,

cockroach/pkg/sql/resolver.go

Lines 1270 to 1272 in af6752b

tn := name.ToTableName()
prefix, table, err := resolver.ResolveMutableExistingTableObject(ctx, p, &tn, required, requiredType)
if err != nil {

var desc catalog.Descriptor
desc, prefix, err = ResolveExistingObject(ctx, sc, un, lookupFlags)
if err != nil || desc == nil {

) (res catalog.Descriptor, _ catalog.ResolvedObjectPrefix, err error) {
found, prefix, obj, err := ResolveExisting(ctx, un, sc, lookupFlags, sc.CurrentDatabase(), sc.CurrentSearchPath())
if err != nil {

for next, ok := iter.Next(); ok; next, ok = iter.Next() {
if found, prefix, result, err = r.LookupObject(
ctx, lookupFlags, curDb, next, u.Object(),

prefix, objMeta, err = sr.descCollection.GetObjectByName(ctx, sr.txn, dbName, scName, obName, flags)
return objMeta != nil, prefix, objMeta, err

}
desc, err = tc.getDescriptorByName(
ctx, txn, prefix.Database, prefix.Schema, objectName, flags.CommonLookupFlags, requestedType,

desc, err := tc.getDescriptorByID(ctx, txn, flags, id)
if err != nil {

var arr [1]catalog.Descriptor
if err := getDescriptorsByID(
ctx, tc, txn, flags, arr[:], ids...,

// Hydration is skipped if "SkipHydration" flag is true.
if err := tc.hydrateDescriptors(ctx, txn, flags, descs); err != nil {
return err

for _, i := range hydratableMutableIndexes.Ordered() {
if err := hydrateddesc.Hydrate(ctx, descs[i], typeFn); err != nil {
return err

case catalog.TableDescriptor:
return typedesc.HydrateTypesInTableDescriptor(ctx, t.TableDesc(), typeLookupFunc)
case catalog.SchemaDescriptor:

for i := range desc.Columns {
if err := EnsureTypeIsHydrated(ctx, desc.Columns[i].Type, res); err != nil {
return err

}
elemTypName, elemTypDesc, err := res.GetTypeDescriptor(ctx, id)
if err != nil {

) (tree.TypeName, catalog.TypeDescriptor, error) {
return t(ctx, id)
}

if typDesc == nil {
typDesc, err = lookupFn(ctx, id, false /* skipHydration */)
if err != nil {

mutableLookupFunc := func(ctx context.Context, id descpb.ID, skipHydration bool) (catalog.Descriptor, error) {
return tc.getDescriptorByID(ctx, txn, tree.CommonLookupFlags{
Required: true,

var arr [1]catalog.Descriptor
if err := getDescriptorsByID(
ctx, tc, txn, flags, arr[:], ids...,

// At this point, all descriptors are in the slice, finalize and hydrate them.
if err := tc.finalizeDescriptors(ctx, txn, flags, descs, vls); err != nil {
return err

if len(toValidate) > 0 {
if err := tc.Validate(ctx, txn, catalog.ValidationReadTelemetry, requiredLevel, toValidate...); err != nil {
return err

version := tc.settings.Version.ActiveVersion(ctx)
return validate.Validate(
ctx,

// Descriptor backward-reference checks.
if !vea.validateDescriptorsAtLevel(
catalog.ValidationLevelBackReferences,

vea.currentDescriptor = desc
validationFn(desc)
}

if !desc.Dropped() {
desc.ValidateBackReferences(&vea, vdg)
}

if depDesc.Dropped() {
vea.Report(errors.AssertionFailedf(
"referencing %s %d was dropped without dependency unlinking", depDesc.DescriptorType(), id))

}
vea.errors = append(vea.errors, vea.decorate(err))
}

case catalog.Type:
err = errors.Wrapf(err, string(catalog.Type)+" %q (%d)", name, id)
case catalog.Function:

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 */)

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

// See if we have an opaque handler registered for this statement type.
if outScope := b.tryBuildOpaque(stmt, inScope); outScope != nil {
// The opaque handler may resolve objects; we don't care about caching

}
obj, err := info.buildFn(b.ctx, b.semaCtx, b.evalCtx, stmt)
if err != nil {

var err error
plan, err = planOpaque(ctx, p, stmt)
if err != nil {

cockroach/pkg/sql/opaque.go

Lines 123 to 125 in af6752b

case *tree.AlterTable:
return p.AlterTable(ctx, n)
case *tree.AlterTableLocality:

prefix, tableDesc, err := p.ResolveMutableTableDescriptorEx(
ctx, n.Table, !n.IfExists, tree.ResolveRequireTableDesc,

cockroach/pkg/sql/resolver.go

Lines 1270 to 1272 in af6752b

tn := name.ToTableName()
prefix, table, err := resolver.ResolveMutableExistingTableObject(ctx, p, &tn, required, requiredType)
if err != nil {

var desc catalog.Descriptor
desc, prefix, err = ResolveExistingObject(ctx, sc, un, lookupFlags)
if err != nil || desc == nil {

) (res catalog.Descriptor, _ catalog.ResolvedObjectPrefix, err error) {
found, prefix, obj, err := ResolveExisting(ctx, un, sc, lookupFlags, sc.CurrentDatabase(), sc.CurrentSearchPath())
if err != nil {

for next, ok := iter.Next(); ok; next, ok = iter.Next() {
if found, prefix, result, err = r.LookupObject(
ctx, lookupFlags, curDb, next, u.Object(),

prefix, objMeta, err = sr.descCollection.GetObjectByName(ctx, sr.txn, dbName, scName, obName, flags)
return objMeta != nil, prefix, objMeta, err

}
desc, err = tc.getDescriptorByName(
ctx, txn, prefix.Database, prefix.Schema, objectName, flags.CommonLookupFlags, requestedType,

desc, err := tc.getDescriptorByID(ctx, txn, flags, id)
if err != nil {

var arr [1]catalog.Descriptor
if err := getDescriptorsByID(
ctx, tc, txn, flags, arr[:], ids...,

// Hydration is skipped if "SkipHydration" flag is true.
if err := tc.hydrateDescriptors(ctx, txn, flags, descs); err != nil {
return err

for _, i := range hydratableMutableIndexes.Ordered() {
if err := hydrateddesc.Hydrate(ctx, descs[i], typeFn); err != nil {
return err

case catalog.TableDescriptor:
return typedesc.HydrateTypesInTableDescriptor(ctx, t.TableDesc(), typeLookupFunc)
case catalog.SchemaDescriptor:

for i := range desc.Columns {
if err := EnsureTypeIsHydrated(ctx, desc.Columns[i].Type, res); err != nil {
return err

}
elemTypName, elemTypDesc, err := res.GetTypeDescriptor(ctx, id)
if err != nil {

) (tree.TypeName, catalog.TypeDescriptor, error) {
return t(ctx, id)
}

if typDesc == nil {
typDesc, err = lookupFn(ctx, id, false /* skipHydration */)
if err != nil {

mutableLookupFunc := func(ctx context.Context, id descpb.ID, skipHydration bool) (catalog.Descriptor, error) {
return tc.getDescriptorByID(ctx, txn, tree.CommonLookupFlags{
Required: true,

var arr [1]catalog.Descriptor
if err := getDescriptorsByID(
ctx, tc, txn, flags, arr[:], ids...,

// At this point, all descriptors are in the slice, finalize and hydrate them.
if err := tc.finalizeDescriptors(ctx, txn, flags, descs, vls); err != nil {
return err

if len(toValidate) > 0 {
if err := tc.Validate(ctx, txn, catalog.ValidationReadTelemetry, requiredLevel, toValidate...); err != nil {
return err

version := tc.settings.Version.ActiveVersion(ctx)
return validate.Validate(
ctx,

// Descriptor backward-reference checks.
if !vea.validateDescriptorsAtLevel(
catalog.ValidationLevelBackReferences,

vea.currentDescriptor = desc
validationFn(desc)
}

if !desc.Dropped() {
desc.ValidateBackReferences(&vea, vdg)
}

if depDesc.Dropped() {
vea.Report(errors.AssertionFailedf(
"referencing %s %d was dropped without dependency unlinking", depDesc.DescriptorType(), id))

pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 256
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 421
pkg/sql/opt/optbuilder/opaque.go in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque at line 70
pkg/sql/opaque.go in pkg/sql.buildOpaque at line 63
pkg/sql/opaque.go in pkg/sql.planOpaque at line 124
pkg/sql/alter_table.go in pkg/sql.(*planner).AlterTable at line 82
pkg/sql/resolver.go in pkg/sql.(*planner).ResolveMutableTableDescriptorEx at line 1271
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveMutableExistingTableObject at line 155
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveExistingObject at line 198
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveExisting at line 440
pkg/sql/schema_resolver.go in pkg/sql.(*schemaResolver).LookupObject at line 118
pkg/sql/catalog/descs/object.go in pkg/sql/catalog/descs.(*Collection).GetObjectByName at line 53
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByName at line 336
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByID at line 88
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 207
pkg/sql/catalog/descs/hydrate.go in pkg/sql/catalog/descs.(*Collection).hydrateDescriptors at line 73
pkg/sql/catalog/hydrateddesc/hydrate.go in pkg/sql/catalog/hydrateddesc.Hydrate at line 53
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.HydrateTypesInTableDescriptor at line 854
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.EnsureTypeIsHydrated at line 840
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.TypeLookupFunc.GetTypeDescriptor at line 797
pkg/sql/catalog/hydrateddesc/hydrate.go in pkg/sql/catalog/hydrateddesc.MakeTypeLookupFuncForHydration.func1 at line 74
pkg/sql/catalog/descs/hydrate.go in pkg/sql/catalog/descs.makeMutableTypeLookupFunc.func1 at line 125
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByID at line 88
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 203
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).finalizeDescriptors at line 566
pkg/sql/catalog/descs/validate.go in pkg/sql/catalog/descs.(*Collection).Validate at line 36
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate at line 100
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel at line 193
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate.func3 at line 105
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.(*immutable).ValidateBackReferences at line 701
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report at line 177
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).decorate at line 253
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 561
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 230
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 256
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 421
pkg/sql/opt/optbuilder/opaque.go in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque at line 70
pkg/sql/opaque.go in pkg/sql.buildOpaque at line 63
pkg/sql/opaque.go in pkg/sql.planOpaque at line 124
pkg/sql/alter_table.go in pkg/sql.(*planner).AlterTable at line 82
pkg/sql/resolver.go in pkg/sql.(*planner).ResolveMutableTableDescriptorEx at line 1271
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveMutableExistingTableObject at line 155
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveExistingObject at line 198
pkg/sql/catalog/resolver/resolver.go in pkg/sql/catalog/resolver.ResolveExisting at line 440
pkg/sql/schema_resolver.go in pkg/sql.(*schemaResolver).LookupObject at line 118
pkg/sql/catalog/descs/object.go in pkg/sql/catalog/descs.(*Collection).GetObjectByName at line 53
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByName at line 336
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByID at line 88
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 207
pkg/sql/catalog/descs/hydrate.go in pkg/sql/catalog/descs.(*Collection).hydrateDescriptors at line 73
pkg/sql/catalog/hydrateddesc/hydrate.go in pkg/sql/catalog/hydrateddesc.Hydrate at line 53
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.HydrateTypesInTableDescriptor at line 854
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.EnsureTypeIsHydrated at line 840
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.TypeLookupFunc.GetTypeDescriptor at line 797
pkg/sql/catalog/hydrateddesc/hydrate.go in pkg/sql/catalog/hydrateddesc.MakeTypeLookupFuncForHydration.func1 at line 74
pkg/sql/catalog/descs/hydrate.go in pkg/sql/catalog/descs.makeMutableTypeLookupFunc.func1 at line 125
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).getDescriptorByID at line 88
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 203
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).finalizeDescriptors at line 566
pkg/sql/catalog/descs/validate.go in pkg/sql/catalog/descs.(*Collection).Validate at line 36
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate at line 100
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel at line 193
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate.func3 at line 105
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.(*immutable).ValidateBackReferences at line 701

Tags

Tag Value
Command server
Environment v22.2.14
Go Version go1.19.6
Platform linux amd64
Distribution CCL
Cockroach Release v22.2.14
Cockroach SHA af6752b
# of CPUs 8
# of Goroutines 552

Jira issue: CRDB-33375

@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 Nov 9, 2023
@yuzefovich
Copy link
Member

dup of #91645

@exalate-issue-sync exalate-issue-sync bot changed the title Sentry: type_desc.go:701: type × (223): referencing × 256 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.backward_references.type] Wraps: (2) keys: [sql.schema... Sentry: type_desc.go:701: type × (223): referencing × 256 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.backward_references.type] Wraps: (2) keys: [sql.schema... Nov 12, 2023
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.
Projects
None yet
Development

No branches or pull requests

2 participants