Repository navigation
fix(eth/bft): read handler test counters with atomic loads, close #2793 - #2802
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
gzliudan
force-pushed
the
fix-issue-2793
branch
from
October 14, 2026 14:34
0edbc94 to
40163d2
Compare
gzliudan
requested review from
AnilChinchawale,
anunay-xin,
benjamin202410,
liam-lai and
wanwiset25
October 14, 2026 14:50
wanwiset25
approved these changes
Oct 15, 2026
anunay-xin
approved these changes
Oct 16, 2026
gzliudan
force-pushed
the
fix-issue-2793
branch
2 times, most recently
from
October 18, 2026 12:35
81e396b to
6256e14
Compare
benjamin202410
approved these changes
Oct 19, 2026
gzliudan
force-pushed
the
fix-issue-2793
branch
from
October 20, 2026 06:27
6256e14 to
2063c2a
Compare
…FinOrg#2793 The handler tests increment their counters with atomic.AddUint32 from the Bfter.loop goroutines, but the assertions read them with plain loads, so the test goroutine races with the broadcast handlers it just triggered: go test -race reports four data races (bft_handler_test.go:92, :236, :288 and :363) and fails TestSequentialVotes, TestTimeoutHandler, TestSyncInfoHandler and TestTooFarTimeout. Which of them fail depends on when the race reports land, so the failing set varies between runs. Read every counter with atomic.LoadUint32 in the assertions, both in the conditions and in the t.Fatalf arguments; the increment sites are left untouched. go-ethereum never had a bft package (git ls-tree HEAD eth/ lists no bft entry, and a case-insensitive grep over the master tree finds nothing), so there is nothing upstream to port. The code entered this fork with a1b77f3 (XDPoSChain PR XinFinOrg#13, 2021-11-06), whose eth/bfter/bft_test.go carries the same plain-read pattern. Closes XinFinOrg#2793
gzliudan
force-pushed
the
fix-issue-2793
branch
from
October 20, 2026 06:52
2063c2a to
ce71640
Compare
This was referenced Oct 20, 2026
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 20, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 20, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 20, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 20, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. The bulk pass also collects its package list before testing it: a command substitution sitting in an argument list drops its exit status, so a package that failed to load would be dropped from the run in silence. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 20, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 22, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 23, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 26, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 26, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
13 of 25 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. make race-test runs the same two passes, rpc last and on its own, so a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. Both the job and make race-test collect the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so its guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a step of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job calls make race-test-bulk and then race-test-rpc, so the two passes, the rpc carve-out and the package list are defined in one place, and make race-test runs exactly what CI runs: a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty list sends build/ci.go back to ./... with rpc in it. make runs the recipe with /bin/sh, which has no pipefail, so the guard covers go list failing outright; a partial failure still leaves every package path in the list, where go test reports it. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a slice of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job runs four slices of the bulk pass in parallel and then race-test-rpc, and the shard split, the rpc carve-out and the package list live in the Makefile, so make race-test (a single shard) runs exactly what CI runs and a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. Four slices because the detector makes the pass compile-bound: one job spent 8m28s on the 752s of test time that a twelve-core laptop covers in 5m38s. A slice is the name-sorted package list taken modulo four, 32 packages each, with -p 4 overlapping whatever shares one; side by side here they took 46s, 76s, 97s and 122s. actions/cache restores ~/.cache/go-build per slice, since each slice would otherwise recompile the dependency graph with the instrumentation. That cache also holds go's test results, so a slice reports a previous verdict for packages whose inputs did not move. Only packages with test files are listed: the other 70 would add build time and no coverage. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty slice would send build/ci.go back to ./... with rpc in it, so the slice is checked before it is used. make runs the recipe with /bin/sh, which has no pipefail, so that check is what covers go list failing outright. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree. With the shards and the cache in place, the four slices run side by side report rc=0 and zero DATA RACE (46s/76s/97s/122s), their union equals the unsharded list, and an out-of-range slice exits before testing anything.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a slice of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job runs four slices of the bulk pass in parallel and then race-test-rpc, and the shard split, the rpc carve-out and the package list live in the Makefile, so make race-test (a single shard) runs exactly what CI runs and a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. Four slices because the detector makes the pass compile-bound: one job spent 8m28s on the 752s of test time that a twelve-core laptop covers in 5m38s. A slice is the name-sorted package list taken modulo four, 32 packages each, with -p 4 overlapping whatever shares one; side by side here they took 46s, 76s, 97s and 122s. actions/cache restores ~/.cache/go-build per slice, keyed by the dependency hash rather than the commit, so a slice refills when go.sum moves instead of once per push: an entry is 660 MB unpacked and 156 MB stored, and five of them fit inside the 10 GB a repository may cache. That cache also holds go's test results, so a slice reports a previous verdict for packages whose inputs did not move. Only packages with test files are listed: the other 70 would add build time and no coverage. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty slice would send build/ci.go back to ./... with rpc in it, so the slice is checked before it is used. make runs the recipe with /bin/sh, which has no pipefail, so that check is what covers go list failing outright. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree. With the shards and the cache in place, the four slices run side by side report rc=0 and zero DATA RACE (46s/76s/97s/122s), their union equals the unsharded list, and an out-of-range slice exits before testing anything.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a slice of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job runs four slices of the bulk pass in parallel and then race-test-rpc, and the shard split, the rpc carve-out and the package list live in the Makefile, so make race-test (a single shard) runs exactly what CI runs and a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. Four slices because the detector makes the pass compile-bound: one job spent 8m28s on the 752s of test time that a twelve-core laptop covers in 5m38s. A slice is the name-sorted package list taken modulo four, 32 packages each, with -p 4 overlapping whatever shares one; side by side here they took 46s, 76s, 97s and 122s. actions/cache restores ~/.cache/go-build per slice, keyed by the dependency hash rather than the commit, so a slice refills when go.sum moves instead of once per push: an entry is 660 MB unpacked and 156 MB stored, and five of them fit inside the 10 GB a repository may cache. That cache also holds go's test results, so a slice reports a previous verdict for packages whose inputs did not move. Only packages with test files are listed: the other 70 would add build time and no coverage. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty slice would send build/ci.go back to ./... with rpc in it, so the slice is checked before it is used. make runs the recipe with /bin/sh, which has no pipefail, so that check is what covers go list failing outright. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree. With the shards and the cache in place, the four slices run side by side report rc=0 and zero DATA RACE (46s/76s/97s/122s), their union equals the unsharded list, and an out-of-range slice exits before testing anything.
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (XinFinOrg#2700). Every package the job started out excluding is fixed (XinFinOrg#2791, XinFinOrg#2793 by XinFinOrg#2802, XinFinOrg#2794) or gone with the package (XinFinOrg#2792, whose disposition was deletion via XinFinOrg#2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: XinFinOrg#2795 (fixed by XinFinOrg#2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a slice of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job runs four slices of the bulk pass in parallel and then race-test-rpc, and the shard split, the rpc carve-out and the package list live in the Makefile, so make race-test (a single shard) runs exactly what CI runs and a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. Four slices because the detector makes the pass compile-bound: one job spent 8m28s on the 752s of test time that a twelve-core laptop covers in 5m38s. A slice is the name-sorted package list taken modulo four, 32 packages each, with -p 4 overlapping whatever shares one; side by side here they took 46s, 76s, 97s and 122s. actions/cache restores ~/.cache/go-build per slice, keyed by the dependency hash rather than the commit, so a slice refills when go.sum moves instead of once per push: an entry is 660 MB unpacked and 156 MB stored, and five of them fit inside the 10 GB a repository may cache. That cache also holds go's test results, so a slice reports a previous verdict for packages whose inputs did not move. Only packages with test files are listed: the other 70 would add build time and no coverage. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty slice would send build/ci.go back to ./... with rpc in it, so the slice is checked before it is used. make runs the recipe with /bin/sh, which has no pipefail, so that check is what covers go list failing outright. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree. With the shards and the cache in place, the four slices run side by side report rc=0 and zero DATA RACE (46s/76s/97s/122s), their union equals the unsharded list, and an out-of-range slice exits before testing anything.
gzliudan
added a commit
that referenced
this pull request
Oct 27, 2026
make test, make quick-test and all eight shards of ci.yml call `go run build/ci.go test`, and none of them passes -race, so an access that is unsynchronised at run time stays invisible to CI. build/ci.go has carried the flag since it was ported from geth ethereum#23480 - nothing ever switched it on (#2700). Every package the job started out excluding is fixed (#2791, #2793 by #2802, #2794) or gone with the package (#2792, whose disposition was deletion via #2796), so the bulk pass now covers the whole tree. metrics no longer needs a second, non-short run either: #2795 (fixed by #2801) removed the `testing.Short()` guard from TestUniformSampleConcurrentUpdateCount, so the short pass reaches it. rpc gets a slice of its own: the bulk pass runs four packages at a time, and TestClientWebsocketLargeMessage does not survive that on a GitHub-hosted runner - twice in a row the job failed after 30.00s with `websocket: close 1006 (abnormal closure): unexpected EOF`, the websocket codec's 30s ping/pong watchdog, with no data race reported in either attempt. The package is green when it does not compete with three other packages - 26s here, and 24.9s in the plain CI shards, which run one package at a time - so it leaves the bulk pass, which keeps the detector on the package instead of dropping it from the job. The job runs four slices of the bulk pass in parallel and then race-test-rpc, and the shard split, the rpc carve-out and the package list live in the Makefile, so make race-test (a single shard) runs exactly what CI runs and a local sweep predicts the job. It does not pass -failfast: the sweep exists to report every race in one go, and the first failing package would stop the rest. AGENTS.md mentions the target in its test checklist. Four slices because the detector makes the pass compile-bound: one job spent 8m28s on the 752s of test time that a twelve-core laptop covers in 5m38s. A slice is the name-sorted package list taken modulo four, 32 packages each, with -p 4 overlapping whatever shares one; side by side here they took 46s, 76s, 97s and 122s. actions/cache restores ~/.cache/go-build per slice, keyed by the dependency hash rather than the commit, so a slice refills when go.sum moves instead of once per push: an entry is 660 MB unpacked and 156 MB stored, and five of them fit inside the 10 GB a repository may cache. That cache also holds go's test results, so a slice reports a previous verdict for packages whose inputs did not move. Only packages with test files are listed: the other 70 would add build time and no coverage. -short leaves out the long consensus cases (skipLongInShortMode under consensus/tests/engine_v2_tests), the discover UDP/lookup cases and the tests/ performance cases. The plain shards run those without the detector, so make race-test-full exists for the local sweep a change to those paths needs. The target collects the package list before testing it: an argument list drops the substitution's exit status, and an empty slice would send build/ci.go back to ./... with rpc in it, so the slice is checked before it is used. make runs the recipe with /bin/sh, which has no pipefail, so that check is what covers go list failing outright. tag_build now waits for the race job as well, so a release artifact cannot ship with a known race. devnet_build_push keeps waiting for tests only: it fires on every merge, and a flaky detector would hold up the devnet image each time. Verified with the job's command against dev-upgrade 72ed9d6: rc=0, zero WARNING: DATA RACE, 126 packages ok in 3m49s. rpc on its own is ok in 26.0s, eth/bft in 1.7s, metrics in 6.6s (the concurrent sample test runs instead of skipping, 5.3s), make all exits 0, and no .go file is touched. make race-test against baf6d16 reports rc=0 with zero DATA RACE (rpc 23.0s, trie 48.8s), and pointing the recipe at a go that cannot list makes it exit instead of testing the whole tree. With the shards and the cache in place, the four slices run side by side report rc=0 and zero DATA RACE (46s/76s/97s/122s), their union equals the unsharded list, and an out-of-range slice exits before testing anything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
eth/bfthandler tests keep their expectations in counters that the broadcast handlers increment withatomic.AddUint32from theBfter.loopgoroutines, while the assertions read them with plain loads. The test goroutine therefore races with the handlers it just triggered, andgo test -racereports four data races and failsTestSequentialVotes,TestTimeoutHandler,TestSyncInfoHandlerandTestTooFarTimeout. Which of them fail depends on when the race reports land, so the failing set varies between runs.Read every counter with
atomic.LoadUint32in the assertions -- both in theifconditions (keeping theint(...)conversion theinttargets need) and in thet.Fatalfarguments. The increment sites stay as they are. Onlyeth/bft/bft_handler_test.gois touched, +20/-20.eth/bfthas no counterpart in go-ethereum:git ls-tree HEAD eth/in geth master lists nobftentry, and a case-insensitive grep over the master tree finds nothing. The code entered this fork witha1b77f3ca8(XDPoSChain PR #13, 2021-11-06), whoseeth/bfter/bft_test.goships the identical plain-read pattern. There is no upstream fix to port.With this merged,
eth/bftno longer needs the exclusion the race job of #2797 currently carries.Evidence
go test -race -short -count=1 ./eth/bft/reports four data races atbft_handler_test.go:92(TestSequentialVotes),:236(TestTimeoutHandler),:288(TestSyncInfoHandler) and:363(TestTooFarTimeout), each reading a location last written bysync/atomic.AddUint32inBfter.loop; all four tests fail. The failing set is timing-dependent: at-count=3only three of them fail.go test -race -short -count=3 ./eth/bft/exits 0 with no race reports.Validation
make allexits 0.make quick-testexits 0: 127 packages ok, 0 failures.go test -race -short -count=3 ./eth/bft/exits 0, noWARNING: DATA RACE(4G memory-capped scope).gofmt/goimports: clean.Merge Danger
Door: two-way -- test-only change;
git revertrestores the previous assertions byte for byte.Blast Radius: none -- no production code is touched, and the assertions now read exactly the values the handlers wrote.
Closes #2793.