This repository was archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Data race in storage.(*mockNetFetcher).Request() #1117
Copy link
Copy link
Closed
ethereum/go-ethereum
#18462Description
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