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: fix potential data race #624

Merged
merged 1 commit into from
Mar 13, 2024
Merged

eth: fix potential data race #624

merged 1 commit into from
Mar 13, 2024

Conversation

meowsbits
Copy link
Member

go test -race ./eth
...
WARNING: DATA RACE
Read at 0x00000268c128 by goroutine 10750:
github.com/ethereum/go-ethereum/eth.(*chainSyncer).nextSyncOp()
/home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync.go:204 +0x216
github.com/ethereum/go-ethereum/eth.(*chainSyncer).loop()
/home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync.go:146 +0x3f3
github.com/ethereum/go-ethereum/eth.(*handler).Start.func3()
/home/ia/go/src/github.com/ethereum/go-ethereum/eth/handler.go:604 +0x33

Previous write at 0x00000268c128 by goroutine 8683:
github.com/ethereum/go-ethereum/eth.TestArtificialFinalityFeatureEnablingDisabling_StaleHead()
/home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync_test.go:344 +0x16a
testing.tRunner()
/home/ia/go1.21.2.linux-amd64/go/src/testing/testing.go:1595 +0x238
testing.(*T).Run.func1()
/home/ia/go1.21.2.linux-amd64/go/src/testing/testing.go:1648 +0x44

Date: 2024-03-12 11:33:33-06:00

> go test -race ./eth
...
WARNING: DATA RACE
Read at 0x00000268c128 by goroutine 10750:
  github.com/ethereum/go-ethereum/eth.(*chainSyncer).nextSyncOp()
      /home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync.go:204 +0x216
  github.com/ethereum/go-ethereum/eth.(*chainSyncer).loop()
      /home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync.go:146 +0x3f3
  github.com/ethereum/go-ethereum/eth.(*handler).Start.func3()
      /home/ia/go/src/github.com/ethereum/go-ethereum/eth/handler.go:604 +0x33

Previous write at 0x00000268c128 by goroutine 8683:
  github.com/ethereum/go-ethereum/eth.TestArtificialFinalityFeatureEnablingDisabling_StaleHead()
      /home/ia/go/src/github.com/ethereum/go-ethereum/eth/sync_test.go:344 +0x16a
  testing.tRunner()
      /home/ia/go1.21.2.linux-amd64/go/src/testing/testing.go:1595 +0x238
  testing.(*T).Run.func1()
      /home/ia/go1.21.2.linux-amd64/go/src/testing/testing.go:1648 +0x44

Date: 2024-03-12 11:33:33-06:00
Signed-off-by: meows <b5c6@protonmail.com>
ziogaschr

This comment was marked as outdated.

@meowsbits meowsbits merged commit dca3897 into master Mar 13, 2024
7 checks passed
@meowsbits meowsbits deleted the fix-sync-race branch March 13, 2024 12:45
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.

2 participants