influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.81k stars 5.59k forks source link

Running tests with Go built-in data race detector enabled exposes a plenty of data races #7729

Closed programmer04 closed 4 years ago

programmer04 commented 4 years ago

Howdy!

In makefile there is a default target for executing tests:

make test

and it runs:

go test -short ./... 

let's check what will happen if someone runs below (I did it led by my curiosity 🙂 ):

go test -short -race ./...

I decided to report it because from experience any data race can introduce nasty and hard to detect bugs even if under most circumstances program works fine.

Everything was tested on master a3aaa2f7bb2350a89f746105704c51674c3f1056 (the newest code available during filling this issue).

System info:

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jakubwarczarek/Library/Caches/go-build"
GOENV="/Users/jakubwarczarek/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jakubwarczarek/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/go-build644617762=/tmp/go-build -gno-record-gcc-switches -fno-common"

Steps to reproduce:

go test -short -race ./... 

Expected behavior:

All tests pass successfully, no data races are detected.

Actual behavior:

A plenty of data races are detected.

?       github.com/influxdata/telegraf  [no test files]
ok      github.com/influxdata/telegraf/agent    
?       github.com/influxdata/telegraf/cmd/telegraf [no test files]
ok      github.com/influxdata/telegraf/config   
?       github.com/influxdata/telegraf/config/aws   [no test files]
ok      github.com/influxdata/telegraf/filter   
ok      github.com/influxdata/telegraf/internal 
?       github.com/influxdata/telegraf/internal/choice  [no test files]
ok      github.com/influxdata/telegraf/internal/docker  
ok      github.com/influxdata/telegraf/internal/globpath    
?       github.com/influxdata/telegraf/internal/goplugin    [no test files]
?       github.com/influxdata/telegraf/internal/limiter [no test files]
ok      github.com/influxdata/telegraf/internal/rotate  
ok      github.com/influxdata/telegraf/internal/syslog  
ok      github.com/influxdata/telegraf/internal/templating  
ok      github.com/influxdata/telegraf/internal/tls 
ok      github.com/influxdata/telegraf/logger   
ok      github.com/influxdata/telegraf/metric   
ok      github.com/influxdata/telegraf/models   
?       github.com/influxdata/telegraf/plugins/aggregators  [no test files]
?       github.com/influxdata/telegraf/plugins/aggregators/all  [no test files]
ok      github.com/influxdata/telegraf/plugins/aggregators/basicstats   
ok      github.com/influxdata/telegraf/plugins/aggregators/final    
ok      github.com/influxdata/telegraf/plugins/aggregators/histogram    
ok      github.com/influxdata/telegraf/plugins/aggregators/merge    
ok      github.com/influxdata/telegraf/plugins/aggregators/minmax   
ok      github.com/influxdata/telegraf/plugins/aggregators/valuecounter 
?       github.com/influxdata/telegraf/plugins/common/kafka [no test files]
?       github.com/influxdata/telegraf/plugins/common/logrus    [no test files]
?       github.com/influxdata/telegraf/plugins/inputs   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/activemq  
ok      github.com/influxdata/telegraf/plugins/inputs/aerospike 
?       github.com/influxdata/telegraf/plugins/inputs/all   [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/amqp_consumer [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/apache    
ok      github.com/influxdata/telegraf/plugins/inputs/apcupsd   
ok      github.com/influxdata/telegraf/plugins/inputs/aurora    
?       github.com/influxdata/telegraf/plugins/inputs/azure_storage_queue   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/bcache    
ok      github.com/influxdata/telegraf/plugins/inputs/beanstalkd    
ok      github.com/influxdata/telegraf/plugins/inputs/bind  
ok      github.com/influxdata/telegraf/plugins/inputs/bond  
ok      github.com/influxdata/telegraf/plugins/inputs/burrow    
ok      github.com/influxdata/telegraf/plugins/inputs/cassandra 
ok      github.com/influxdata/telegraf/plugins/inputs/ceph  
?       github.com/influxdata/telegraf/plugins/inputs/cgroup    [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/chrony    
ok      github.com/influxdata/telegraf/plugins/inputs/cisco_telemetry_gnmi  
ok      github.com/influxdata/telegraf/plugins/inputs/cisco_telemetry_mdt   
ok      github.com/influxdata/telegraf/plugins/inputs/clickhouse    
ok      github.com/influxdata/telegraf/plugins/inputs/cloud_pubsub  
ok      github.com/influxdata/telegraf/plugins/inputs/cloud_pubsub_push 
ok      github.com/influxdata/telegraf/plugins/inputs/cloudwatch    
?       github.com/influxdata/telegraf/plugins/inputs/conntrack [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/consul    
ok      github.com/influxdata/telegraf/plugins/inputs/couchbase 
ok      github.com/influxdata/telegraf/plugins/inputs/couchdb   
ok      github.com/influxdata/telegraf/plugins/inputs/cpu   
ok      github.com/influxdata/telegraf/plugins/inputs/dcos  
ok      github.com/influxdata/telegraf/plugins/inputs/disk  
ok      github.com/influxdata/telegraf/plugins/inputs/diskio    
ok      github.com/influxdata/telegraf/plugins/inputs/disque    
?       github.com/influxdata/telegraf/plugins/inputs/dmcache   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/dns_query 
ok      github.com/influxdata/telegraf/plugins/inputs/docker    
ok      github.com/influxdata/telegraf/plugins/inputs/docker_log    
ok      github.com/influxdata/telegraf/plugins/inputs/dovecot   
ok      github.com/influxdata/telegraf/plugins/inputs/ecs   
ok      github.com/influxdata/telegraf/plugins/inputs/elasticsearch 
?       github.com/influxdata/telegraf/plugins/inputs/ethtool   [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/eventhub_consumer [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/exec  
ok      github.com/influxdata/telegraf/plugins/inputs/execd 
?       github.com/influxdata/telegraf/plugins/inputs/execd/examples    [no test files]
==================
WARNING: DATA RACE
Read at 0x00c000298000 by goroutine 18:
  bytes.(*Buffer).Len()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:73 +0x3c9
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:27 +0x34f
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c000298000 by goroutine 19:
  bytes.(*Buffer).grow()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:144 +0x23c
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:172 +0x154
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Goroutine 18 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c000298018 by goroutine 18:
  bytes.(*Buffer).Len()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:73 +0x3ef
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:27 +0x34f
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c000298018 by goroutine 19:
  bytes.(*Buffer).grow()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:147 +0x27f
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:172 +0x154
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Goroutine 18 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c0002a4000 by goroutine 18:
  runtime.slicebytetostring()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/string.go:75 +0x0
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:32 +0x484
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0002a4000 by goroutine 19:
  runtime.slicecopy()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/slice.go:197 +0x0
  bytes.(*Buffer).grow()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:143 +0x22b
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:172 +0x154
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Goroutine 18 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c0002a4030 by goroutine 18:
  runtime.slicebytetostring()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/string.go:75 +0x0
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:32 +0x484
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0002a4030 by goroutine 19:
  runtime.slicecopy()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/slice.go:197 +0x0
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:174 +0x115
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Goroutine 18 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestShimWorks (0.02s)
    shim_test.go:28: Waiting for bytes available in stdout
    testing.go:906: race detected during execution of test
==================
WARNING: DATA RACE
Write at 0x000001c516c0 by goroutine 25:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimStdinSignalingWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:42 +0x3f5
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous read at 0x000001c516c0 by goroutine 22:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).stdinCollectMetricsPrompt()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:166 +0x93

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 22 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:120 +0x4b0
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46
==================
==================
WARNING: DATA RACE
Write at 0x000001c516d0 by goroutine 25:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimStdinSignalingWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:43 +0x42c
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous read at 0x000001c516d0 by goroutine 19:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x733
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestShimStdinSignalingWorks (0.01s)
==================
WARNING: DATA RACE
Read at 0x00c00029c028 by goroutine 19:
    testing.go:906: race detected during execution of test
  io.(*PipeWriter).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:163 +0x3e
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Previous write at 0x00c00029c028 by goroutine 25:
  io.Pipe()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:203 +0x3cb
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimStdinSignalingWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:40 +0x1fd
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223
==================
==================
WARNING: DATA RACE
Read at 0x00c00029a328 by goroutine 19:
  io.(*pipe).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:86 +0x78
  io.(*PipeWriter).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:163 +0x6d
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Previous write at 0x00c00029a328 by goroutine 25:
  io.Pipe()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:198 +0x29b
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimStdinSignalingWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:40 +0x1fd
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 25 (finished) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223
==================
==================
WARNING: DATA RACE
Write at 0x00c00029a300 by goroutine 19:
  sync/atomic.CompareAndSwapInt32()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/race_amd64.s:293 +0xb
  sync.(*Mutex).Lock()
      /usr/local/Cellar/go/1.14.4/libexec/src/sync/mutex.go:74 +0x49
  io.(*pipe).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:89 +0xb2
  io.(*PipeWriter).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:163 +0x6d
  fmt.Fprint()
      /usr/local/Cellar/go/1.14.4/libexec/src/fmt/print.go:233 +0xb2
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.(*Shim).Run()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/goshim.go:144 +0x76e
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:74 +0x46

Previous write at 0x00c00029a300 by goroutine 25:
  io.Pipe()
      /usr/local/Cellar/go/1.14.4/libexec/src/io/pipe.go:198 +0x29b
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimStdinSignalingWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:40 +0x1fd
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 19 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.runInputPlugin()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:73 +0x1a7
  github.com/influxdata/telegraf/plugins/inputs/execd/shim.TestShimWorks()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/execd/shim/shim_test.go:24 +0x337
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 25 (finished) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:50 +0x223
==================
--- FAIL: TestLoadConfig (0.00s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/execd/shim    0.648s
?       github.com/influxdata/telegraf/plugins/inputs/execd/shim/example/cmd    [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/fail2ban  
ok      github.com/influxdata/telegraf/plugins/inputs/fibaro    
ok      github.com/influxdata/telegraf/plugins/inputs/file  
ok      github.com/influxdata/telegraf/plugins/inputs/filecount 
ok      github.com/influxdata/telegraf/plugins/inputs/filestat  
ok      github.com/influxdata/telegraf/plugins/inputs/fireboard 
ok      github.com/influxdata/telegraf/plugins/inputs/fluentd   
ok      github.com/influxdata/telegraf/plugins/inputs/github    
ok      github.com/influxdata/telegraf/plugins/inputs/graylog   
ok      github.com/influxdata/telegraf/plugins/inputs/haproxy   
ok      github.com/influxdata/telegraf/plugins/inputs/hddtemp   
ok      github.com/influxdata/telegraf/plugins/inputs/hddtemp/go-hddtemp    
ok      github.com/influxdata/telegraf/plugins/inputs/http  
ok      github.com/influxdata/telegraf/plugins/inputs/http_listener_v2  
ok      github.com/influxdata/telegraf/plugins/inputs/http_response 
ok      github.com/influxdata/telegraf/plugins/inputs/httpjson  
ok      github.com/influxdata/telegraf/plugins/inputs/icinga2   
?       github.com/influxdata/telegraf/plugins/inputs/infiniband    [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/influxdb  
ok      github.com/influxdata/telegraf/plugins/inputs/influxdb_listener 
ok      github.com/influxdata/telegraf/plugins/inputs/internal  
ok      github.com/influxdata/telegraf/plugins/inputs/interrupts    
ok      github.com/influxdata/telegraf/plugins/inputs/ipmi_sensor   
ok      github.com/influxdata/telegraf/plugins/inputs/ipset 
?       github.com/influxdata/telegraf/plugins/inputs/iptables  [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/ipvs  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/jenkins   
ok      github.com/influxdata/telegraf/plugins/inputs/jolokia   
ok      github.com/influxdata/telegraf/plugins/inputs/jolokia2  
ok      github.com/influxdata/telegraf/plugins/inputs/jti_openconfig_telemetry  
?       github.com/influxdata/telegraf/plugins/inputs/jti_openconfig_telemetry/auth [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/jti_openconfig_telemetry/oc   [no test files]
2020/06/24 16:23:44 W! [] Use of deprecated configuration: enable_tls should be set when using TLS
==================
WARNING: DATA RACE
Write at 0x00c000226080 by goroutine 26:
  github.com/influxdata/telegraf/plugins/inputs/kafka_consumer.TestConsumerGroupHandler_ConsumeClaim.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/kafka_consumer/kafka_consumer_test.go:292 +0x8a

Previous write at 0x00c000226080 by goroutine 24:
  github.com/influxdata/telegraf/plugins/inputs/kafka_consumer.TestConsumerGroupHandler_ConsumeClaim()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/kafka_consumer/kafka_consumer_test.go:299 +0x7b4
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 26 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/kafka_consumer.TestConsumerGroupHandler_ConsumeClaim()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/kafka_consumer/kafka_consumer_test.go:291 +0x738
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 24 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:52 +0x223
==================
--- FAIL: TestConsumerGroupHandler_ConsumeClaim (0.00s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/kafka_consumer    0.493s
ok      github.com/influxdata/telegraf/plugins/inputs/kafka_consumer_legacy 
ok      github.com/influxdata/telegraf/plugins/inputs/kapacitor 
?       github.com/influxdata/telegraf/plugins/inputs/kernel    [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/kernel_vmstat [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/kibana    
?       github.com/influxdata/telegraf/plugins/inputs/kinesis_consumer  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/kube_inventory    
ok      github.com/influxdata/telegraf/plugins/inputs/kubernetes    
ok      github.com/influxdata/telegraf/plugins/inputs/lanz  
ok      github.com/influxdata/telegraf/plugins/inputs/leofs 
ok      github.com/influxdata/telegraf/plugins/inputs/linux_sysctl_fs   
ok      github.com/influxdata/telegraf/plugins/inputs/logparser 
ok      github.com/influxdata/telegraf/plugins/inputs/logstash  
ok      github.com/influxdata/telegraf/plugins/inputs/lustre2   
ok      github.com/influxdata/telegraf/plugins/inputs/mailchimp 
ok      github.com/influxdata/telegraf/plugins/inputs/marklogic 
ok      github.com/influxdata/telegraf/plugins/inputs/mcrouter  
ok      github.com/influxdata/telegraf/plugins/inputs/mem   
ok      github.com/influxdata/telegraf/plugins/inputs/memcached 
ok      github.com/influxdata/telegraf/plugins/inputs/mesos 
ok      github.com/influxdata/telegraf/plugins/inputs/minecraft 
?       github.com/influxdata/telegraf/plugins/inputs/minecraft/internal/rcon   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/modbus    
ok      github.com/influxdata/telegraf/plugins/inputs/mongodb   
ok      github.com/influxdata/telegraf/plugins/inputs/monit 
ok      github.com/influxdata/telegraf/plugins/inputs/mqtt_consumer 
ok      github.com/influxdata/telegraf/plugins/inputs/multifile 
ok      github.com/influxdata/telegraf/plugins/inputs/mysql 
?       github.com/influxdata/telegraf/plugins/inputs/mysql/v1  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/mysql/v2  
ok      github.com/influxdata/telegraf/plugins/inputs/nats  
?       github.com/influxdata/telegraf/plugins/inputs/nats_consumer [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/neptune_apex  
ok      github.com/influxdata/telegraf/plugins/inputs/net   
ok      github.com/influxdata/telegraf/plugins/inputs/net_response  
ok      github.com/influxdata/telegraf/plugins/inputs/nginx 
ok      github.com/influxdata/telegraf/plugins/inputs/nginx_plus    
ok      github.com/influxdata/telegraf/plugins/inputs/nginx_plus_api    
ok      github.com/influxdata/telegraf/plugins/inputs/nginx_upstream_check  
ok      github.com/influxdata/telegraf/plugins/inputs/nginx_vts 
ok      github.com/influxdata/telegraf/plugins/inputs/nsq   
ok      github.com/influxdata/telegraf/plugins/inputs/nsq_consumer  
ok      github.com/influxdata/telegraf/plugins/inputs/nstat 
ok      github.com/influxdata/telegraf/plugins/inputs/ntpq  
ok      github.com/influxdata/telegraf/plugins/inputs/nvidia_smi    
ok      github.com/influxdata/telegraf/plugins/inputs/openldap  
ok      github.com/influxdata/telegraf/plugins/inputs/openntpd  
ok      github.com/influxdata/telegraf/plugins/inputs/opensmtpd 
ok      github.com/influxdata/telegraf/plugins/inputs/openweathermap    
ok      github.com/influxdata/telegraf/plugins/inputs/passenger 
ok      github.com/influxdata/telegraf/plugins/inputs/pf    
ok      github.com/influxdata/telegraf/plugins/inputs/pgbouncer 
==================
WARNING: DATA RACE
Read at 0x00c00015c508 by goroutine 38:
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).gatherServer()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:119 +0x64
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:108 +0xbe

Previous write at 0x00c00015c508 by goroutine 37:
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).gatherServer()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:127 +0x988
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:108 +0xbe

Goroutine 38 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:106 +0x1cc
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather-fm()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:92 +0x55
  github.com/influxdata/telegraf/testutil.(*Accumulator).GatherError()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/accumulator.go:300 +0x4d
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.TestPhpFpmGeneratesMetrics_From_Multiple_Sockets_With_Glob()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm_test.go:182 +0x5ef
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 37 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:106 +0x1cc
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.(*phpfpm).Gather-fm()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm.go:92 +0x55
  github.com/influxdata/telegraf/testutil.(*Accumulator).GatherError()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/accumulator.go:300 +0x4d
  github.com/influxdata/telegraf/plugins/inputs/phpfpm.TestPhpFpmGeneratesMetrics_From_Multiple_Sockets_With_Glob()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/phpfpm/phpfpm_test.go:182 +0x5ef
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestPhpFpmGeneratesMetrics_From_Multiple_Sockets_With_Glob (0.02s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/phpfpm    0.549s
ok      github.com/influxdata/telegraf/plugins/inputs/ping  
ok      github.com/influxdata/telegraf/plugins/inputs/postfix   
ok      github.com/influxdata/telegraf/plugins/inputs/postgresql    
ok      github.com/influxdata/telegraf/plugins/inputs/postgresql_extensible 
ok      github.com/influxdata/telegraf/plugins/inputs/powerdns  
ok      github.com/influxdata/telegraf/plugins/inputs/powerdns_recursor 
ok      github.com/influxdata/telegraf/plugins/inputs/processes 
ok      github.com/influxdata/telegraf/plugins/inputs/procstat  
ok      github.com/influxdata/telegraf/plugins/inputs/prometheus    
ok      github.com/influxdata/telegraf/plugins/inputs/puppetagent   
ok      github.com/influxdata/telegraf/plugins/inputs/rabbitmq  
ok      github.com/influxdata/telegraf/plugins/inputs/raindrops 
ok      github.com/influxdata/telegraf/plugins/inputs/redfish   
ok      github.com/influxdata/telegraf/plugins/inputs/redis 
ok      github.com/influxdata/telegraf/plugins/inputs/rethinkdb 
ok      github.com/influxdata/telegraf/plugins/inputs/riak  
ok      github.com/influxdata/telegraf/plugins/inputs/salesforce    
?       github.com/influxdata/telegraf/plugins/inputs/sensors   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/sflow 
ok      github.com/influxdata/telegraf/plugins/inputs/sflow/binaryio    
ok      github.com/influxdata/telegraf/plugins/inputs/smart 
ok      github.com/influxdata/telegraf/plugins/inputs/snmp  
?       github.com/influxdata/telegraf/plugins/inputs/snmp_legacy   [no test files]
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
==================
WARNING: DATA RACE
Read at 0x00c0001d6538 by goroutine 27:
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.(*SnmpTrap).snmptranslate()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap.go:395 +0x1a2
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.(*SnmpTrap).lookup()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap.go:372 +0x1be
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.makeTrapHandler.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap.go:341 +0x9ea
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.TestReceiveTrap.func1.1.1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap_test.go:1268 +0x59
  github.com/soniah/gosnmp.(*TrapListener).listenUDP()
      /Users/jakubwarczarek/go/pkg/mod/github.com/soniah/gosnmp@v1.25.0/trap.go:176 +0x350
  github.com/soniah/gosnmp.(*TrapListener).Listen()
      /Users/jakubwarczarek/go/pkg/mod/github.com/soniah/gosnmp@v1.25.0/trap.go:277 +0x228
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.(*SnmpTrap).Start.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap.go:237 +0x6e

Previous write at 0x00c0001d6538 by goroutine 26:
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.TestReceiveTrap.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap_test.go:1301 +0xa96
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 27 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.(*SnmpTrap).Start()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap.go:236 +0x6fb
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.TestReceiveTrap.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap_test.go:1291 +0x8ad
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 26 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  github.com/influxdata/telegraf/plugins/inputs/snmp_trap.TestReceiveTrap()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/snmp_trap/snmp_trap_test.go:1255 +0x784c
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
2020/06/24 16:23:45 E! [] Error resolving OID: mock snmptranslate -Td -Ob -m all .1.3.6.1.2.1.1.3.0
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
2020/06/24 16:23:45 I! [] Listening on udp://:12399
--- FAIL: TestReceiveTrap (0.30s)
    --- FAIL: TestReceiveTrap/missing_oid (0.00s)
        testing.go:906: race detected during execution of test
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/snmp_trap 0.958s
ok      github.com/influxdata/telegraf/plugins/inputs/socket_listener   
ok      github.com/influxdata/telegraf/plugins/inputs/solr  
ok      github.com/influxdata/telegraf/plugins/inputs/sqlserver 
==================
WARNING: DATA RACE
Read at 0x00c000357578 by goroutine 75:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:46 +0x18b
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Previous write at 0x00c000357578 by goroutine 76:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:46 +0x204
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Goroutine 75 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 76 (finished) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c000363268 by goroutine 75:
  runtime.growslice()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/slice.go:76 +0x0
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:46 +0x331
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Previous write at 0x00c000363268 by goroutine 76:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:46 +0x1d3
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Goroutine 75 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 76 (finished) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c000416470 by goroutine 75:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1.2()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:768 +0xa4
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:47 +0x27e
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Previous write at 0x00c000416470 by goroutine 76:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1.2()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:769 +0x120
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*MockStackdriverClient).ListTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:47 +0x27e
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).gatherTimeSeries()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:595 +0xce
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:310 +0xbe

Goroutine 75 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 76 (finished) created at:
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.(*Stackdriver).Gather()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver.go:308 +0x539
  github.com/influxdata/telegraf/plugins/inputs/stackdriver.TestGatherAlign.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/stackdriver/stackdriver_test.go:791 +0x5ab
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestGatherAlign (0.00s)
    --- FAIL: TestGatherAlign/align (0.00s)
        testing.go:906: race detected during execution of test
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/stackdriver   1.376s
ok      github.com/influxdata/telegraf/plugins/inputs/statsd    
==================
WARNING: DATA RACE
Write at 0x00c000d8a020 by goroutine 18:
  github.com/influxdata/telegraf/plugins/inputs/suricata.TestSuricata()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/suricata/suricata_test.go:77 +0x68d
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous read at 0x00c000d8a020 by goroutine 20:
  github.com/influxdata/telegraf/plugins/inputs/suricata.(*Suricata).handleServerConnection()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/suricata/suricata.go:116 +0x6e

Goroutine 18 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:60 +0x223

Goroutine 20 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/suricata.(*Suricata).Start.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/suricata/suricata.go:76 +0xd4
==================
--- FAIL: TestSuricata (0.01s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/suricata  1.583s
ok      github.com/influxdata/telegraf/plugins/inputs/swap  
?       github.com/influxdata/telegraf/plugins/inputs/synproxy  [no test files]
==================
WARNING: DATA RACE
Read at 0x00c000108498 by goroutine 25:
  github.com/influxdata/telegraf/testutil.(*Accumulator).AddError()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/accumulator.go:227 +0x6c
  github.com/influxdata/telegraf/plugins/inputs/syslog.(*Syslog).listenPacket()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/syslog.go:241 +0x2d2

Previous write at 0x00c000108498 by goroutine 42:
  github.com/influxdata/telegraf/plugins/inputs/syslog.testRFC5426.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/rfc5426_test.go:240 +0x257
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 25 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/syslog.(*Syslog).Start()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/syslog.go:168 +0x7f4
  github.com/influxdata/telegraf/plugins/inputs/syslog.testRFC5426.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/rfc5426_test.go:235 +0x17f
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Goroutine 42 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  github.com/influxdata/telegraf/plugins/inputs/syslog.testRFC5426()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/rfc5426_test.go:231 +0x22c
  github.com/influxdata/telegraf/plugins/inputs/syslog.TestBestEffort_unixgram()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/syslog/rfc5426_test.go:296 +0x1e7
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestBestEffort_unixgram (0.01s)
    --- FAIL: TestBestEffort_unixgram/minimal/incomplete (0.00s)
        testing.go:906: race detected during execution of test
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/syslog    3.175s
?       github.com/influxdata/telegraf/plugins/inputs/sysstat   [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/system    [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/systemd_units [no test files]
2020/06/24 16:23:46 D! [] Tail added for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/037872809"
2020/06/24 16:23:46 D! [] Tail removed for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/037872809"
2020/06/24 16:23:46 D! [] Tail added for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/929868788"
2020/06/24 16:23:46 D! [] Recording offset 61 for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/929868788"
2020/06/24 16:23:46 D! [] Tail removed for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/929868788"
2020/06/24 16:23:46 D! [] Tail added for "/var/folders/lh/yzgq0xxj1kbc5cbchsjzps_40000gn/T/608888515"
==================
WARNING: DATA RACE
Read at 0x00c0002203a8 by goroutine 19:
  bytes.(*Buffer).String()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:65 +0x6ca
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:132 +0x640
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0002203a8 by goroutine 22:
  bytes.(*Buffer).grow()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:147 +0x27f
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:172 +0x154
  log.(*Logger).Output()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:181 +0x39d
  log.Printf()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:320 +0xb5
  github.com/influxdata/telegraf/testutil.Logger.Errorf()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/log.go:14 +0x112
  github.com/influxdata/telegraf/testutil.(*Logger).Errorf()
      <autogenerated>:1 +0x3c
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).receiver()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:263 +0x7aa
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:210 +0xb7

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:54 +0x223

Goroutine 22 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:208 +0x6ed
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).Start()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:138 +0x247
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:120 +0x424
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c000220390 by goroutine 19:
  bytes.(*Buffer).String()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:65 +0x6e4
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:132 +0x640
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c000220390 by goroutine 22:
  bytes.(*Buffer).grow()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:144 +0x23c
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:172 +0x154
  log.(*Logger).Output()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:181 +0x39d
  log.Printf()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:320 +0xb5
  github.com/influxdata/telegraf/testutil.Logger.Errorf()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/log.go:14 +0x112
  github.com/influxdata/telegraf/testutil.(*Logger).Errorf()
      <autogenerated>:1 +0x3c
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).receiver()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:263 +0x7aa
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:210 +0xb7

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:54 +0x223

Goroutine 22 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:208 +0x6ed
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).Start()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:138 +0x247
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:120 +0x424
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
==================
WARNING: DATA RACE
Read at 0x00c0000ce0e0 by goroutine 19:
  runtime.slicebytetostring()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/string.go:75 +0x0
  bytes.(*Buffer).String()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:65 +0x737
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:132 +0x640
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0000ce0e0 by goroutine 22:
  runtime.slicecopy()
      /usr/local/Cellar/go/1.14.4/libexec/src/runtime/slice.go:197 +0x0
  bytes.(*Buffer).Write()
      /usr/local/Cellar/go/1.14.4/libexec/src/bytes/buffer.go:174 +0x115
  log.(*Logger).Output()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:181 +0x39d
  log.Printf()
      /usr/local/Cellar/go/1.14.4/libexec/src/log/log.go:320 +0xb5
  github.com/influxdata/telegraf/testutil.Logger.Errorf()
      /Users/jakubwarczarek/Documents/my/telegraf/testutil/log.go:14 +0x112
  github.com/influxdata/telegraf/testutil.(*Logger).Errorf()
      <autogenerated>:1 +0x3c
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).receiver()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:263 +0x7aa
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:210 +0xb7

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:54 +0x223

Goroutine 22 (running) created at:
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).tailNewFiles()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:208 +0x6ed
  github.com/influxdata/telegraf/plugins/inputs/tail.(*Tail).Start()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail.go:138 +0x247
  github.com/influxdata/telegraf/plugins/inputs/tail.TestTailBadLine()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/inputs/tail/tail_test.go:120 +0x424
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestTailBadLine (0.51s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/inputs/tail  1.796s
ok      github.com/influxdata/telegraf/plugins/inputs/tcp_listener  
ok      github.com/influxdata/telegraf/plugins/inputs/teamspeak 
ok      github.com/influxdata/telegraf/plugins/inputs/temp  
ok      github.com/influxdata/telegraf/plugins/inputs/tengine   
ok      github.com/influxdata/telegraf/plugins/inputs/tomcat    
ok      github.com/influxdata/telegraf/plugins/inputs/trig  
ok      github.com/influxdata/telegraf/plugins/inputs/twemproxy 
ok      github.com/influxdata/telegraf/plugins/inputs/udp_listener  
ok      github.com/influxdata/telegraf/plugins/inputs/unbound   
ok      github.com/influxdata/telegraf/plugins/inputs/uwsgi 
ok      github.com/influxdata/telegraf/plugins/inputs/varnish   
ok      github.com/influxdata/telegraf/plugins/inputs/vsphere   
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks  
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/filestack    
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/github   
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/mandrill 
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/papertrail   
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/particle 
ok      github.com/influxdata/telegraf/plugins/inputs/webhooks/rollbar  
?       github.com/influxdata/telegraf/plugins/inputs/win_perf_counters [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/win_services  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/wireguard 
?       github.com/influxdata/telegraf/plugins/inputs/wireless  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/x509_cert 
?       github.com/influxdata/telegraf/plugins/inputs/zfs   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/zipkin    
?       github.com/influxdata/telegraf/plugins/inputs/zipkin/cmd/stress_test_write  [no test files]
?       github.com/influxdata/telegraf/plugins/inputs/zipkin/cmd/thrift_serialize   [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/zipkin/codec  
ok      github.com/influxdata/telegraf/plugins/inputs/zipkin/codec/jsonV1   
ok      github.com/influxdata/telegraf/plugins/inputs/zipkin/codec/thrift   
?       github.com/influxdata/telegraf/plugins/inputs/zipkin/trace  [no test files]
ok      github.com/influxdata/telegraf/plugins/inputs/zookeeper 
?       github.com/influxdata/telegraf/plugins/outputs  [no test files]
?       github.com/influxdata/telegraf/plugins/outputs/all  [no test files]
ok      github.com/influxdata/telegraf/plugins/outputs/amon 
ok      github.com/influxdata/telegraf/plugins/outputs/amqp 
ok      github.com/influxdata/telegraf/plugins/outputs/application_insights 
?       github.com/influxdata/telegraf/plugins/outputs/application_insights/mocks   [no test files]
ok      github.com/influxdata/telegraf/plugins/outputs/azure_monitor    
==================
WARNING: DATA RACE
Read at 0x00c000198778 by goroutine 16:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.TestPubSub_WriteMultiple()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub_test.go:76 +0x3d1
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c000198778 by goroutine 19:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).sendBundle.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:176 +0x3f4
  google.golang.org/api/support/bundler.(*Bundler).handle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:322 +0xc0

Goroutine 16 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:56 +0x223

Goroutine 19 (finished) created at:
  google.golang.org/api/support/bundler.(*Bundler).enqueueCurBundle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:179 +0x12a
  google.golang.org/api/support/bundler.(*Bundler).Flush()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:376 +0x55
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).Stop()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:102 +0xb1
==================
--- FAIL: TestPubSub_WriteMultiple (0.00s)
    testing.go:906: race detected during execution of test
==================
WARNING: DATA RACE
Read at 0x00c0000c0078 by goroutine 21:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.TestPubSub_WriteOverCountThreshold()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub_test.go:100 +0x522
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0000c0078 by goroutine 23:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).sendBundle.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:176 +0x3f4
  google.golang.org/api/support/bundler.(*Bundler).handle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:322 +0xc0

Goroutine 21 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:56 +0x223

Goroutine 23 (finished) created at:
  google.golang.org/api/support/bundler.(*Bundler).enqueueCurBundle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:179 +0x12a
  google.golang.org/api/support/bundler.(*Bundler).add()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:281 +0x324
  google.golang.org/api/support/bundler.(*Bundler).Add()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:247 +0x186
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).Publish()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:126 +0x466
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*PubSub).Write()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub.go:140 +0x227
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.TestPubSub_WriteOverCountThreshold()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub_test.go:92 +0x3ca
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestPubSub_WriteOverCountThreshold (0.00s)
    testing.go:906: race detected during execution of test
==================
WARNING: DATA RACE
Read at 0x00c0000c00f8 by goroutine 29:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.TestPubSub_WriteOverByteThreshold()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub_test.go:123 +0x3e9
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c0000c00f8 by goroutine 31:
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).sendBundle.func1()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:176 +0x3f4
  google.golang.org/api/support/bundler.(*Bundler).handle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:322 +0xc0

Goroutine 29 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x2ff
  main.main()
      _testmain.go:56 +0x223

Goroutine 31 (finished) created at:
  google.golang.org/api/support/bundler.(*Bundler).enqueueCurBundle()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:179 +0x12a
  google.golang.org/api/support/bundler.(*Bundler).add()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:281 +0x324
  google.golang.org/api/support/bundler.(*Bundler).Add()
      /Users/jakubwarczarek/go/pkg/mod/google.golang.org/api@v0.20.0/support/bundler/bundler.go:247 +0x186
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*stubTopic).Publish()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/topic_stubbed.go:126 +0x466
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.(*PubSub).Write()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub.go:140 +0x227
  github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub.TestPubSub_WriteOverByteThreshold()
      /Users/jakubwarczarek/Documents/my/telegraf/plugins/outputs/cloud_pubsub/pubsub_test.go:115 +0x291
  testing.tRunner()
      /usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0x1eb
==================
--- FAIL: TestPubSub_WriteOverByteThreshold (0.00s)
    testing.go:906: race detected during execution of test
FAIL
FAIL    github.com/influxdata/telegraf/plugins/outputs/cloud_pubsub 0.262s
ok      github.com/influxdata/telegraf/plugins/outputs/cloudwatch   
ok      github.com/influxdata/telegraf/plugins/outputs/cratedb  
ok      github.com/influxdata/telegraf/plugins/outputs/datadog  
?       github.com/influxdata/telegraf/plugins/outputs/discard  [no test files]
ok      github.com/influxdata/telegraf/plugins/outputs/elasticsearch    
ok      github.com/influxdata/telegraf/plugins/outputs/exec 
ok      github.com/influxdata/telegraf/plugins/outputs/file 
ok      github.com/influxdata/telegraf/plugins/outputs/graphite 
ok      github.com/influxdata/telegraf/plugins/outputs/graylog  
ok      github.com/influxdata/telegraf/plugins/outputs/health   
ok      github.com/influxdata/telegraf/plugins/outputs/http 
ok      github.com/influxdata/telegraf/plugins/outputs/influxdb 
ok      github.com/influxdata/telegraf/plugins/outputs/influxdb_v2  
ok      github.com/influxdata/telegraf/plugins/outputs/instrumental 
ok      github.com/influxdata/telegraf/plugins/outputs/kafka    
ok      github.com/influxdata/telegraf/plugins/outputs/kinesis  
ok      github.com/influxdata/telegraf/plugins/outputs/librato  
ok      github.com/influxdata/telegraf/plugins/outputs/mqtt 
ok      github.com/influxdata/telegraf/plugins/outputs/nats 
ok      github.com/influxdata/telegraf/plugins/outputs/newrelic 
ok      github.com/influxdata/telegraf/plugins/outputs/nsq  
ok      github.com/influxdata/telegraf/plugins/outputs/opentsdb 
ok      github.com/influxdata/telegraf/plugins/outputs/prometheus_client    
?       github.com/influxdata/telegraf/plugins/outputs/prometheus_client/v1 [no test files]
?       github.com/influxdata/telegraf/plugins/outputs/prometheus_client/v2 [no test files]
ok      github.com/influxdata/telegraf/plugins/outputs/riemann  
ok      github.com/influxdata/telegraf/plugins/outputs/riemann_legacy   
ok      github.com/influxdata/telegraf/plugins/outputs/socket_writer    
ok      github.com/influxdata/telegraf/plugins/outputs/stackdriver  
ok      github.com/influxdata/telegraf/plugins/outputs/syslog   
ok      github.com/influxdata/telegraf/plugins/outputs/warp10   
ok      github.com/influxdata/telegraf/plugins/outputs/wavefront    
?       github.com/influxdata/telegraf/plugins/parsers  [no test files]
ok      github.com/influxdata/telegraf/plugins/parsers/collectd 
ok      github.com/influxdata/telegraf/plugins/parsers/csv  
ok      github.com/influxdata/telegraf/plugins/parsers/dropwizard   
ok      github.com/influxdata/telegraf/plugins/parsers/form_urlencoded  
ok      github.com/influxdata/telegraf/plugins/parsers/graphite 
ok      github.com/influxdata/telegraf/plugins/parsers/grok 
ok      github.com/influxdata/telegraf/plugins/parsers/influx   
ok      github.com/influxdata/telegraf/plugins/parsers/json 
ok      github.com/influxdata/telegraf/plugins/parsers/logfmt   
ok      github.com/influxdata/telegraf/plugins/parsers/nagios   
ok      github.com/influxdata/telegraf/plugins/parsers/value    
ok      github.com/influxdata/telegraf/plugins/parsers/wavefront    
?       github.com/influxdata/telegraf/plugins/processors   [no test files]
?       github.com/influxdata/telegraf/plugins/processors/all   [no test files]
ok      github.com/influxdata/telegraf/plugins/processors/clone 
ok      github.com/influxdata/telegraf/plugins/processors/converter 
ok      github.com/influxdata/telegraf/plugins/processors/date  
ok      github.com/influxdata/telegraf/plugins/processors/dedup 
ok      github.com/influxdata/telegraf/plugins/processors/defaults  
ok      github.com/influxdata/telegraf/plugins/processors/enum  
ok      github.com/influxdata/telegraf/plugins/processors/filepath  
ok      github.com/influxdata/telegraf/plugins/processors/override  
ok      github.com/influxdata/telegraf/plugins/processors/parser    
ok      github.com/influxdata/telegraf/plugins/processors/pivot 
ok      github.com/influxdata/telegraf/plugins/processors/port_name 
ok      github.com/influxdata/telegraf/plugins/processors/printer    [no tests to run]
ok      github.com/influxdata/telegraf/plugins/processors/regex 
ok      github.com/influxdata/telegraf/plugins/processors/rename    
ok      github.com/influxdata/telegraf/plugins/processors/s2geo 
ok      github.com/influxdata/telegraf/plugins/processors/starlark  
ok      github.com/influxdata/telegraf/plugins/processors/strings   
ok      github.com/influxdata/telegraf/plugins/processors/tag_limit 
ok      github.com/influxdata/telegraf/plugins/processors/template  
ok      github.com/influxdata/telegraf/plugins/processors/topk  
ok      github.com/influxdata/telegraf/plugins/processors/unpivot   
?       github.com/influxdata/telegraf/plugins/serializers  [no test files]
ok      github.com/influxdata/telegraf/plugins/serializers/carbon2  
ok      github.com/influxdata/telegraf/plugins/serializers/graphite 
ok      github.com/influxdata/telegraf/plugins/serializers/influx   
ok      github.com/influxdata/telegraf/plugins/serializers/json 
ok      github.com/influxdata/telegraf/plugins/serializers/nowmetric    
ok      github.com/influxdata/telegraf/plugins/serializers/prometheus   
ok      github.com/influxdata/telegraf/plugins/serializers/splunkmetric 
ok      github.com/influxdata/telegraf/plugins/serializers/wavefront    
ok      github.com/influxdata/telegraf/selfstat 
ok      github.com/influxdata/telegraf/testutil 
FAIL
danielnelson commented 4 years ago

Thanks for opening the issue, we will get working on these and we should try adding back the -race flag to CI.

ssoroka commented 4 years ago

Great work on this! thanks for all the fixes! 🚀 🎉