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:689: type × (184): referencing table 1045 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.cross_references.type sql.schema.validation_errors.read.cro... #91583

Closed
cockroach-teamcity opened this issue Nov 9, 2022 · 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-teamcity
Copy link
Member

cockroach-teamcity commented Nov 9, 2022

This issue was autofiled by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.

Sentry link: https://sentry.io/organizations/cockroach-labs/issues/3729211765/?referrer=webhooks_plugin

Panic message:

type_desc.go:689: type × (184): referencing table 1045 was dropped without dependency unlinking
(1) keys: [sql.schema.validation_errors.read.cross_references.type sql.schema.validation_errors.read.cross_references.type sql.schema.validation_errors.read.cross_references.relation sql.schema.validation_errors.read.cross_references.relation sql.schema.validation_errors.read.cross_references.relation]
Wraps: (2) secondary error attachment
| type × (185): referencing table 1045 was dropped without dependency unlinking
| (1) secondary error attachment
| | relation × (190): origin table × (1045) is dropped
| | (1) secondary error attachment
| | | relation × (202): origin table × (1045) is dropped
| | | (1) secondary error attachment
| | | | relation × (206): origin table × (1045) is dropped
| | | | (1) keys: [sql.schema.validation_errors.read.cross_references.relation]
| | | | Wraps: (2) 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:214
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:149
| | | | | [...repeated from below...]
| | | | Wraps: (3) relation × (206)
| | | | Wraps: (4) assertion failure
| | | | Wraps: (5) attached stack trace
| | | | -- stack trace:
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*wrapper).validateInboundFK
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc/validate.go:385
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*wrapper).ValidateCrossReferences
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc/validate.go:240
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate.func2
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:77
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:165
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:72
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree.Catalog.Validate
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree/catalog.go:144
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*kvDescriptors).getAllDescriptors
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/kv_descriptors.go:279
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
| | | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:284
| | | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal
| | | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2403
| | | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescAllWithTableLookup
| | | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2336
| | | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescAll
| | | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2315
| | | | | github.com/cockroachdb/cockroach/pkg/sql.glob..func51.1
| | | | | github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:5295
| | | | | github.com/cockroachdb/cockroach/pkg/sql.setupGenerator.func3
| | | | | github.com/cockroachdb/cockroach/pkg/sql/virtual_table.go:127
| | | | | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
| | | | | github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:494
| | | | | runtime.goexit
| | | | | GOROOT/src/runtime/asm_amd64.s:1581
| | | | Wraps: (6) origin table × (1045) is dropped
| | | | Error types: (1) *telemetrykeys.withTelemetry (2) *withstack.withStack (3) *errutil.withPrefix (4) *assert.withAssertionFailure (5) *withstack.withStack (6) *errutil.leafError
| | | Wraps: (2) keys: [sql.schema.validation_errors.read.cross_references.relation]
| | | 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:214
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:149
| | | | [...repeated from below...]
| | | Wraps: (4) relation × (202)
| | | Wraps: (5) assertion failure
| | | Wraps: (6) attached stack trace
| | | -- stack trace:
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*wrapper).validateInboundFK
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc/validate.go:385
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*wrapper).ValidateCrossReferences
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc/validate.go:240
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate.func2
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:77
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:165
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:72
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree.Catalog.Validate
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree/catalog.go:144
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*kvDescriptors).getAllDescriptors
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/kv_descriptors.go:279
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
| | | | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:284
| | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal
| | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2403
| | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescAllWithTableLookup
| | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2336
| | | | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescAll
| | | | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2315
| | | | github.com/cockroachdb/cockroach/pkg/sql.glob..func51.1
| | | | github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:5295
| | | | github.com/cockroachdb/cockroach/pkg/sql.setupGenerator.func3
| | | | github.com/cockroachdb/cockroach/pkg/sql/virtual_table.go:127
| | | | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
| | | | github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:494
| | | | runtime.goexit
| | | | GOROOT...

Stacktrace (expand for inline code snippets):

