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

storage: state.commit %d is out of range [%d, %d] #36567

Closed
cockroach-teamcity opened this issue Apr 5, 2019 · 1 comment
Closed

storage: state.commit %d is out of range [%d, %d] #36567

cockroach-teamcity opened this issue Apr 5, 2019 · 1 comment
Assignees
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/973210785/?project=164528&referrer=webhooks_plugin

Panic message:

stopper.go:182: string

Stacktrace (expand for inline code snippets):

/usr/local/go/src/runtime/asm_amd64.s#L572-L574 in runtime.call32
/usr/local/go/src/runtime/panic.go#L501-L503 in runtime.gopanic

log.ErrorfDepth(r.ctx, 1, format, v...)
panic(fmt.Sprintf(format, v...))
}
in pkg/storage.(*raftLogger).Panicf
https://github.com/cockroachdb/cockroach/blob/f53d12936efd36ea51eab6f191725d1dca2ceff3/vendor/go.etcd.io/etcd/raft/raft.go#L1473-L1475 in vendor/go.etcd.io/etcd/raft.(*raft).loadState
https://github.com/cockroachdb/cockroach/blob/f53d12936efd36ea51eab6f191725d1dca2ceff3/vendor/go.etcd.io/etcd/raft/raft.go#L376-L378 in vendor/go.etcd.io/etcd/raft.newRaft
https://github.com/cockroachdb/cockroach/blob/f53d12936efd36ea51eab6f191725d1dca2ceff3/vendor/go.etcd.io/etcd/raft/rawnode.go#L75-L77 in vendor/go.etcd.io/etcd/raft.NewRawNode
ctx := r.AnnotateCtx(context.TODO())
raftGroup, err := raft.NewRawNode(newRaftConfig(
raft.Storage((*replicaRaftStorage)(r)),
in pkg/storage.(*Replica).withRaftGroupLocked
if err := r.withRaftGroupLocked(true, func(raftGroup *raft.RawNode) (bool, error) {
return true, nil
in pkg/storage.(*Replica).maybeInitializeRaftGroup
if bq.needsRaftInitialized {
repl.maybeInitializeRaftGroup(ctx)
}
in pkg/storage.(*baseQueue).maybeAddLocked
bq.mu.Lock()
bq.maybeAddLocked(ctx, repl, now)
bq.mu.Unlock()
in pkg/storage.(*baseQueue).MaybeAdd
for _, q := range rs.queues {
q.MaybeAdd(repl, rs.clock.Now())
}
in pkg/storage.(*replicaScanner).waitAndProcess
count++
shouldStop = rs.waitAndProcess(ctx, stopper, start, repl)
return !shouldStop
in pkg/storage.(*replicaScanner).scanLoop.func1.1
repl.mu.RUnlock()
if initialized && (destroyed.IsAlive() || destroyed.reason == destroyReasonRemovalPending) && !visitor(repl) {
break
in pkg/storage.(*storeReplicaVisitor).Visit
count := 0
rs.replicas.Visit(func(repl *Replica) bool {
count++
in pkg/storage.(*replicaScanner).scanLoop.func1
defer s.stop.Done()
f(ctx)
}()
in pkg/util/stop.(*Stopper).RunWorker.func1

/usr/local/go/src/runtime/asm_amd64.s in runtime.call32 at line 573
/usr/local/go/src/runtime/panic.go in runtime.gopanic at line 502
pkg/storage/raft.go in pkg/storage.(*raftLogger).Panicf at line 106
vendor/go.etcd.io/etcd/raft/raft.go in vendor/go.etcd.io/etcd/raft.(*raft).loadState at line 1474
vendor/go.etcd.io/etcd/raft/raft.go in vendor/go.etcd.io/etcd/raft.newRaft at line 377
vendor/go.etcd.io/etcd/raft/rawnode.go in vendor/go.etcd.io/etcd/raft.NewRawNode at line 76
pkg/storage/replica.go in pkg/storage.(*Replica).withRaftGroupLocked at line 623
pkg/storage/replica.go in pkg/storage.(*Replica).maybeInitializeRaftGroup at line 1999
pkg/storage/queue.go in pkg/storage.(*baseQueue).maybeAddLocked at line 438
pkg/storage/queue.go in pkg/storage.(*baseQueue).MaybeAdd at line 411
pkg/storage/scanner.go in pkg/storage.(*replicaScanner).waitAndProcess at line 235
pkg/storage/scanner.go in pkg/storage.(*replicaScanner).scanLoop.func1.1 at line 283
pkg/storage/store.go in pkg/storage.(*storeReplicaVisitor).Visit at line 332
pkg/storage/scanner.go in pkg/storage.(*replicaScanner).scanLoop.func1 at line 281
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunWorker.func1 at line 199
Tag Value
Cockroach Release v2.1.6
Cockroach SHA: f53d129
Platform linux amd64
Distribution CCL
Environment v2.1.6
Command server
Go Version go1.10.7
# of CPUs 1
# of Goroutines 168
@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 5, 2019
@tbg
Copy link
Member

tbg commented Apr 17, 2019

  r.logger.Panicf("%x state.commit %d is out of range [%d, %d]", r.id, state.Commit, r.raftLog.committed, r.raftLog.lastIndex())

Single-CPU machine. It's also in the development environment running stock 2.1.6. Unclear what to make of this.

@tbg tbg changed the title sentry: stopper.go:182: string storage: state.commit %d is out of range [%d, %d] Apr 17, 2019
@tbg tbg self-assigned this Apr 17, 2019
@tbg tbg closed this as completed Aug 26, 2020
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