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

Data race in service package. #1638

Closed
russjones opened this issue Jan 29, 2018 · 0 comments · Fixed by #1686
Closed

Data race in service package. #1638

russjones opened this issue Jan 29, 2018 · 0 comments · Fixed by #1686
Assignees

Comments

@russjones
Copy link
Contributor

Found the following race in 9359f6d by running go test -race -v ./... -check.f=TestAudit.

==================
WARNING: DATA RACE
Read at 0x00c42043a73a by goroutine 43:
  github.com/gravitational/teleport/lib/service.(*TeleportProcess).initAuthService.func5()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:598 +0x5cd
  github.com/gravitational/teleport/lib/service.(*LocalService).Serve()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/supervisor.go:267 +0x48
  github.com/gravitational/teleport/lib/service.(*LocalSupervisor).serve.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/supervisor.go:148 +0x232

Previous write at 0x00c42043a73a by goroutine 36:
  github.com/gravitational/teleport/lib/service.(*TeleportProcess).initAuthService.func6()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:613 +0x68
  github.com/gravitational/teleport/lib/service.(*TeleportProcess).onExit.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:631 +0x124

Goroutine 43 (running) created at:
  github.com/gravitational/teleport/lib/service.(*LocalSupervisor).serve()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/supervisor.go:144 +0x91
  github.com/gravitational/teleport/lib/service.(*LocalSupervisor).Start()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/supervisor.go:166 +0x125
  github.com/gravitational/teleport/integration.(*TeleInstance).Start()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/helpers.go:607 +0x33b
  github.com/gravitational/teleport/integration.(*IntSuite).newTeleportWithConfig()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/integration_test.go:152 +0x43c
  github.com/gravitational/teleport/integration.(*IntSuite).TestAuditOff()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/integration_test.go:1558 +0x11c
  runtime.call32()
      /usr/local/go/src/runtime/asm_amd64.s:509 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:763 +0x9b0
  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:657 +0x89

Goroutine 36 (finished) created at:
  github.com/gravitational/teleport/lib/service.(*TeleportProcess).onExit()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:626 +0x56
  github.com/gravitational/teleport/lib/service.(*TeleportProcess).initAuthService()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:612 +0x1bf7
  github.com/gravitational/teleport/lib/service.NewTeleport()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/lib/service/service.go:327 +0x779
  github.com/gravitational/teleport/integration.(*TeleInstance).CreateEx()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/helpers.go:373 +0x18d1
  github.com/gravitational/teleport/integration.(*IntSuite).newTeleportWithConfig()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/integration_test.go:149 +0x374
  github.com/gravitational/teleport/integration.(*IntSuite).TestAuditOff()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/integration/integration_test.go:1558 +0x11c
  runtime.call32()
      /usr/local/go/src/runtime/asm_amd64.s:509 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:763 +0x9b0
  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /Users/rjones/Development/go/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:657 +0x89
==================
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 a pull request may close this issue.

2 participants