Skip to content

privval: race condition in test #3179

@ebuchman

Description

@ebuchman
?   	github.com/tendermint/tendermint/p2p/dummy	[no test files]
==================
WARNING: DATA RACE
Write at 0x00c0001a3551 by goroutine 100:
  testing.(*common).FailNow()
      /usr/local/go/src/testing/testing.go:589 +0x4c
  testing.(*common).Fatal()
      /usr/local/go/src/testing/testing.go:628 +0x7c
  github.com/tendermint/tendermint/privval.TestListenerConnectDeadlines()
      /go/src/github.com/tendermint/tendermint/privval/socket_test.go:128 +0x268
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:827 +0x162

Previous write at 0x00c0001a3551 by goroutine 94:
  testing.(*common).FailNow()
      /usr/local/go/src/testing/testing.go:589 +0x4c
  testing.(*common).Fatal()
      /usr/local/go/src/testing/testing.go:628 +0x7c
  github.com/tendermint/tendermint/privval.TestListenerConnectDeadlines.func1()
      /go/src/github.com/tendermint/tendermint/privval/socket_test.go:108 +0xff

Goroutine 100 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:878 +0x659
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1119 +0xa8
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:827 +0x162
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1117 +0x4ee
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1034 +0x2ee
  main.main()
      _testmain.go:156 +0x332

Goroutine 94 (finished) created at:
  github.com/tendermint/tendermint/privval.TestListenerConnectDeadlines()
      /go/src/github.com/tendermint/tendermint/privval/socket_test.go:103 +0x1e6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:827 +0x162
==================
--- FAIL: TestListenerConnectDeadlines (0.11s)
    socket_test.go:108: read tcp 127.0.0.1:37827->127.0.0.1:38846: i/o timeout
    socket_test.go:128: read tcp 127.0.0.1:38846->127.0.0.1:37827: i/o timeout
    testing.go:771: race detected during execution of test
FAIL
coverage: 87.6% of statements
FAIL	github.com/tendermint/tendermint/privval	1.787s

Metadata

Metadata

Assignees

No one assigned

    Labels

    T:bugType Bug (Confirmed)T:testType: Tests that need loveT:validatorType: Validator related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions