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

teamcity: failed test: TestReplicaReproposalWithNewLeaseIndexError #39739

Closed
cockroach-teamcity opened this issue Aug 19, 2019 · 3 comments · Fixed by #40477
Closed

teamcity: failed test: TestReplicaReproposalWithNewLeaseIndexError #39739

cockroach-teamcity opened this issue Aug 19, 2019 · 3 comments · Fixed by #40477
Assignees
Labels
C-test-failure Broken test (automatically or manually discovered). E-starter Might be suitable for a starter project for new employees or team members. O-robot Originated from a bot.
Milestone

Comments

@cockroach-teamcity
Copy link
Member

The following tests appear to have failed on master (testrace): TestReplicaReproposalWithNewLeaseIndexError

You may want to check for open issues.

#1444709:

TestReplicaReproposalWithNewLeaseIndexError
...o:307
sync.runtime_notifyListWait(0xc0009ea910, 0x1c)
	/usr/local/go/src/runtime/sema.go:510 +0xf9
sync.(*Cond).Wait(0xc0009ea900)
	/usr/local/go/src/sync/cond.go:56 +0x8e
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).worker(0xc0010cc120, 0x5b77120, 0xc001733e00)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:192 +0x9c
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).Start.func2(0x5b77120, 0xc001733e00)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:161 +0x56
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc001dec1b0, 0xc00103c960, 0xc001dec190)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4

goroutine 27504 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:307
sync.runtime_notifyListWait(0xc0009ea910, 0x39)
	/usr/local/go/src/runtime/sema.go:510 +0xf9
sync.(*Cond).Wait(0xc0009ea900)
	/usr/local/go/src/sync/cond.go:56 +0x8e
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).worker(0xc0010cc120, 0x5b77120, 0xc001dd55f0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:192 +0x9c
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).Start.func2(0x5b77120, 0xc001dd55f0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:161 +0x56
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc001dec8a0, 0xc00103c960, 0xc001dec890)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4

goroutine 27460 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:307
sync.runtime_notifyListWait(0xc0009ea910, 0xd)
	/usr/local/go/src/runtime/sema.go:510 +0xf9
sync.(*Cond).Wait(0xc0009ea900)
	/usr/local/go/src/sync/cond.go:56 +0x8e
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).worker(0xc0010cc120, 0x5b77120, 0xc001733890)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:192 +0x9c
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).Start.func2(0x5b77120, 0xc001733890)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:161 +0x56
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc000339f60, 0xc00103c960, 0xc000339f50)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4

goroutine 27527 [select]:
github.com/cockroachdb/cockroach/pkg/storage.(*baseQueue).processLoop.func1(0x5b77120, 0xc001e205d0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/queue.go:748 +0x1ef
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc001e93aa0, 0xc00103c960, 0xc00033ff40)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4

goroutine 27523 [select]:
github.com/cockroachdb/cockroach/pkg/storage.(*baseQueue).processLoop.func1(0x5b77120, 0xc001e20570)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/queue.go:748 +0x1ef
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc001e93a50, 0xc00103c960, 0xc00033fec0)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4




Please assign, take a look and update the issue accordingly.

@cockroach-teamcity cockroach-teamcity added C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. labels Aug 19, 2019
@cockroach-teamcity cockroach-teamcity added this to the 19.2 milestone Aug 19, 2019
@nvanbenschoten
Copy link
Member

Test ended in panic.

------- Stdout: -------
W190819 14:48:15.531666 27451 storage/replica_application_result.go:219  [s1,r1/1:/M{in-ax}] failed to repropose with new lease index: boom
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1f45dcb]

goroutine 27451 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc00103c960, 0x5b77120, 0xc001dd4c30)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:181 +0x155
panic(0x482bd80, 0x808f640)
	/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/cockroachdb/cockroach/pkg/storage.(*replicaProposer).registerProposalLocked(0xc001246d00, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_proposal_buf.go:649 +0x4b
github.com/cockroachdb/cockroach/pkg/storage.(*propBuf).FlushLockedWithRaftGroup(0xc0012472a0, 0xc001ddb4c0, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_proposal_buf.go:406 +0x35b
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).handleRaftReadyRaftMuLocked.func1(0xc001ddb4c0, 0x18, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_raft.go:456 +0x8e
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).withRaftGroupLocked.func1(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_raft.go:1337
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).withRaftGroupLocked(0xc001246d00, 0x5b77101, 0xc0011d74d8, 0x1, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_raft.go:1338 +0x121
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).handleRaftReadyRaftMuLocked(0xc001246d00, 0x5b77120, 0xc001e21560, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_raft.go:455 +0x1e2
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).handleRaftReady(0xc001246d00, 0x5b77120, 0xc001e21560, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_raft.go:432 +0x1a0
github.com/cockroachdb/cockroach/pkg/storage.(*Store).processReady(0xc000647500, 0x5b77120, 0xc001dd4c30, 0x1)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/store.go:3675 +0x1a0
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).worker(0xc0010cc120, 0x5b77120, 0xc001dd4c30)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:227 +0x33f
github.com/cockroachdb/cockroach/pkg/storage.(*raftScheduler).Start.func2(0x5b77120, 0xc001dd4c30)
	/go/src/github.com/cockroachdb/cockroach/pkg/storage/scheduler.go:161 +0x56
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1(0xc000339d10, 0xc00103c960, 0xc000339d00)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:196 +0x160
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:189 +0xc4

@nvanbenschoten nvanbenschoten added the E-starter Might be suitable for a starter project for new employees or team members. label Aug 28, 2019
@nvanbenschoten
Copy link
Member

@irfansharif mind taking a look at this?

@irfansharif
Copy link
Contributor

Taking a look now.

irfansharif added a commit to irfansharif/cockroach that referenced this issue Sep 4, 2019
Fixes cockroachdb#39739. When inserting a new command into the proposal buffer, we
first reserve an index into the buffer's array. If we subsequently fail
to insert the proposal, we should account for this during proposal
registration.

Additionally add `TestPropBufCnt` to test basic behaviour of the counter
maintained by the proposal buffer.

Release note: None
irfansharif added a commit to irfansharif/cockroach that referenced this issue Sep 4, 2019
Fixes cockroachdb#39739. When inserting a new command into the proposal buffer, we
first reserve an index into the buffer's array. If we subsequently fail
to insert the proposal, we should account for this during proposal
registration.

Additionally add `TestPropBufCnt` to test basic behaviour of the counter
maintained by the proposal buffer.

Release note: None
craig bot pushed a commit that referenced this issue Sep 4, 2019
40477: storage: Deflake TestReplicaReproposalWithNewLeaseIndexError r=irfansharif a=irfansharif

Fixes #39739. When inserting a new command into the proposal buffer, we
first reserve an index into the buffer's array and an offset from the
buffer's base lease index. If we subsequently fail to insert the
proposal, we should undo the index and offset reservation.

When we error out in `(*propBuf).Insert`, if we don't undo the index
reservation we expect a proposal at said index during consumption, but
don't find one.

Release note: None

Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
@craig craig bot closed this as completed in a84f0f4 Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-failure Broken test (automatically or manually discovered). E-starter Might be suitable for a starter project for new employees or team members. O-robot Originated from a bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants