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: panic.go:1038: panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0 (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:1038 | github.c... #97825

Closed
cockroach-teamcity opened this issue Mar 1, 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 Mar 1, 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/3964991519/?referrer=webhooks_plugin

Panic message:

panic.go:1038: panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0
(1) attached stack trace
-- stack trace:
| runtime.gopanic
| GOROOT/src/runtime/panic.go:1038
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send.func1
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/store_send.go:95
| runtime.gopanic
| GOROOT/src/runtime/panic.go:1047
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/tscache.(*intervalSkl).AddRange
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/tscache/interval_skl.go:263
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/tscache.(*sklImpl).Add
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/tscache/skl_impl.go:57
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).addToTSCacheChecked
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go:68
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).updateTimestampCache.func1
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go:82
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).updateTimestampCache
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go:218
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*endCmds).done
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go:1200
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).executeReadOnlyBatch
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_read.go:149
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).executeBatchWithConcurrencyRetries
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go:478
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).sendWithoutRangeID
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go:170
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).Send
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go:100
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/store_send.go:197
| github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).Send
| github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/stores.go:191
| github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal.func1
| github.com/cockroachdb/cockroach/pkg/server/node.go:1006
| github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr
| github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344
| github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal
| github.com/cockroachdb/cockroach/pkg/server/node.go:989
| github.com/cockroachdb/cockroach/pkg/server.(*Node).Batch
| github.com/cockroachdb/cockroach/pkg/server/node.go:1058
| github.com/cockroachdb/cockroach/pkg/roachpb.Internal_Batch_Handler.func1
| github.com/cockroachdb/cockroach/pkg/roachpb/bazel-out/k8-opt/bin/pkg/roachpb/roachpb_go_proto
/github.com/cockroachdb/cockroach/pkg/roachpb/api.pb.go:9490
| github.com/cockroachdb/cockroach/pkg/util/tracing.ServerInterceptor.func1
| github.com/cockroachdb/cockroach/pkg/util/tracing/grpc_interceptor.go:136
| google.golang.org/grpc.chainUnaryInterceptors.func1.1
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1116
| github.com/cockroachdb/cockroach/pkg/rpc.NewServer.func3
| github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:238
| google.golang.org/grpc.chainUnaryInterceptors.func1.1
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1119
| github.com/cockroachdb/cockroach/pkg/rpc.NewServer.func1.1
| github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:207
| github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr
| github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344
| github.com/cockroachdb/cockroach/pkg/rpc.NewServer.func1
| github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:205
| google.golang.org/grpc.chainUnaryInterceptors.func1.1
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1119
| google.golang.org/grpc.chainUnaryInterceptors.func1
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1121
| github.com/cockroachdb/cockroach/pkg/roachpb.Internal_Batch_Handler
| github.com/cockroachdb/cockroach/pkg/roachpb/bazel-out/k8-opt/bin/pkg/roachpb/roachpb_go_proto
/github.com/cockroachdb/cockroach/pkg/roachpb/api.pb.go:9492
| google.golang.org/grpc.(*Server).processUnaryRPC
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1282
| google.golang.org/grpc.(*Server).handleStream
| google.golang.org/grpc/external/org_golang_google_grpc/server.go:1616
Wraps: (2) panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0
Error types: (1) *withstack.withStack (2) *errutil.leafError
-- report composition:
*errutil.leafError: panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0
panic.go:1038: *withstack.withStack (top exception)

Stacktrace (expand for inline code snippets):

GOROOT/src/runtime/panic.go#L1037-L1039 in runtime.gopanic
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/store_send.go#L94-L96 in pkg/kv/kvserver.(*Store).Send.func1
GOROOT/src/runtime/panic.go#L1046-L1048 in runtime.gopanic

log.Errorf(context.Background(), "%s, [%s,%s)", msg, from, to)
panic(redact.Safe(msg))
case cmp == 0:
in pkg/kv/kvserver/tscache.(*intervalSkl).AddRange
} else {
tc.cache.AddRange(nonNil(start), end, excludeTo, val)
}
in pkg/kv/kvserver/tscache.(*sklImpl).Add
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go#L67-L69 in pkg/kv/kvserver.(*Replica).addToTSCacheChecked
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go#L81-L83 in pkg/kv/kvserver.(*Replica).updateTimestampCache.func1
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go#L217-L219 in pkg/kv/kvserver.(*Replica).updateTimestampCache
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go#L1199-L1201 in pkg/kv/kvserver.(*endCmds).done
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_read.go#L148-L150 in pkg/kv/kvserver.(*Replica).executeReadOnlyBatch
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go#L477-L479 in pkg/kv/kvserver.(*Replica).executeBatchWithConcurrencyRetries
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go#L169-L171 in pkg/kv/kvserver.(*Replica).sendWithoutRangeID
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go#L99-L101 in pkg/kv/kvserver.(*Replica).Send
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/store_send.go#L196-L198 in pkg/kv/kvserver.(*Store).Send
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/kv/kvserver/pkg/kv/kvserver/stores.go#L190-L192 in pkg/kv/kvserver.(*Stores).Send

cockroach/pkg/server/node.go

Lines 1005 to 1007 in a30a663

var pErr *roachpb.Error
br, pErr = n.stores.Send(ctx, *args)
if pErr != nil {
in pkg/server.(*Node).batchInternal.func1
return f(ctx)
}
in pkg/util/stop.(*Stopper).RunTaskWithErr
var br *roachpb.BatchResponse
if err := n.stopper.RunTaskWithErr(ctx, "node.Node: batch", func(ctx context.Context) error {
var reqSp spanForRequest
in pkg/server.(*Node).batchInternal

cockroach/pkg/server/node.go

Lines 1057 to 1059 in a30a663

br, err := n.batchInternal(ctx, tenantID, args)
in pkg/server.(*Node).Batch
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/roachpb/api.pb.go#L9489-L9491 in pkg/roachpb._Internal_Batch_Handler.func1
if methodExcludedFromTracing(info.FullMethod) {
return handler(ctx, req)
}
in pkg/util/tracing.ServerInterceptor.func1
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1115-L1117 in google.golang.org/grpc.chainUnaryInterceptors.func1.1
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/rpc/pkg/rpc/context.go#L237-L239 in pkg/rpc.NewServer.func3
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1118-L1120 in google.golang.org/grpc.chainUnaryInterceptors.func1.1
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/rpc/pkg/rpc/context.go#L206-L208 in pkg/rpc.NewServer.func1.1
return f(ctx)
}
in pkg/util/stop.(*Stopper).RunTaskWithErr
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/rpc/pkg/rpc/context.go#L204-L206 in pkg/rpc.NewServer.func1
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1118-L1120 in google.golang.org/grpc.chainUnaryInterceptors.func1.1
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1120-L1122 in google.golang.org/grpc.chainUnaryInterceptors.func1
https://github.com/cockroachdb/cockroach/blob/a30a663cbd9323d34d50f343dd038af64671e25f/pkg/roachpb/api.pb.go#L9491-L9493 in pkg/roachpb._Internal_Batch_Handler
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1281-L1283 in google.golang.org/grpc.(*Server).processUnaryRPC
google.golang.org/grpc/external/org_golang_google_grpc/server.go#L1615-L1617 in google.golang.org/grpc.(*Server).handleStream

GOROOT/src/runtime/panic.go in runtime.gopanic at line 1038
pkg/kv/kvserver/pkg/kv/kvserver/store_send.go in pkg/kv/kvserver.(*Store).Send.func1 at line 95
GOROOT/src/runtime/panic.go in runtime.gopanic at line 1047
pkg/kv/kvserver/tscache/interval_skl.go in pkg/kv/kvserver/tscache.(*intervalSkl).AddRange at line 263
pkg/kv/kvserver/tscache/skl_impl.go in pkg/kv/kvserver/tscache.(*sklImpl).Add at line 57
pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go in pkg/kv/kvserver.(*Replica).addToTSCacheChecked at line 68
pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go in pkg/kv/kvserver.(*Replica).updateTimestampCache.func1 at line 82
pkg/kv/kvserver/pkg/kv/kvserver/replica_tscache.go in pkg/kv/kvserver.(*Replica).updateTimestampCache at line 218
pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go in pkg/kv/kvserver.(*endCmds).done at line 1200
pkg/kv/kvserver/pkg/kv/kvserver/replica_read.go in pkg/kv/kvserver.(*Replica).executeReadOnlyBatch at line 149
pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go in pkg/kv/kvserver.(*Replica).executeBatchWithConcurrencyRetries at line 478
pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go in pkg/kv/kvserver.(*Replica).sendWithoutRangeID at line 170
pkg/kv/kvserver/pkg/kv/kvserver/replica_send.go in pkg/kv/kvserver.(*Replica).Send at line 100
pkg/kv/kvserver/pkg/kv/kvserver/store_send.go in pkg/kv/kvserver.(*Store).Send at line 197
pkg/kv/kvserver/pkg/kv/kvserver/stores.go in pkg/kv/kvserver.(*Stores).Send at line 191
pkg/server/node.go in pkg/server.(*Node).batchInternal.func1 at line 1006
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunTaskWithErr at line 344
pkg/server/node.go in pkg/server.(*Node).batchInternal at line 989
pkg/server/node.go in pkg/server.(*Node).Batch at line 1058
pkg/roachpb/api.pb.go in pkg/roachpb._Internal_Batch_Handler.func1 at line 9490
pkg/util/tracing/grpc_interceptor.go in pkg/util/tracing.ServerInterceptor.func1 at line 136
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.chainUnaryInterceptors.func1.1 at line 1116
pkg/rpc/pkg/rpc/context.go in pkg/rpc.NewServer.func3 at line 238
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.chainUnaryInterceptors.func1.1 at line 1119
pkg/rpc/pkg/rpc/context.go in pkg/rpc.NewServer.func1.1 at line 207
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunTaskWithErr at line 344
pkg/rpc/pkg/rpc/context.go in pkg/rpc.NewServer.func1 at line 205
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.chainUnaryInterceptors.func1.1 at line 1119
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.chainUnaryInterceptors.func1 at line 1121
pkg/roachpb/api.pb.go in pkg/roachpb._Internal_Batch_Handler at line 9492
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.(*Server).processUnaryRPC at line 1282
google.golang.org/grpc/external/org_golang_google_grpc/server.go in google.golang.org/grpc.(*Server).handleStream at line 1616
Tag Value
Cockroach Release v22.1.5
Cockroach SHA: a30a663
Platform windows amd64
Distribution CCL
Environment v22.1.5
Command server
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-24904

@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 Mar 1, 2023
@yuzefovich
Copy link
Member

dup of #97824

@exalate-issue-sync exalate-issue-sync bot changed the title sentry: panic.go:1038: panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0 (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:1038 | github.c... sentry: panic.go:1038: panic: inverted range (issue #32149): key lens = [3,48), diff @ index 0 (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:1038 | github.c... Apr 5, 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