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 swarm/network/protocol.go TestBzzHandshakeLightNode #1115

@frncmx

Description

@frncmx

How to reproduce?

go test -race -count 1 -run TestBzzHandshakeLightNode ./swarm/network

Stacktrace

==================
WARNING: DATA RACE
Read at 0x00c0002d8888 by goroutine 17:
  github.com/ethereum/go-ethereum/swarm/network.TestBzzHandshakeLightNode.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/network/protocol_test.go:240 +0x4e7
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:827 +0x162

Previous write at 0x00c0002d8888 by goroutine 76:
  github.com/ethereum/go-ethereum/swarm/network.(*Bzz).performHandshake()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/network/protocol.go:209 +0x23e
  github.com/ethereum/go-ethereum/swarm/network.(*Bzz).runBzz()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/network/protocol.go:223 +0x382
  github.com/ethereum/go-ethereum/swarm/network.(*Bzz).runBzz-fm()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/network/protocol.go:125 +0x63
  github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols.func1()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/p2p/peer.go:361 +0x8d

Goroutine 17 (running) created at:
  testing.(*T).Run()
      /usr/lib/go/src/testing/testing.go:878 +0x659
  github.com/ethereum/go-ethereum/swarm/network.TestBzzHandshakeLightNode()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/swarm/network/protocol_test.go:225 +0x1ce
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:827 +0x162

Goroutine 76 (running) created at:
  github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/p2p/peer.go:360 +0x2a8
  github.com/ethereum/go-ethereum/p2p.(*Peer).run()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/p2p/peer.go:210 +0x16a
  github.com/ethereum/go-ethereum/p2p.(*Server).runPeer()
      /home/frncmx/code/src/github.com/ethereum/go-ethereum/p2p/server.go:1002 +0x25d
==================

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions