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

Data race in serverPool.start #15440

Closed
b00ris opened this issue Nov 8, 2017 · 0 comments
Closed

Data race in serverPool.start #15440

b00ris opened this issue Nov 8, 2017 · 0 comments

Comments

@b00ris
Copy link
Contributor

b00ris commented Nov 8, 2017

System information

Geth version: 1.7.2
OS & Version: Windows/Linux/OSX
Commit hash : a5d08c8

Expected behaviour

No data races in the code.

Actual behaviour

Data race caused channels assignment after starting reading goroutine.

Steps to reproduce the behaviour

I've found this data race while running test of Status-IM project: github.com/status-im/status-go/e2e/account_test.(*TestAccountsTestSuite).TestAccountsList()

Backtrace

WARNING: DATA RACE
Read at 0x00c4200db920 by goroutine 62:
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*serverPool).eventLoop()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/serverpool.go:281 +0x62

Previous write at 0x00c4200db920 by goroutine 32:
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*serverPool).start()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/serverpool.go:152 +0x342
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*LightEthereum).Start()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/backend.go:212 +0x221
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/node.(*Node).Start()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/node/node.go:196 +0xe17

....
WARNING: DATA RACE
Read at 0x00c4200db928 by goroutine 62:
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*serverPool).eventLoop()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/serverpool.go:314 +0x153

Previous write at 0x00c4200db928 by goroutine 32:
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*serverPool).start()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/serverpool.go:153 +0x3aa
  github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.(*LightEthereum).Start()
      /home/b00ris/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les/backend.go:212 +0x221
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

No branches or pull requests

2 participants