Skip to content

tests: fix concurrent accout commits in TestLedgerVerifiesOldStateProofs#6060

Merged
algorandskiy merged 1 commit intoalgorand:masterfrom
algorandskiy:pavel/ledger-spf-test-fix
Jul 10, 2024
Merged

tests: fix concurrent accout commits in TestLedgerVerifiesOldStateProofs#6060
algorandskiy merged 1 commit intoalgorand:masterfrom
algorandskiy:pavel/ledger-spf-test-fix

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

Summary

TestLedgerVerifiesOldStateProofs uses manual account commit scheduling with automatic one that rarely brings tracker into invalid state as seen in this build:

produceCommittingTask: block 3328 too far in the future, lookback 4, dbRound 3277 (cached 3320), deltas 8

2024-07-09T01:35:21.030105 +0000 level=error msg=[Stack] goroutine 346823 [running]:
runtime/debug.Stack()
	/opt/cibuild/.gimme/versions/go1.21.10.linux.arm64/src/runtime/debug/stack.go:24 +0x6c
github.com/algorand/go-algorand/logging.logger.Panicf({0xc0000f42a0?, 0xc0008660a8?}, {0x2495c48, 0x65}, {0xc0041c29b0, 0x5, 0x5})
	/opt/cibuild/project/logging/log.go:282 +0xb0
github.com/algorand/go-algorand/ledger.(*accountUpdates).produceCommittingTask(0xc000f5e420, 0xd00, 0xccd, 0xc003fdc600)
	/opt/cibuild/project/ledger/acctupdates.go:640 +0x3b4
github.com/algorand/go-algorand/ledger.(*trackerRegistry).produceCommittingTask(0xc000f5ea80, 0xd00?, 0xc003fa5990?, 0xc003fdc600)
	/opt/cibuild/project/ledger/tracker.go:404 +0x158
github.com/algorand/go-algorand/ledger.triggerTrackerFlush(0x0?, 0xc000f5e000)
	/opt/cibuild/project/ledger/ledger_test.go:1496 +0x1e4
github.com/algorand/go-algorand/ledger.TestLedgerVerifiesOldStateProofs(0xc002ef11e0)
	/opt/cibuild/project/ledger/ledger_test.go:1686 +0xd84
testing.tRunner(0xc002ef11e0, 0x272e698)
	/opt/cibuild/.gimme/versions/go1.21.10.linux.arm64/src/testing/testing.go:1595 +0x1b4
created by testing.(*T).Run in goroutine 1
	/opt/cibuild/.gimme/versions/go1.21.10.linux.arm64/src/testing/testing.go:1648 +0x5ec
 file=acctupdates.go function=github.com/algorand/go-algorand/ledger.(*accountUpdates).produceCommittingTask
~

Test Plan

This is a test fix.

@algorandskiy algorandskiy requested review from cce and gmalouf July 9, 2024 17:21
@algorandskiy algorandskiy self-assigned this Jul 9, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.15%. Comparing base (a9641a3) to head (46ecb22).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6060      +/-   ##
==========================================
- Coverage   56.16%   56.15%   -0.01%     
==========================================
  Files         488      488              
  Lines       69432    69432              
==========================================
- Hits        38995    38990       -5     
+ Misses      27792    27789       -3     
- Partials     2645     2653       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@cce cce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK cool just like #6024 .. I wonder if there are more like these

@algorandskiy algorandskiy merged commit cf99017 into algorand:master Jul 10, 2024
@algorandskiy algorandskiy deleted the pavel/ledger-spf-test-fix branch March 16, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants