Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Data race in storage.(*mockNetFetcher).Request() #1117

@frncmx

Description

@frncmx

How to reproduce?

go test -race -count 1 -run TestNetStoreFetcherLifeCycleWithTimeout github.com/ethereum/go-ethereum/swarm/storage

Stacktrace

==================
WARNING: DATA RACE
Write at 0x00c00012a1f8 by goroutine 84:
  github.com/ethereum/go-ethereum/swarm/storage.(*mockNetFetcher).Request()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore_test.go:54 +0x56
  github.com/ethereum/go-ethereum/swarm/storage.(*fetcher).Fetch()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:276 +0x5e8
  github.com/ethereum/go-ethereum/swarm/storage.(*fetcher).Fetch-fm()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:155 +0x59
  github.com/ethereum/go-ethereum/swarm/storage.(*NetStore).FetchFunc.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:122 +0x50
  github.com/ethereum/go-ethereum/swarm/storage.TestNetStoreFetcherLifeCycleWithTimeout.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore_test.go:654 +0xc6

Previous write at 0x00c00012a1f8 by goroutine 86:
  github.com/ethereum/go-ethereum/swarm/storage.(*mockNetFetcher).Request()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore_test.go:54 +0x56
  github.com/ethereum/go-ethereum/swarm/storage.(*fetcher).Fetch()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:276 +0x5e8
  github.com/ethereum/go-ethereum/swarm/storage.(*fetcher).Fetch-fm()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:155 +0x59
  github.com/ethereum/go-ethereum/swarm/storage.(*NetStore).FetchFunc.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore.go:122 +0x50
  github.com/ethereum/go-ethereum/swarm/storage.TestNetStoreFetcherLifeCycleWithTimeout.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/storage/netstore_test.go:654 +0xc6

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions