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

Test Flakiness: agreement integration on travis #34

Closed
Vervious opened this issue Jun 14, 2019 · 1 comment
Closed

Test Flakiness: agreement integration on travis #34

Vervious opened this issue Jun 14, 2019 · 1 comment
Assignees
Labels
test Improves testing of existing code

Comments

@Vervious
Copy link
Contributor

Vervious commented Jun 14, 2019

Seen on travis:

node-0:
 demuxCoserviceType: 1
 pseudonodeCoserviceType: 1
 clockCoserviceType: 0
--- FAIL: TestAgreementSynchronous1 (0.23s)
panic: unexpected number of zeroes: 3 != 4 [recovered]
	panic: unexpected number of zeroes: 3 != 4 [recovered]
	panic: unexpected number of zeroes: 3 != 4
goroutine 35561 [running]:
testing.tRunner.func1(0xc001f2ae00)
	/home/travis/.gimme/versions/go1.12.linux.amd64/src/testing/testing.go:830 +0x68a
panic(0x1232640, 0xc002a83070)
	/home/travis/.gimme/versions/go1.12.linux.amd64/src/runtime/panic.go:522 +0x1b5
github.com/algorand/go-algorand/agreement.setupAgreement.func1()
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:765 +0x2eb
panic(0x1232640, 0xc002a83070)
	/home/travis/.gimme/versions/go1.12.linux.amd64/src/runtime/panic.go:522 +0x1b5
github.com/algorand/go-algorand/agreement.expectNewPeriod(0xc0023a6a50, 0x1, 0x1, 0x4, 0xc0020a17c0)
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:804 +0x1f8
github.com/algorand/go-algorand/agreement.runRound(0xc0023a6a50, 0x1, 0x1, 0xc0020a17c0, 0x3, 0x3)
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:833 +0xa3
github.com/algorand/go-algorand/agreement.simulateAgreementWithLedgerFactory(0xc001f2ae00, 0x1, 0x5, 0x0, 0x13ff1a8)
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:870 +0x28f
github.com/algorand/go-algorand/agreement.simulateAgreement(...)
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:854
github.com/algorand/go-algorand/agreement.TestAgreementSynchronous1(0xc001f2ae00)
	/home/travis/gopath/src/github.com/algorand/go-algorand/agreement/service_test.go:885 +0x61
testing.tRunner(0xc001f2ae00, 0x13fed30)
	/home/travis/.gimme/versions/go1.12.linux.amd64/src/testing/testing.go:865 +0x164
created by testing.(*T).Run
	/home/travis/.gimme/versions/go1.12.linux.amd64/src/testing/testing.go:916 +0x69a
FAIL	github.com/algorand/go-algorand/agreement	100.978s
Makefile:194: recipe for target 'short_test_target_github.com/algorand/go-algorand/agreement' failed

Note that the system is inherently nondeterministic, and travis is a particularly finicky execution environment. Nonetheless we should investigate and put more effort into more deterministic tests. I cannot replicate this locally running -test.count 10000 times.

(Note: travis artifacts are currently broken. As is, we have no information to debug. We should revisit when we see another failure and have corresponding cadaver and log files to debug.)

@Vervious Vervious added the test Improves testing of existing code label Jun 14, 2019
@Vervious Vervious self-assigned this Jun 14, 2019
@Vervious
Copy link
Contributor Author

Closing since we haven't seen this for a while. Re-open (with appropriate cadaver and log files) if reoccurs.

derbear pushed a commit to derbear/go-algorand that referenced this issue Apr 8, 2020
algorandskiy added a commit that referenced this issue May 19, 2023
This adds a DB method to calculate the total expired stake registered at rnd that is expired by voteRnd.

It adds a consensus check to the ledger implementation of the Circulation(rnd) call that agreement makes, which in turn calls onlineAccounts.onlineTotals. If ExcludeExpiredCirculation is set, it subtracts expired stake at rnd+320 from the total online stake at rnd.

Details:
* when the next round is going to be round R, a proposal/vote will come in for round R (or some other trigger we could add)
* query the DB's onlineaccounts table looking for accounts online at R that are expired in any round before R+320 (this using the "updated as of rnd" and "expired by rnd" indexes)
* sum up the expired online stake for these accounts
* subtract expired stake from total online stake and put in cache to use for all votes seen for R

Co-authored-by: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Improves testing of existing code
Projects
None yet
Development

No branches or pull requests

1 participant