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 191: looking up ID 191: descriptor not found (1) Wraps: (2) candidate pg code: XX000 Wraps: (3) attached stack trace -- stack trace: | github.com... #128485

Closed
cockroach-sentry opened this issue Aug 7, 2024 · 1 comment
Labels
branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 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 7, 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/5687957345/?referrer=webhooks_plugin

Panic Message:

errors.go:91: ×: referenced descriptor ID 191: looking up ID 191: descriptor not found
(1)
Wraps: (2) candidate pg code: XX000
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql.glob..func41.1
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:1469
  | github.com/cockroachdb/cockroach/pkg/sql.glob..func41
  | 	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:682
  | 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:484
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.glob..func41
  | 	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:682
  | 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:484
Wraps: (6) referenced descriptor ID 191
Wraps: (7) secondary error attachment
  | failed to find descriptor [191]
  | (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.glob..func41
  |   | 	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:682
  |   | 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:484
  |   | runtime.goexit
  |   | 	src/runtime/asm_arm64.s:1197
  | Wraps: (2) failed to find descriptor [191]
  | 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.glob..func41
  | 	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:682
  | 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 191
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:6752
  | runtime.doInit
  | 	GOROOT/src/runtime/proc.go:6719
  | runtime.main
  | 	GOROOT/src/runtime/proc.go:249
  | runtime.goexit
  | 	src/runtime/asm_arm64.s:1197
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 191
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#L1196-L1198

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#L1196-L1198
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#L1196-L1198
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#L1196-L1198
GOROOT/src/runtime/proc.go#L248-L250
GOROOT/src/runtime/proc.go#L6718-L6720
GOROOT/src/runtime/proc.go#L6751-L6753
// found with the given id.
var ErrDescriptorNotFound = errors.New("descriptor not found")

src/runtime/asm_arm64.s in runtime.goexit at line 1197
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 484
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 682
pkg/sql/crdb_internal.go in pkg/sql.glob..func41 at line 1587
pkg/sql/crdb_internal.go in pkg/sql.glob..func41.1 at line 1469
src/runtime/asm_arm64.s in runtime.goexit at line 1197
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 484
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 682
pkg/sql/crdb_internal.go in pkg/sql.glob..func41 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 1197
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 484
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 682
pkg/sql/crdb_internal.go in pkg/sql.glob..func41 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 1197
GOROOT/src/runtime/proc.go in runtime.main at line 249
GOROOT/src/runtime/proc.go in runtime.doInit at line 6719
GOROOT/src/runtime/proc.go in runtime.doInit1 at line 6752
pkg/sql/catalog/errors.go in pkg/sql/catalog.init at line 91

Tags

Tag Value
Command server
Environment v23.2.8
Go Version go1.21.10 X:nocoverageredesign
Platform linux arm64
Distribution CCL
Cockroach Release v23.2.8
Cockroach SHA e003de1
# of CPUs 32
# of Goroutines 56059

Jira issue: CRDB-41033

@cockroach-sentry cockroach-sentry added branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 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 7, 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-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 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