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: structured.go:1635: missing fk forward reference × to × from × (un-upgraded foreign key references present) -- *errutil.leafError: missing fk forward reference × to × from × (un-upgraded foreign key references present) (1) structured.go:1635: *withstack.withStack (top exception) *assert.withAssertionFailure (check the extra data payloads) #59814

Closed
cockroach-teamcity opened this issue Feb 4, 2021 · 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

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/2199499654/?referrer=webhooks_plugin

Panic message:

structured.go:1635: missing fk forward reference × to × from × (un-upgraded foreign key references present)
--
*errutil.leafError: missing fk forward reference × to × from × (un-upgraded foreign key references present) (1)
structured.go:1635: *withstack.withStack (top exception)
*assert.withAssertionFailure
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

if unupgradedFKsPresent {
return errors.AssertionFailedf("missing fk forward reference %q to %q from %q "+
"(un-upgraded foreign key references present)",
in pkg/sql/catalog/tabledesc.(*Immutable).validateCrossReferences
}
return desc.validateCrossReferences(ctx, dg)
}
in pkg/sql/catalog/tabledesc.(*Immutable).Validate
}
if err := immTable.Validate(ctx, dg); err != nil {
return nil, err
in pkg/sql/catalog/catalogkv.unwrapDescriptor
} else {
desc, err = unwrapDescriptor(ctx, dg, ts, raw)
}
in pkg/sql/catalog/catalogkv.GetDescriptorByID
// checks when populating pre-19.2 foreign keys.
desc, err := catalogkv.GetDescriptorByID(ctx, txn, s.codec, id, catalogkv.Immutable,
catalogkv.AnyDescriptorKind, true /* required */)
in pkg/sql/catalog/lease.storage.acquire.func1

cockroach/pkg/kv/db.go

Lines 706 to 708 in 92d9495

err := txn.exec(ctx, func(ctx context.Context, txn *Txn) error {
return retryable(ctx, txn)
})
in pkg/kv.(*DB).Txn.func1

cockroach/pkg/kv/txn.go

Lines 810 to 812 in 92d9495

}
err = fn(ctx, txn)
in pkg/kv.(*Txn).exec

cockroach/pkg/kv/db.go

Lines 705 to 707 in 92d9495

txn.SetDebugName("unnamed")
err := txn.exec(ctx, func(ctx context.Context, txn *Txn) error {
return retryable(ctx, txn)
in pkg/kv.(*DB).Txn
var descVersionState *descriptorVersionState
err := s.db.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error {
// Run the descriptor read as high-priority, thereby pushing any intents out
in pkg/sql/catalog/lease.storage.acquire
}
desc, err := m.storage.acquire(newCtx, minExpiration, id)
if err != nil {
in pkg/sql/catalog/lease.acquireNodeLease.func1
func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
c.val, c.err = fn()
c.wg.Done()
in pkg/util/syncutil/singleflight.(*Group).doCall
/usr/local/go/src/runtime/asm_amd64.s#L1356-L1358 in runtime.goexit

pkg/sql/catalog/tabledesc/structured.go in pkg/sql/catalog/tabledesc.(*Immutable).validateCrossReferences at line 1635
pkg/sql/catalog/tabledesc/structured.go in pkg/sql/catalog/tabledesc.(*Immutable).Validate at line 1440
pkg/sql/catalog/catalogkv/catalogkv.go in pkg/sql/catalog/catalogkv.unwrapDescriptor at line 298
pkg/sql/catalog/catalogkv/catalogkv.go in pkg/sql/catalog/catalogkv.GetDescriptorByID at line 160
pkg/sql/catalog/lease/lease.go in pkg/sql/catalog/lease.storage.acquire.func1 at line 215
pkg/kv/db.go in pkg/kv.(*DB).Txn.func1 at line 707
pkg/kv/txn.go in pkg/kv.(*Txn).exec at line 811
pkg/kv/db.go in pkg/kv.(*DB).Txn at line 706
pkg/sql/catalog/lease/lease.go in pkg/sql/catalog/lease.storage.acquire at line 193
pkg/sql/catalog/lease/lease.go in pkg/sql/catalog/lease.acquireNodeLease.func1 at line 858
pkg/util/syncutil/singleflight/singleflight.go in pkg/util/syncutil/singleflight.(*Group).doCall at line 128
/usr/local/go/src/runtime/asm_amd64.s in runtime.goexit at line 1357
Tag Value
Cockroach Release v20.2.2
Cockroach SHA: 92d9495
Platform darwin amd64
Distribution CCL
Environment v20.2.2
Command start-single-node
Go Version ``
# of CPUs
# of Goroutines
@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 Feb 4, 2021
@yuzefovich
Copy link
Member

dup of #57032

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