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: errors.go:91: ×: referenced descriptor ID 1938: looking up ID 1938: descriptor not found (1) Wraps: (2) candidate pg code: XX000 Wraps: (3) attached stack trace -- stack trace: | github.c... #128925

Closed
cockroach-sentry opened this issue Aug 13, 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Aug 13, 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/5709756978/?referrer=webhooks_plugin

Panic Message:

errors.go:91: ×: referenced descriptor ID 1938: looking up ID 1938: descriptor not found
(1)
Wraps: (2) candidate pg code: XX000
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql.init.func19.1
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1469
  | github.com/cockroachdb/cockroach/pkg/sql.init.func19
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1587
  | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
  | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:661
  | 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:485
Wraps: (4) ×
Wraps: (5) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.wrapError
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:173
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.processDescriptorResultRow
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:116
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.query
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:75
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogReader.GetByIDs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader.go:285
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.(*cachedCatalogReader).GetByIDs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader_cached.go:352
  | 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.ByIDGetter.Descs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/getters.go:39
  | github.com/cockroachdb/cockroach/pkg/sql.init.func19
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1585
  | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
  | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:661
  | 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:485
Wraps: (6) referenced descriptor ID 1938
Wraps: (7) secondary error attachment
  | failed to find descriptor [1938]
  | (1) attached stack trace
  |   -- stack trace:
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.requiredError
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:215
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.build
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:187
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.processDescriptorResultRow
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:114
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.query
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:75
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogReader.GetByIDs
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader.go:285
  |   | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.(*cachedCatalogReader).GetByIDs
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader_cached.go:352
  |   | 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.ByIDGetter.Descs
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/getters.go:39
  |   | github.com/cockroachdb/cockroach/pkg/sql.init.func19
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1585
  |   | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
  |   | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:661
  |   | 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:485
  |   | runtime.goexit
  |   | 	src/runtime/asm_arm64.s:1222
  | Wraps: (2) failed to find descriptor [1938]
  | Error types: (1) *withstack.withStack (2) *errutil.leafError
Wraps: (8) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/catalog.NewDescriptorNotFoundError
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/errors.go:94
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.requiredError
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:217
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.build
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:187
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.processDescriptorResultRow
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:114
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogQuery.query
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_query.go:75
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.catalogReader.GetByIDs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader.go:285
  | github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv.(*cachedCatalogReader).GetByIDs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/internal/catkv/catalog_reader_cached.go:352
  | 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.ByIDGetter.Descs
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/getters.go:39
  | github.com/cockroachdb/cockroach/pkg/sql.init.func19
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1585
  | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1
  | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:661
  | github.com/cockroachdb/cockroach/pkg/sql.setupGenerator.func3
  | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_table.go:127
  | [...repeated from below...]
Wraps: (9) looking up ID 1938
Wraps: (10) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/catalog.init
  | 	github.com/cockroachdb/cockroach/pkg/sql/catalog/errors.go:91
  | runtime.doInit1
  | 	GOROOT/src/runtime/proc.go:7206
  | runtime.doInit
  | 	GOROOT/src/runtime/proc.go:7173
  | runtime.main
  | 	GOROOT/src/runtime/proc.go:253
  | runtime.goexit
  | 	src/runtime/asm_arm64.s:1222
Wraps: (11) descriptor not found
Error types: (1) *colexecerror.notInternalError (2) *pgerror.withCandidateCode (3) *withstack.withStack (4) *errutil.withPrefix (5) *withstack.withStack (6) *errutil.withPrefix (7) *secondary.withSecondaryError (8) *withstack.withStack (9) *errutil.withPrefix (10) *withstack.withStack (11) *errutil.leafError
-- report composition:
*errutil.leafError: descriptor not found
errors.go:91: *withstack.withStack (top exception)
*errutil.withPrefix: looking up ID 1938
errors.go:94: *withstack.withStack (1)
*secondary.withSecondaryError: details for github.com/cockroachdb/errors/withstack...
Stacktrace (expand for inline code snippets):

src/runtime/asm_arm64.s#L1221-L1223

sp.UpdateGoroutineIDToCurrent()
f(ctx)
}()

}
err := worker(ctx, funcRowPusher(addRow))
// Notify that we are done sending rows.

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 {

if err != nil {
return err
}

defer func() {
err = pgerror.Wrap(err, pgcode.Internal, "internal pts table")
}()

src/runtime/asm_arm64.s#L1221-L1223
sp.UpdateGoroutineIDToCurrent()
f(ctx)
}()

}
err := worker(ctx, funcRowPusher(addRow))
// Notify that we are done sending rows.

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 {

// the number of ranges.
descs, err := p.Descriptors().ByIDWithLeased(p.InternalSQLTxn().KV()).Get().Descs(ctx, t.SchemaObjects.IDs)
if err != nil {

ret := make([]catalog.Descriptor, len(ids))
if err := getDescriptorsByID(ctx, g.Descriptors(), g.KV(), g.flags, ret, ids...); err != nil {
return nil, err

const isDescriptorRequired = true
read, err := tc.cr.GetByIDs(ctx, txn, readIDs.Ordered(), isDescriptorRequired, catalog.Any)
if err != nil {

uncachedIDs := ids[:numUncached]
read, err := c.cr.GetByIDs(ctx, txn, uncachedIDs, isDescriptorRequired, expectedType)
if err != nil {

err := cq.query(ctx, txn, &mc, func(codec keys.SQLCodec, b *kv.Batch) {
// Attempt to generate a optimal set of requests by extracting

case keys.DescriptorTableID:
err = cq.processDescriptorResultRow(row, out)
case keys.CommentsTableID:

if err != nil {
return wrapError(expectedType, id, err)
}

}
return errors.Wrapf(err, "referenced descriptor ID %d", id)
}

src/runtime/asm_arm64.s#L1221-L1223
sp.UpdateGoroutineIDToCurrent()
f(ctx)
}()

}
err := worker(ctx, funcRowPusher(addRow))
// Notify that we are done sending rows.

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 {

// the number of ranges.
descs, err := p.Descriptors().ByIDWithLeased(p.InternalSQLTxn().KV()).Get().Descs(ctx, t.SchemaObjects.IDs)
if err != nil {

ret := make([]catalog.Descriptor, len(ids))
if err := getDescriptorsByID(ctx, g.Descriptors(), g.KV(), g.flags, ret, ids...); err != nil {
return nil, err

const isDescriptorRequired = true
read, err := tc.cr.GetByIDs(ctx, txn, readIDs.Ordered(), isDescriptorRequired, catalog.Any)
if err != nil {

uncachedIDs := ids[:numUncached]
read, err := c.cr.GetByIDs(ctx, txn, uncachedIDs, isDescriptorRequired, expectedType)
if err != nil {

err := cq.query(ctx, txn, &mc, func(codec keys.SQLCodec, b *kv.Batch) {
// Attempt to generate a optimal set of requests by extracting

case keys.DescriptorTableID:
err = cq.processDescriptorResultRow(row, out)
case keys.CommentsTableID:

}
desc, err := build(expectedType, id, row.Value, cq.isDescriptorRequired)
if err != nil {

if isRequired {
return nil, requiredError(expectedType, id)
}

}
return errors.CombineErrors(catalog.NewDescriptorNotFoundError(id), err)
}

func NewDescriptorNotFoundError(id descpb.ID) error {
return errors.Wrapf(ErrDescriptorNotFound, "looking up ID %d", errors.Safe(id))
}

src/runtime/asm_arm64.s#L1221-L1223
GOROOT/src/runtime/proc.go#L252-L254
GOROOT/src/runtime/proc.go#L7172-L7174
GOROOT/src/runtime/proc.go#L7205-L7207
// found with the given id.
var ErrDescriptorNotFound = errors.New("descriptor not found")

src/runtime/asm_arm64.s in runtime.goexit at line 1222
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 485
pkg/sql/virtual_table.go in pkg/sql.setupGenerator.func3 at line 127
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 at line 661
pkg/sql/crdb_internal.go in pkg/sql.init.func19 at line 1587
pkg/sql/crdb_internal.go in pkg/sql.init.func19.1 at line 1469
src/runtime/asm_arm64.s in runtime.goexit at line 1222
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 485
pkg/sql/virtual_table.go in pkg/sql.setupGenerator.func3 at line 127
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 at line 661
pkg/sql/crdb_internal.go in pkg/sql.init.func19 at line 1585
pkg/sql/catalog/descs/getters.go in pkg/sql/catalog/descs.ByIDGetter.Descs at line 39
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 207
pkg/sql/catalog/internal/catkv/catalog_reader_cached.go in pkg/sql/catalog/internal/catkv.(*cachedCatalogReader).GetByIDs at line 352
pkg/sql/catalog/internal/catkv/catalog_reader.go in pkg/sql/catalog/internal/catkv.catalogReader.GetByIDs at line 285
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.catalogQuery.query at line 75
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.catalogQuery.processDescriptorResultRow at line 116
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.wrapError at line 173
src/runtime/asm_arm64.s in runtime.goexit at line 1222
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 485
pkg/sql/virtual_table.go in pkg/sql.setupGenerator.func3 at line 127
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 at line 661
pkg/sql/crdb_internal.go in pkg/sql.init.func19 at line 1585
pkg/sql/catalog/descs/getters.go in pkg/sql/catalog/descs.ByIDGetter.Descs at line 39
pkg/sql/catalog/descs/descriptor.go in pkg/sql/catalog/descs.getDescriptorsByID at line 207
pkg/sql/catalog/internal/catkv/catalog_reader_cached.go in pkg/sql/catalog/internal/catkv.(*cachedCatalogReader).GetByIDs at line 352
pkg/sql/catalog/internal/catkv/catalog_reader.go in pkg/sql/catalog/internal/catkv.catalogReader.GetByIDs at line 285
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.catalogQuery.query at line 75
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.catalogQuery.processDescriptorResultRow at line 114
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.build at line 187
pkg/sql/catalog/internal/catkv/catalog_query.go in pkg/sql/catalog/internal/catkv.requiredError at line 217
pkg/sql/catalog/errors.go in pkg/sql/catalog.NewDescriptorNotFoundError at line 94
src/runtime/asm_arm64.s in runtime.goexit at line 1222
GOROOT/src/runtime/proc.go in runtime.main at line 253
GOROOT/src/runtime/proc.go in runtime.doInit at line 7173
GOROOT/src/runtime/proc.go in runtime.doInit1 at line 7206
pkg/sql/catalog/errors.go in pkg/sql/catalog.init at line 91

Tags

Tag Value
Command server
Environment v24.1.3
Go Version go1.22.5 X:nocoverageredesign
Platform linux arm64
Distribution CCL
Cockroach Release v24.1.3
Cockroach SHA 9e10212
# of CPUs 32
# of Goroutines 2773

Jira issue: CRDB-41283

@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 13, 2024
@yuzefovich yuzefovich added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner labels Nov 13, 2024
@yuzefovich
Copy link
Member

dup of #105257

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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

No branches or pull requests

2 participants