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

eth: core/rawdb: p2p/enode: multiple data race fixes #20916

Closed

Conversation

MariusVanDerWijden
Copy link
Member

I found multiple pending data races, they are mostly in tests so very low impact.

eth:
Due to the reuse of error channels throughout the tests, the golang race tester complains
to test use go test -count=1 -run=TestForkIDSplit ./... -race

core/rawdb:
closes #20420

p2p/enode:
fixes a data race between genIter.Next() and genIter.Close()

Due to the reuse of error channels throughout the tests, the golang race tester complains
to test use `go test -count=1 -run=TestForkIDSplit  ./... -race`
fixes a data race between genIter.Next() and genIter.Close()

select {
case err := <-errc:
case err := <-errc3:
Copy link
Member

Choose a reason for hiding this comment

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

This fix touches code that I've heavily rewritten in the snapshot-sync branch. We might want to either open the PR against my branch or wait until that's in.

return nil, errOutOfBounds
}
t.lock.RLock()
startOffset, endOffset, filenum, err := t.getBounds(item - uint64(offset))
startOffset, endOffset, filenum, err := t.getBounds(item - uint64(t.itemOffset))
Copy link
Member

@karalabe karalabe Apr 14, 2020

Choose a reason for hiding this comment

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

Please open a PR with this (rawdb) fix only, that can be merged

@MariusVanDerWijden
Copy link
Member Author

closed in favour of #20919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rawdb: Race condition in freezer table
2 participants