Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data race for openTSDB listener addr #2370

Merged
merged 2 commits into from
Apr 21, 2015
Merged

Fix data race for openTSDB listener addr #2370

merged 2 commits into from
Apr 21, 2015

Conversation

corylanou
Copy link
Contributor

Fixes the race condition when asking for the endpoints address.

WARNING: DATA RACE
Read by goroutine 9:
  github.com/influxdb/influxdb/opentsdb.(*Server).Addr()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/opentsdb/opentsdb.go:53 +0x8c
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x614
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:21 +0x71
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.IP.String()
      /usr/local/go/src/net/ip.go:270 +0x116
  net.ipEmptyString()
      /usr/local/go/src/net/ip.go:324 +0x7d
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:21 +0x94
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.IP.String()
      /usr/local/go/src/net/ip.go:271 +0x176
  net.ipEmptyString()
      /usr/local/go/src/net/ip.go:324 +0x7d
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:21 +0x94
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.IP.String()
      /usr/local/go/src/net/ip.go:272 +0x1da
  net.ipEmptyString()
      /usr/local/go/src/net/ip.go:324 +0x7d
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:21 +0x94
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.IP.String()
      /usr/local/go/src/net/ip.go:273 +0x23f
  net.ipEmptyString()
      /usr/local/go/src/net/ip.go:324 +0x7d
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:21 +0x94
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:22 +0xbc
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c
==================
==================
WARNING: DATA RACE
Read by goroutine 9:
  net.(*TCPAddr).String()
      /usr/local/go/src/net/tcpsock.go:25 +0x1c2
  github.com/influxdb/influxdb/cmd/influxd_test.Test_ServerOpenTSDBIntegration_WithTags()
      /home/ubuntu/influxdb-build/src/github.com/influxdb/influxdb/cmd/influxd/server_integration_test.go:1937 +0x638
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:447 +0x133

Previous write by goroutine 333:
  [failed to restore the stack]

Goroutine 9 (running) created at:
  testing.RunTests()
      /usr/local/go/src/testing/testing.go:555 +0xd4e
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:485 +0xe0
  main.main()
      github.com/influxdb/influxdb/cmd/influxd/_test/_testmain.go:104 +0x28c

@toddboom
Copy link
Contributor

👍 (if it's green)

@otoolep
Copy link
Contributor

otoolep commented Apr 21, 2015

+1

@corylanou corylanou force-pushed the tsdb-data-race branch 2 times, most recently from 4ed211a to 4d13aa6 Compare April 21, 2015 21:30
corylanou added a commit that referenced this pull request Apr 21, 2015
Fix data race for openTSDB listener addr
@corylanou corylanou merged commit ec99077 into master Apr 21, 2015
@corylanou corylanou deleted the tsdb-data-race branch April 21, 2015 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants