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

Another data race in LES #16921

Closed
AlekSi opened this issue Jun 7, 2018 · 2 comments
Closed

Another data race in LES #16921

AlekSi opened this issue Jun 7, 2018 · 2 comments

Comments

@AlekSi
Copy link

AlekSi commented Jun 7, 2018

Seems similar to #16610, but different.

Tagged Geth v1.8.10, built with Go 1.10.2 on macOS 10.13.5 with race detector enabled.

$ geth --syncmode=light --metrics --rpc --rpcapi=debug,net,eth

[…]

==================
WARNING: DATA RACE
Write at 0x00c43fd2c0a0 by goroutine 4619:
  github.com/ethereum/go-ethereum/les.(*ChtRequest).Validate()
      /XXX/src/github.com/ethereum/go-ethereum/les/odr_requests.go:457 +0x987
  github.com/ethereum/go-ethereum/les.(*LesOdr).Retrieve.func4()
      /XXX/src/github.com/ethereum/go-ethereum/les/odr.go:111 +0x90
  github.com/ethereum/go-ethereum/les.(*sentReq).deliver()
      /XXX/src/github.com/ethereum/go-ethereum/les/retrieve.go:366 +0x26e
  github.com/ethereum/go-ethereum/les.(*retrieveManager).deliver()
      /XXX/src/github.com/ethereum/go-ethereum/les/retrieve.go:172 +0x131
  github.com/ethereum/go-ethereum/les.(*ProtocolManager).handleMsg()
      /XXX/src/github.com/ethereum/go-ethereum/les/handler.go:1097 +0xc94
  github.com/ethereum/go-ethereum/les.(*ProtocolManager).handle()
      /XXX/src/github.com/ethereum/go-ethereum/les/handler.go:327 +0x837
  github.com/ethereum/go-ethereum/les.NewProtocolManager.func1()
      /XXX/src/github.com/ethereum/go-ethereum/les/handler.go:175 +0x325
  github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols.func1()
      /XXX/src/github.com/ethereum/go-ethereum/p2p/peer.go:348 +0x8b

Previous read at 0x00c43fd2c0a0 by goroutine 1256:
  github.com/ethereum/go-ethereum/light.GetHeaderByNumber()
      /XXX/src/github.com/ethereum/go-ethereum/light/odr_util.go:69 +0x3d7
  github.com/ethereum/go-ethereum/light.(*LightChain).GetHeaderByNumberOdr()
      /XXX/src/github.com/ethereum/go-ethereum/light/lightchain.go:448 +0xe1
  github.com/ethereum/go-ethereum/les.(*LesApiBackend).HeaderByNumber()
      /XXX/src/github.com/ethereum/go-ethereum/les/api_backend.go:64 +0x104
  github.com/ethereum/go-ethereum/eth/filters.(*Filter).indexedLogs()
      /XXX/src/github.com/ethereum/go-ethereum/eth/filters/filter.go:164 +0x386
  github.com/ethereum/go-ethereum/eth/filters.(*Filter).Logs()
      /XXX/src/github.com/ethereum/go-ethereum/eth/filters/filter.go:122 +0x4ca
  github.com/ethereum/go-ethereum/eth/filters.(*PublicFilterAPI).GetFilterLogs()
      /XXX/src/github.com/ethereum/go-ethereum/eth/filters/api.go:385 +0x2fd
  runtime.call128()
      /usr/local/Cellar/go/1.10.2/libexec/src/runtime/asm_amd64.s:575 +0x51
  reflect.Value.Call()
      /usr/local/Cellar/go/1.10.2/libexec/src/reflect/value.go:308 +0xc0
  github.com/ethereum/go-ethereum/rpc.(*Server).handle()
      /XXX/src/github.com/ethereum/go-ethereum/rpc/server.go:312 +0x1178
  github.com/ethereum/go-ethereum/rpc.(*Server).exec()
      /XXX/src/github.com/ethereum/go-ethereum/rpc/server.go:334 +0x24b
  github.com/ethereum/go-ethereum/rpc.(*Server).serveRequest.func2()
      /XXX/src/github.com/ethereum/go-ethereum/rpc/server.go:207 +0x151

Goroutine 4619 (running) created at:
  github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols()
      /XXX/src/github.com/ethereum/go-ethereum/p2p/peer.go:347 +0x2ed
  github.com/ethereum/go-ethereum/p2p.(*Peer).run()
      /XXX/src/github.com/ethereum/go-ethereum/p2p/peer.go:197 +0x164
  github.com/ethereum/go-ethereum/p2p.(*Server).runPeer()
      /XXX/src/github.com/ethereum/go-ethereum/p2p/server.go:894 +0x211

Goroutine 1256 (running) created at:
  github.com/ethereum/go-ethereum/rpc.(*Server).serveRequest()
      /XXX/src/github.com/ethereum/go-ethereum/rpc/server.go:202 +0x384
  github.com/ethereum/go-ethereum/rpc.(*Server).ServeCodec()
      /XXX/src/github.com/ethereum/go-ethereum/rpc/server.go:219 +0xb1
==================
@AlekSi
Copy link
Author

AlekSi commented Jun 7, 2018

/cc @ligi @zsfelfoldi

@rjl493456442
Copy link
Member

I think this issue has been fixed in #16776

@fjl fjl closed this as completed Sep 18, 2018
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

3 participants