Skip to content

DATA RACE between newMConnConnection and SetChannelDescriptors (TestPEXReactorRunning) #5941

@melekes

Description

@melekes
WARNING: DATA RACE
Read at 0x00c0004c28d0 by goroutine 60:
  github.com/tendermint/tendermint/p2p.newMConnConnection()
      /home/runner/work/tendermint/tendermint/p2p/transport_mconn.go:521 +0x1010
  github.com/tendermint/tendermint/p2p.(*MConnTransport).accept.func1()
      /home/runner/work/tendermint/tendermint/p2p/transport_mconn.go:203 +0x3f0

Previous write at 0x00c0004c28d0 by goroutine 36:
  github.com/tendermint/tendermint/p2p.(*MConnTransport).SetChannelDescriptors()
      /home/runner/work/tendermint/tendermint/p2p/transport_mconn.go:138 +0x4a
  github.com/tendermint/tendermint/p2p.(*Switch).OnStart()
      /home/runner/work/tendermint/tendermint/p2p/switch.go:233 +0xc2
  github.com/tendermint/tendermint/libs/service.(*BaseService).Start()
      /home/runner/work/tendermint/tendermint/libs/service/service.go:140 +0x538
  github.com/tendermint/tendermint/p2p/pex.TestPEXReactorRunning()
      /home/runner/work/tendermint/tendermint/p2p/pex/pex_reactor_test.go:108 +0x428
  testing.tRunner()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1123 +0x202

Goroutine 60 (running) created at:
  github.com/tendermint/tendermint/p2p.(*MConnTransport).accept()
      /home/runner/work/tendermint/tendermint/p2p/transport_mconn.go:190 +0x75

Goroutine 36 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1168 +0x5bb
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1439 +0xa6
  testing.tRunner()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1123 +0x202
  testing.runTests()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1437 +0x612
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1345 +0x3b3
  main.main()
      _testmain.go:167 +0x356
==================
--- FAIL: TestPEXReactorRunning (0.31s)
    testing.go:1038: race detected during execution of test

Metadata

Metadata

Assignees

Labels

C:p2pComponent: P2P pkgT:testType: Tests that need love

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions