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 × (4139): referencing × 4248 was dropped without dependency unlinking (1) Wraps: (2) keys: [sql.schema.validation_errors.read.backward_references.type sql.schema.validation_erro... #100464

Closed
cockroach-teamcity opened this issue Apr 3, 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-teamcity
Copy link
Member

cockroach-teamcity commented Apr 3, 2023

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

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

Panic message:

type_desc.go:701: type × (4139): referencing × 4248 was dropped without dependency unlinking
(1)
Wraps: (2) keys: [sql.schema.validation_errors.read.backward_references.type sql.schema.validation_errors.read.backward_references.type]
Wraps: (3) secondary error attachment
| type × (4140): referencing × 4248 was dropped without dependency unlinking
| (1) keys: [sql.schema.validation_errors.read.backward_references.type]
| 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:244
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:173
| | [...repeated from below...]
| Wraps: (3) type × (4140)
| Wraps: (4) assertion failure
| Wraps: (5) 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:101
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:189
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:96
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).Validate
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/validate.go:35
| | 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).getDescriptorsByID
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:104
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
| | github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:452
| | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal
| | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2535
| | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookup
| | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2485
| | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDesc
| | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2413
| | github.com/cockroachdb/cockroach/pkg/sql.populateTablePrivileges
| | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:1382
| | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
| | github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:613
| | 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:489
| | runtime.goexit
| | GOROOT/src/runtime/asm_amd64.s:1594
| Wraps: (6) referencing × 4248 was dropped without dependency unlinking
| Error types: (1) *telemetrykeys.withTelemetry (2) *withstack.withStack (3) *errutil.withPrefix (4) *assert.withAssertionFailure (5) *withstack.withStack (6) *errutil.leafError
Wraps: (4) keys: [sql.schema.validation_errors.read.backward_references.type]
Wraps: (5) 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:244
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:173
| [...repeated from below...]
Wraps: (6) type × (4139)
Wraps: (7) assertion failure
Wraps: (8) 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:101
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:189
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate.Validate
| github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/validate/validate.go:96
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).Validate
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/validate.go:35
| 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).getDescriptorsByID
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/descriptor.go:104
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:452
| github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal
| github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2535
| github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookup
| github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2485
| github.com/cockroachdb/cockroach/pkg/sql.forEachTableDesc
| github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2413
| github.com/cockroachdb/cockroach/pkg/sql.populateTablePrivileges
| github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:1382
| github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
| github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:613
| 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:489
| runtime.goexit
| GOROOT/src/runtime/asm_amd64.s:1594
Wraps: (9) referencing × 4248 was dropped without dependency unlinking
Error types: (1) *colexecerror.notInternalError (2) *telemetrykeys.withTelemetry (3) *secondary.withSecondaryError (4) *telemetrykeys.withTelemetry (5) *withstack.withStack (6) *errutil.withPrefix (7) *assert.withAssertionFailure (8) *withstack.withStack (9) *errutil.leafError
-- report composition:
*errutil.leafError: referencing × 4248 was dropped without dependency unlinking
type_desc.go:701: *withstack.withStack (top exception)
*assert.withAssertionFailure
*errutil.withPrefix: type × (4139)
validate.go:244: *withstack.withStack (1)
*telemetrykeys.withTelemetry: sql.schema.validation_errors.read.backward_references.type
*secondary.withSecondaryError: details for github.com/cockroachdb/errors/telemetrykeys/*telemetrykeys.withTelemetry:::
*telemetrykeys.withTelemetry: sql.schema.validation_errors.read.backward_references.type
*colexecerror.notInternalError
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

case catalog.Type:
err = errors.Wrapf(err, string(catalog.Type)+" %q (%d)", name, id)
case catalog.Function:
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 depDesc.Dropped() {
vea.Report(errors.AssertionFailedf(
"referencing %s %d was dropped without dependency unlinking", depDesc.DescriptorType(), id))
in pkg/sql/catalog/typedesc.(*immutable).ValidateBackReferences
if !desc.Dropped() {
desc.ValidateBackReferences(&vea, vdg)
}
in pkg/sql/catalog/internal/validate.Validate.func3
vea.currentDescriptor = desc
validationFn(desc)
}
in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel
// Descriptor backward-reference checks.
if !vea.validateDescriptorsAtLevel(
catalog.ValidationLevelBackReferences,
in pkg/sql/catalog/internal/validate.Validate
version := tc.settings.Version.ActiveVersion(ctx)
return validate.Validate(
ctx,
in pkg/sql/catalog/descs.(*Collection).Validate
if len(toValidate) > 0 {
if err := tc.Validate(ctx, txn, catalog.ValidationReadTelemetry, requiredLevel, toValidate...); err != nil {
return err
in pkg/sql/catalog/descs.(*Collection).finalizeDescriptors
// 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
in pkg/sql/catalog/descs.getDescriptorsByID
descs := make([]catalog.Descriptor, len(ids))
if err := getDescriptorsByID(
ctx, tc, txn, flags, descs, ids...,
in pkg/sql/catalog/descs.(*Collection).getDescriptorsByID
// getDescriptorsByID must be used to ensure proper validation hydration etc.
descs, err := tc.getDescriptorsByID(ctx, txn, flags, ids.Ordered()...)
if err != nil {
in pkg/sql/catalog/descs.(*Collection).GetAllDescriptors
} else {
all, err = p.Descriptors().GetAllDescriptors(ctx, p.txn)
}
in pkg/sql.forEachTableDescWithTableLookupInternal
) error {
return forEachTableDescWithTableLookupInternal(
ctx, p, dbContext, virtualOpts, false /* allowAdding */, fn,
in pkg/sql.forEachTableDescWithTableLookup
) error {
return forEachTableDescWithTableLookup(ctx, p, dbContext, virtualOpts, func(
db catalog.DatabaseDescriptor,
in pkg/sql.forEachTableDesc
) error {
return forEachTableDesc(ctx, p, dbContext, virtualMany,
func(db catalog.DatabaseDescriptor, scName string, table catalog.TableDescriptor) error {
in pkg/sql.populateTablePrivileges
generator, cleanup, setupError := setupGenerator(ctx, func(ctx context.Context, pusher rowPusher) error {
return def.populate(ctx, p, dbDesc, func(row ...tree.Datum) error {
if err := e.validateRow(row, columns); err != nil {
in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
}
err := worker(ctx, funcRowPusher(addRow))
// If the query was canceled, next() will already return a
in pkg/sql.setupGenerator.func3
sp.UpdateGoroutineIDToCurrent()
f(ctx)
}()
in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
GOROOT/src/runtime/asm_amd64.s#L1593-L1595 in runtime.goexit

pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).decorate at line 244
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).Report at line 173
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.Validate.func3 at line 101
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.(*validationErrorAccumulator).validateDescriptorsAtLevel at line 189
pkg/sql/catalog/internal/validate/validate.go in pkg/sql/catalog/internal/validate.Validate at line 96
pkg/sql/catalog/descs/validate.go in pkg/sql/catalog/descs.(*Collection).Validate at line 35
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.(*Collection).finalizeDescriptors at line 566
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).getDescriptorsByID at line 104
pkg/sql/catalog/descs/collection.go in pkg/sql/catalog/descs.(*Collection).GetAllDescriptors at line 452
pkg/sql/information_schema.go in pkg/sql.forEachTableDescWithTableLookupInternal at line 2535
pkg/sql/information_schema.go in pkg/sql.forEachTableDescWithTableLookup at line 2485
pkg/sql/information_schema.go in pkg/sql.forEachTableDesc at line 2413
pkg/sql/information_schema.go in pkg/sql.populateTablePrivileges at line 1382
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 at line 613
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 489
GOROOT/src/runtime/asm_amd64.s in runtime.goexit at line 1594
Tag Value
Cockroach Release v22.2.7
Cockroach SHA: cbe3397
Platform linux amd64
Distribution CCL
Environment v22.2.7
Command mt start-sql
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-26450

@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 Apr 3, 2023
@yuzefovich
Copy link
Member

dup of #91645

@exalate-issue-sync exalate-issue-sync bot changed the title sentry: type_desc.go:701: type × (4139): referencing × 4248 was dropped without dependency unlinking (1) Wraps: (2) keys: [sql.schema.validation_errors.read.backward_references.type sql.schema.validation_erro... sentry: type_desc.go:701: type × (4139): referencing × 4248 was dropped without dependency unlinking (1) Wraps: (2) keys: [sql.schema.validation_errors.read.backward_references.type sql.schema.validation_erro... Apr 4, 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