case catalog.Type:
err = errors.Wrapf(err, catalog.Type+" %q (%d)", name, id)
default:
in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).decorate
}
vea.errors = append(vea.errors, vea.decorate(err))
}
in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
if tableDesc.Dropped() {
vea.Report(errors.AssertionFailedf(
"referencing table %d was dropped without dependency unlinking", id))
in pkg/sql/catalog/typedesc.(*immutable).ValidateCrossReferences
if !desc.Dropped() {
desc.ValidateCrossReferences(&vea, vdg)
}
in pkg/sql/catalog/internal/validate.Validate.func2
vea.currentDescriptor = desc
validationFn(desc)
}
in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
// Descriptor cross-reference checks.
if !vea.validateDescriptorsAtLevel(
catalog.ValidationLevelCrossReferences,
in pkg/sql/catalog/internal/validate.Validate
) (ve catalog.ValidationErrors) {
return validate.Validate(ctx, version, c, telemetry, targetLevel, descriptors...)
}
in pkg/sql/catalog/nstree.Catalog.Validate
descs := c.OrderedDescriptors()
ve := c.Validate(ctx, version, catalog.ValidationReadTelemetry, catalog.ValidationLevelCrossReferences, descs...)
if err := ve.CombinedError(); err != nil {
in pkg/sql/catalog/descs.(*kvDescriptors).getAllDescriptors
func (tc *Collection) GetAllDescriptors(ctx context.Context, txn *kv.Txn) (nstree.Catalog, error) {
return tc.kv.getAllDescriptors(ctx, txn, tc.version)
}
in pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
) error {
all, err := p.Descriptors().GetAllDescriptors(ctx, p.txn)
if err != nil {
in pkg/sql.forEachTableDescWithTableLookupInternal
) error {
return forEachTableDescWithTableLookupInternal(
ctx, p, dbContext, virtualOpts, true /* allowAdding */, fn,
in pkg/sql.forEachTableDescAllWithTableLookup
) error {
return forEachTableDescAllWithTableLookup(ctx, p, dbContext, virtualOpts, func(
db catalog.DatabaseDescriptor,
in pkg/sql.forEachTableDescAll
worker := func(ctx context.Context, pusher rowPusher) error {
return forEachTableDescAll(ctx, p, dbContext, hideVirtual,
func(db catalog.DatabaseDescriptor, _ string, table catalog.TableDescriptor) error {
in pkg/sql.glob..func51.1
}
err := worker(ctx, funcRowPusher(addRow))
// If the query was canceled, next() will already return a
in pkg/sql.setupGenerator.func3
f(ctx)
}()
in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
GOROOT/src/runtime/asm_amd64.s#L1580-L1582 in runtime.goexit

pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).decorate at line 220
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report at line 149
pkg/sql/catalog/typedesc/type_desc.go in pkg/sql/catalog/typedesc.(*immutable).ValidateCrossReferences at line 689
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate.func2 at line 77
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel at line 165
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate at line 72
pkg/sql/catalog/nstree/catalog.go in pkg/sql/catalog/nstree.Catalog.Validate at line 144
pkg/sql/catalog/descs/kv_descriptors.go in pkg/sql/catalog/descs.(*kvDescriptors).getAllDescriptors at line 279
pkg/sql/catalog/descs/collection.go in pkg/sql/catalog/descs.(*Collection).GetAllDescriptors at line 284
pkg/sql/information_schema.go in pkg/sql.forEachTableDescWithTableLookupInternal at line 2403
pkg/sql/information_schema.go in pkg/sql.forEachTableDescAllWithTableLookup at line 2336
pkg/sql/information_schema.go in pkg/sql.forEachTableDescAll at line 2315
pkg/sql/crdb_internal.go in pkg/sql.glob..func51.1 at line 5295
pkg/sql/virtual_table.go in pkg/sql.setupGenerator.func3 at line 127
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 494
GOROOT/src/runtime/asm_amd64.s in runtime.goexit at line 1581
Tag Value
Cockroach Release v22.1.9
Cockroach SHA: e438c2f
Platform linux amd64
Distribution CCL
Environment v22.1.9
Command server
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-21330

@cockroach-teamcity cockroach-teamcity added 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 Nov 9, 2022
@yuzefovich
Copy link
Member

dup of #91645

@exalate-issue-sync exalate-issue-sync bot changed the title sentry: type_desc.go:689: type × (184): referencing table 1045 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.cross_references.type sql.schema.validation_errors.read.cro... sentry: type_desc.go:689: type × (184): referencing table 1045 was dropped without dependency unlinking (1) keys: [sql.schema.validation_errors.read.cross_references.type sql.schema.validation_errors.read.cro... Nov 16, 2022
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