-
Notifications
You must be signed in to change notification settings - Fork 152
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
Race Condition Testing eth/ package #521
Labels
Comments
Thanks for the report! Just for reference, here's another failing racy test command
|
meowsbits
added a commit
that referenced
this issue
Jan 30, 2023
The race was discoverable with go test -race ./eth or under 'slow' machine conditions, eg. GOMAXPROCS=1 and/or a 'slower' machine. The race was around the minArtificialFinalityPeers value, which was both - assigned in (during) the tests, and - checked in the nextSyncOp function and the order of those uses was nondeterministic. This patch resolves the issue by moving the adhoc and temporary re-assignment of that package-wide value to the start of the tests, before any go routines for peer handling or sync protocol are fired off. Note that the real-clock timeouts in these tests can still cause spurious test failures under 'slow' conditions (see their 250ms sleeps). Fixes #521 Date: 2023-01-30 13:39:38-08:00 Signed-off-by: meows <[email protected]>
meowsbits
added a commit
that referenced
this issue
Feb 7, 2023
The race was discoverable with go test -race ./eth or under 'slow' machine conditions, eg. GOMAXPROCS=1 and/or a 'slower' machine. The race was around the minArtificialFinalityPeers value, which was both - assigned in (during) the tests, and - checked in the nextSyncOp function and the order of those uses was nondeterministic. This patch resolves the issue by moving the adhoc and temporary re-assignment of that package-wide value to the start of the tests, before any go routines for peer handling or sync protocol are fired off. Note that the real-clock timeouts in these tests can still cause spurious test failures under 'slow' conditions (see their 250ms sleeps). Fixes #521 Date: 2023-01-30 13:39:38-08:00 Signed-off-by: meows <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On v1.12.9, I've found that running
Has intermittent failures such as:
Running with multiple cores this only shows up occasionally, but running with
It appears much more regularly.
The text was updated successfully, but these errors were encountered: