Skip to content

several errors when ./test  #134

@choleraehyq

Description

@choleraehyq
[cholerae@x240s epaxos]$ ./test.sh
======= Basic Message/Data Test ======

=== RUN   TestNewAndInitialBallot
--- PASS: TestNewAndInitialBallot (0.00s)
=== RUN   TestBallotToUint64
--- PASS: TestBallotToUint64 (0.00s)
=== RUN   TestBallotFromUint64
--- PASS: TestBallotFromUint64 (0.00s)
=== RUN   TestBallotCompare
--- PASS: TestBallotCompare (0.00s)
=== RUN   TestIncNumber
--- PASS: TestIncNumber (0.00s)
=== RUN   TestSetReplicaId
--- PASS: TestSetReplicaId (0.00s)
=== RUN   TestIncNumClone
--- PASS: TestIncNumClone (0.00s)
=== RUN   TestBallotClone
--- PASS: TestBallotClone (0.00s)
=== RUN   TestBallotEpoch
--- FAIL: TestBallotEpoch (0.00s)
        Error Trace:    ballot_test.go:120
	Error:      	Not equal: 
	            	expected: uint32(0x2)
	            	actual: uint8(0x2)
=== RUN   TestBallotIsInitialBallot
--- PASS: TestBallotIsInitialBallot (0.00s)
=== RUN   TestBallotSetNumber
--- PASS: TestBallotSetNumber (0.00s)
=== RUN   TestCommandCompareAndCopy
--- PASS: TestCommandCompareAndCopy (0.00s)
=== RUN   TestCommandClone
--- PASS: TestCommandClone (0.00s)
=== RUN   TestType
--- PASS: TestType (0.00s)
=== RUN   TestContent
--- PASS: TestContent (0.00s)
=== RUN   TestReplica
--- PASS: TestReplica (0.00s)
=== RUN   TestInstance
--- PASS: TestInstance (0.00s)
=== RUN   TestUnionNilPanic
--- PASS: TestUnionNilPanic (0.00s)
=== RUN   TestUnionSizePanic
--- PASS: TestUnionSizePanic (0.00s)
=== RUN   TestUnion
--- PASS: TestUnion (0.00s)
=== RUN   TestDependenciesClone
--- PASS: TestDependenciesClone (0.00s)
=== RUN   TestDependenciesNilClone
--- PASS: TestDependenciesNilClone (0.00s)
=== RUN   TestDependenciesSameAs
--- PASS: TestDependenciesSameAs (0.00s)
FAIL
coverage: 70.1% of statements
exit status 1
FAIL	github.com/go-distributed/epaxos/message	0.003s

======= Static Tests =======
Epaxos State Machine Basic Test
Execution Module Test
Timeout Module Test
Persistent Module Test

=== RUN   TestNewInstance
--- PASS: TestNewInstance (0.00s)
=== RUN   TestNilStatusProcessWithHandlePropose
--- PASS: TestNilStatusProcessWithHandlePropose (0.01s)
=== RUN   TestNilStatusProcessWithIgnorePreAccept
--- PASS: TestNilStatusProcessWithIgnorePreAccept (0.00s)
=== RUN   TestNilStatusProcessWithHandlePreAccept
--- PASS: TestNilStatusProcessWithHandlePreAccept (0.00s)
=== RUN   TestNilStatusProcessWithIgnoreAccept
--- PASS: TestNilStatusProcessWithIgnoreAccept (0.00s)
=== RUN   TestNilStatusProcessWithHandleAccept
--- PASS: TestNilStatusProcessWithHandleAccept (0.00s)
=== RUN   TestNilStatusProcessWithHandleCommit
--- PASS: TestNilStatusProcessWithHandleCommit (0.00s)
=== RUN   TestNilStatusProcessWithIgnorePrepare
--- PASS: TestNilStatusProcessWithIgnorePrepare (0.00s)
=== RUN   TestNilStatusProcessWithHandlePrepare
--- PASS: TestNilStatusProcessWithHandlePrepare (0.00s)
=== RUN   TestNilStatusProcessWithIgnorePrepareReply
--- PASS: TestNilStatusProcessWithIgnorePrepareReply (0.00s)
=== RUN   TestNilStatusProcessWithPanicOnReplies
--- PASS: TestNilStatusProcessWithPanicOnReplies (0.00s)
=== RUN   TestPreAcceptedProcessWithIgnorePreAccept
--- PASS: TestPreAcceptedProcessWithIgnorePreAccept (0.00s)
=== RUN   TestPreAcceptedProcessWithHandlePreAccept
--- PASS: TestPreAcceptedProcessWithHandlePreAccept (0.00s)
=== RUN   TestPreAcceptedProcessWithIgnoreAccept
--- PASS: TestPreAcceptedProcessWithIgnoreAccept (0.00s)
=== RUN   TestPreAcceptedProcessWithHandleAccept
--- PASS: TestPreAcceptedProcessWithHandleAccept (0.00s)
=== RUN   TestPreAcceptedProcessWithHandleCommit
--- PASS: TestPreAcceptedProcessWithHandleCommit (0.00s)
=== RUN   TestPreAcceptedProcessWithIgnorePrepare
--- PASS: TestPreAcceptedProcessWithIgnorePrepare (0.00s)
=== RUN   TestPreAcceptedProcessWithHandlePrepare
--- PASS: TestPreAcceptedProcessWithHandlePrepare (0.00s)
=== RUN   TestPreAcceptedProcessWithIgorePreAcceptReply
--- PASS: TestPreAcceptedProcessWithIgorePreAcceptReply (0.00s)
=== RUN   TestPreAcceptedProcessWithHandlePreAcceptReply
--- PASS: TestPreAcceptedProcessWithHandlePreAcceptReply (0.00s)
=== RUN   TestPreAcceptedFastPath
--- PASS: TestPreAcceptedFastPath (0.00s)
=== RUN   TestPreAcceptedFastPath2
--- PASS: TestPreAcceptedFastPath2 (0.00s)
=== RUN   TestPreAcceptedSlowPath
--- PASS: TestPreAcceptedSlowPath (0.00s)
=== RUN   TestPreAcceptedSlowPath2
--- PASS: TestPreAcceptedSlowPath2 (0.00s)
=== RUN   TestPreAcceptedProcessWithIgnorePreAcceptOk
--- PASS: TestPreAcceptedProcessWithIgnorePreAcceptOk (0.00s)
=== RUN   TestPreAcceptedProcessWithHandlePreAcceptOk
--- PASS: TestPreAcceptedProcessWithHandlePreAcceptOk (0.00s)
=== RUN   TestPreAcceptedProcessWithPrepareReply
--- PASS: TestPreAcceptedProcessWithPrepareReply (0.00s)
=== RUN   TestPreAcceptedProcessWithPanic
--- PASS: TestPreAcceptedProcessWithPanic (0.00s)
=== RUN   TestAcceptedProcessWithIgnorePreAccept
--- PASS: TestAcceptedProcessWithIgnorePreAccept (0.00s)
=== RUN   TestAcceptedProcessWithIgnoreAccept
--- PASS: TestAcceptedProcessWithIgnoreAccept (0.00s)
=== RUN   TestAcceptedProcessWithHandleAccept
--- PASS: TestAcceptedProcessWithHandleAccept (0.00s)
=== RUN   TestAcceptedProcessWithHandleCommit
--- PASS: TestAcceptedProcessWithHandleCommit (0.00s)
=== RUN   TestAcceptedProcessWithIgnorePrepare
--- PASS: TestAcceptedProcessWithIgnorePrepare (0.00s)
=== RUN   TestAcceptedProcessWithHandlePrepare
--- PASS: TestAcceptedProcessWithHandlePrepare (0.00s)
=== RUN   TestAcceptedProcessWithNoActionOnAcceptReply
--- PASS: TestAcceptedProcessWithNoActionOnAcceptReply (0.00s)
=== RUN   TestAcceptedProcessWithHandleAcceptReply
--- PASS: TestAcceptedProcessWithHandleAcceptReply (0.00s)
=== RUN   TestAcceptedProcessWithNoActionOnPreAcceptReply
--- PASS: TestAcceptedProcessWithNoActionOnPreAcceptReply (0.00s)
=== RUN   TestAcceptedProcessWithPrepareReply
--- PASS: TestAcceptedProcessWithPrepareReply (0.00s)
=== RUN   TestAcceptedProcessWithPanic
--- PASS: TestAcceptedProcessWithPanic (0.00s)
=== RUN   TestCommittedProcessWithNoAction
--- PASS: TestCommittedProcessWithNoAction (0.00s)
=== RUN   TestCommittedProcessWithRejcetAccept
--- PASS: TestCommittedProcessWithRejcetAccept (0.00s)
=== RUN   TestCommittedProcessWithHandlePrepare
--- PASS: TestCommittedProcessWithHandlePrepare (0.00s)
=== RUN   TestCommittedProcessWithIgnorePreAccept
--- PASS: TestCommittedProcessWithIgnorePreAccept (0.00s)
=== RUN   TestCommittedProccessWithPanic
--- PASS: TestCommittedProccessWithPanic (0.00s)
=== RUN   TestPreparingProcessWithIgnorePreAccept
--- PASS: TestPreparingProcessWithIgnorePreAccept (0.01s)
=== RUN   TestPreparingProcessWithHandlePreAccept
--- PASS: TestPreparingProcessWithHandlePreAccept (0.00s)
=== RUN   TestPreparingProcessWithIgnoreAccept
--- PASS: TestPreparingProcessWithIgnoreAccept (0.00s)
=== RUN   TestPreparingProcessWithHandleAccept
--- PASS: TestPreparingProcessWithHandleAccept (0.00s)
=== RUN   TestPreparingProcessWithHandleCommit
--- PASS: TestPreparingProcessWithHandleCommit (0.00s)
=== RUN   TestPreparingProcessWithIgnorePrepare
--- PASS: TestPreparingProcessWithIgnorePrepare (0.00s)
=== RUN   TestPreparingProcessWithPanicPrepare
--- PASS: TestPreparingProcessWithPanicPrepare (0.00s)
=== RUN   TestPreparingProcessWithHandlePrepare
--- PASS: TestPreparingProcessWithHandlePrepare (0.00s)
=== RUN   TestPreparingProcessWithIgnorePrepareReply
--- PASS: TestPreparingProcessWithIgnorePrepareReply (0.01s)
=== RUN   TestPreparingProcessWithHandlePrepareReply
--- PASS: TestPreparingProcessWithHandlePrepareReply (0.00s)
=== RUN   TestPreparingProcessWithIgnoreOtherReplies
--- PASS: TestPreparingProcessWithIgnoreOtherReplies (0.00s)
=== RUN   TestPreparingProcessWithPanic
--- PASS: TestPreparingProcessWithPanic (0.00s)
=== RUN   TestNilStatusPreparingHandlePrepareReply
--- PASS: TestNilStatusPreparingHandlePrepareReply (0.01s)
=== RUN   TestPreAcceptedPreparingHandlePrepareReply
--- PASS: TestPreAcceptedPreparingHandlePrepareReply (0.01s)
=== RUN   TestHandlePropose
--- PASS: TestHandlePropose (0.01s)
=== RUN   TestHandlePreAccept
--- PASS: TestHandlePreAccept (0.00s)
=== RUN   TestHandlePreAcceptOk
--- PASS: TestHandlePreAcceptOk (0.00s)
=== RUN   TestHandlePreAcceptReply
--- PASS: TestHandlePreAcceptReply (0.00s)
=== RUN   TestHandleAccept
--- PASS: TestHandleAccept (0.00s)
=== RUN   TestHandleAcceptReply
--- PASS: TestHandleAcceptReply (0.00s)
=== RUN   TestHandlePrepare
--- PASS: TestHandlePrepare (0.00s)
=== RUN   TestHandleCommit
--- PASS: TestHandleCommit (0.01s)
=== RUN   TestHandlePrepareReply
--- PASS: TestHandlePrepareReply (0.00s)
=== RUN   TestUpdateReocveryInstance
--- PASS: TestUpdateReocveryInstance (0.00s)
=== RUN   TestHandleCommittedPrepareReply
--- PASS: TestHandleCommittedPrepareReply (0.00s)
=== RUN   TestHandleAcceptedPrepareReply
--- PASS: TestHandleAcceptedPrepareReply (0.00s)
=== RUN   TestHandlePreAcceptedPrepareReply
--- PASS: TestHandlePreAcceptedPrepareReply (0.00s)
=== RUN   TestMakeRecoveryDecision
--- PASS: TestMakeRecoveryDecision (0.01s)
=== RUN   TestHandleTimeout
--- PASS: TestHandleTimeout (0.01s)
=== RUN   TestInstanceGetters
--- PASS: TestInstanceGetters (0.00s)
=== RUN   TestCheckStatus
--- PASS: TestCheckStatus (0.00s)
=== RUN   TestExecuted
--- PASS: TestExecuted (0.00s)
=== RUN   TestPackNormalInstance
--- PASS: TestPackNormalInstance (0.00s)
=== RUN   TestPackPreparingInstance
--- PASS: TestPackPreparingInstance (0.00s)
=== RUN   TestUnpackNormalInstance
--- PASS: TestUnpackNormalInstance (0.00s)
=== RUN   TestUnpackPreparingInstance
--- PASS: TestUnpackPreparingInstance (0.00s)
=== RUN   TestNewReplica
--- PASS: TestNewReplica (0.00s)
=== RUN   TestMakeInitialBallot
--- PASS: TestMakeInitialBallot (0.00s)
=== RUN   TestInitInstance
--- PASS: TestInitInstance (0.00s)
=== RUN   TestUpdateInstance
--- PASS: TestUpdateInstance (0.00s)
=== RUN   TestSccStack
--- PASS: TestSccStack (0.00s)
=== RUN   TestResolveConflictsWithNoDeps
--- PASS: TestResolveConflictsWithNoDeps (0.00s)
=== RUN   TestResolveConflictsWithSimpleDeps
--- PASS: TestResolveConflictsWithSimpleDeps (0.00s)
=== RUN   TestResolveConflictsWithMultipleLevelDeps
--- PASS: TestResolveConflictsWithMultipleLevelDeps (0.00s)
=== RUN   TestResolveConflictsWithSccDeps
--- PASS: TestResolveConflictsWithSccDeps (0.00s)
=== RUN   TestResolveConflictsWithSccDepsAndUncommitedInstance
--- PASS: TestResolveConflictsWithSccDepsAndUncommitedInstance (0.00s)
=== RUN   TestResolveConflictsWithSccDepsAndexecutedInstance
--- PASS: TestResolveConflictsWithSccDepsAndexecutedInstance (0.00s)
=== RUN   TestExecuteList
--- PASS: TestExecuteList (0.00s)
=== RUN   TestExecuteListWithError
--- PASS: TestExecuteListWithError (0.00s)
=== RUN   TestNoTimeout1
--- PASS: TestNoTimeout1 (0.10s)
=== RUN   TestNoTimeout2
--- PASS: TestNoTimeout2 (0.11s)
=== RUN   TestTimeout1
--- PASS: TestTimeout1 (0.21s)
=== RUN   TestTimeout2
--- PASS: TestTimeout2 (1.45s)
=== RUN   TestProposeIdNoBatch
--- PASS: TestProposeIdNoBatch (0.36s)
=== RUN   TestProposeIdWithBatch
--- PASS: TestProposeIdWithBatch (5.02s)
=== RUN   TestStoreSingleInstance
--- PASS: TestStoreSingleInstance (0.03s)
=== RUN   TestStoreRestoreSingleInstance
--- PASS: TestStoreRestoreSingleInstance (0.00s)
=== RUN   TestStoreRestoreSinglePreparingInstance
--- PASS: TestStoreRestoreSinglePreparingInstance (0.02s)
=== RUN   TestStoreRestoreMultipleInstances
--- PASS: TestStoreRestoreMultipleInstances (0.03s)
=== RUN   TestStoreAndRestoreReplica
--- PASS: TestStoreAndRestoreReplica (0.03s)
PASS
coverage: 85.5% of statements
ok  	github.com/go-distributed/epaxos/replica	7.612s

======= Log Consistency Test ======

=== RUN   Test3Replica1ProposerNoConflict
Wait 5 seconds for completion
--- FAIL: Test3Replica1ProposerNoConflict (5.03s)
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=0x478fa2]

goroutine 6 [running]:
testing.tRunner.func1(0xc42011a0f0)
	/home/cholerae/gopath/go/src/testing/testing.go:711 +0x2d2
panic(0x6ec860, 0x8f2420)
	/home/cholerae/gopath/go/src/runtime/panic.go:491 +0x283
time.(*Ticker).Stop(0x0)
	/home/cholerae/gopath/go/src/time/tick.go:46 +0x22
github.com/go-distributed/epaxos/replica.(*Replica).stopTickers(0xc4200be780)
	/home/cholerae/gopath/src/github.com/go-distributed/epaxos/replica/replica.go:264 +0x5c
github.com/go-distributed/epaxos/replica.(*Replica).Stop(0xc4200be780)
	/home/cholerae/gopath/src/github.com/go-distributed/epaxos/replica/replica.go:269 +0x40
github.com/go-distributed/epaxos/livetest.livetestlibStopCluster(0xc4200fca60, 0x3, 0x3)
	/home/cholerae/gopath/src/github.com/go-distributed/epaxos/livetest/livereplica_test.go:95 +0x3c
github.com/go-distributed/epaxos/livetest.Test3Replica1ProposerNoConflict(0xc42011a0f0)
	/home/cholerae/gopath/src/github.com/go-distributed/epaxos/livetest/livereplica_test.go:233 +0x290
testing.tRunner(0xc42011a0f0, 0x75f1d0)
	/home/cholerae/gopath/go/src/testing/testing.go:746 +0xd0
created by testing.(*T).Run
	/home/cholerae/gopath/go/src/testing/testing.go:789 +0x2de
exit status 2
FAIL	github.com/go-distributed/epaxos/livetest	5.033s

======= Failover Test ======

rm: cannot remove 'log*': No such file or directory
Fire 3 replicas:
replica[0]=7189, logfile=log0
replica[1]=7190, logfile=log1
replica[2]=7191, logfile=log2
Let them execute for 10 seconds...

Randomly choose a victim...
Kill replica[2]
Let survivors continue to execute for 10 seconds...

./test.sh: line 74:  7191 Killed                  ./demo -id=2 -v=1 -log_dir=/dev/shm -alsologtostderr > /dev/null 2>> log2
Still making progress? Yes

Restore replica[2] from failure
Continue to execute for 10 seconds...

Stop all replicas
Test execution consistency...

./test.sh: line 106:  7189 Terminated              ./demo -id=0 -v=1 -log_dir=/dev/shm -alsologtostderr > /dev/null 2>> log0
./test.sh: line 106:  7190 Terminated              ./demo -id=1 -v=1 -log_dir=/dev/shm -alsologtostderr > /dev/null 2>> log1
./test.sh: line 106:  7278 Terminated              ./demo -id=$victim -restore -v=1 -log_dir=/dev/shm -alsologtostderr > /dev/null 2>> log$victim
PASS diff log0 log1 on 0!
PASS diff log1 log2 on 0!
PASS diff log0 log1 on 1!
PASS diff log1 log2 on 1!
PASS diff log0 log1 on 2!
PASS diff log1 log2 on 2!

Execution result test PASS!
[cholerae@x240s epaxos]$ go version
go version go1.9.2 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions