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

ipld: race in Retriever #814

Closed
Wondertan opened this issue Jun 11, 2022 · 1 comment · Fixed by #815
Closed

ipld: race in Retriever #814

Wondertan opened this issue Jun 11, 2022 · 1 comment · Fixed by #815
Assignees
Labels
bug Something isn't working

Comments

@Wondertan
Copy link
Member

Wondertan commented Jun 11, 2022

The race is found in #702 branch, but locally.

=== RUN   TestShareAvailable_OneFullNode
2022-06-11T00:07:38.964+0200    ERROR   engine  decision/engine.go:691  wantlist index doesn't match peer's wantlist    {"peer": "1WRsHVXq899cA7"}
2022-06-11T00:07:38.989+0200    ERROR   engine  decision/engine.go:691  wantlist index doesn't match peer's wantlist    {"peer": "1WRsHVXbUUKN1C"}
2022-06-11T00:07:39.207+0200    ERROR   engine  decision/engine.go:691  wantlist index doesn't match peer's wantlist    {"peer": "1WRsHVXbUUKN1C"}
2022-06-11T00:07:39.503+0200    ERROR   engine  decision/engine.go:691  wantlist index doesn't match peer's wantlist    {"peer": "1WRsHVXecAgMfs"}
==================
WARNING: DATA RACE
Read at 0x00c0005ecc30 by goroutine 82302:
  github.com/celestiaorg/celestia-node/ipld.(*retrievalSession).doRequest.func1.1()
      /home/Wondertan/src/go/celestia-node/ipld/retriever.go:241 +0xe4
  github.com/celestiaorg/celestia-node/ipld.GetShares.func1()
      /home/Wondertan/src/go/celestia-node/ipld/get_shares.go:95 +0x242
  github.com/gammazero/workerpool.startWorker()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:233 +0x35
  github.com/gammazero/workerpool.(*WorkerPool).dispatch.func2()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:195 +0x47

Previous write at 0x00c0005ecc30 by goroutine 29115:
  github.com/celestiaorg/celestia-node/ipld.(*retrievalSession).doRequest.func1.1()
      /home/Wondertan/src/go/celestia-node/ipld/retriever.go:242 +0x144
  github.com/celestiaorg/celestia-node/ipld.GetShares.func1()
      /home/Wondertan/src/go/celestia-node/ipld/get_shares.go:95 +0x242
  github.com/gammazero/workerpool.worker()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:243 +0x34
  github.com/gammazero/workerpool.startWorker.func1()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:234 +0x39

Goroutine 82302 (running) created at:
  github.com/gammazero/workerpool.(*WorkerPool).dispatch()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:195 +0x41b
  github.com/gammazero/workerpool.New.func1()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:37 +0x39

Goroutine 29115 (running) created at:
  github.com/gammazero/workerpool.startWorker()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:234 +0xa4
  github.com/gammazero/workerpool.(*WorkerPool).dispatch.func2()
      /home/Wondertan/go/pkg/mod/github.com/gammazero/workerpool@v1.1.2/workerpool.go:195 +0x47
==================

@Wondertan Wondertan added the bug Something isn't working label Jun 11, 2022
@Wondertan Wondertan self-assigned this Jun 11, 2022
@Wondertan
Copy link
Member Author

Note that I already have a fix for it and will post after adding more comments in the code with some explanations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant