{"action":"closed","issue":{"url":"https://api.github.com/repos/gravitational/teleport/issues/1639","repository_url":"https://api.github.com/repos/gravitational/teleport","labels_url":"https://api.github.com/repos/gravitational/teleport/issues/1639/labels{/name}","comments_url":"https://api.github.com/repos/gravitational/teleport/issues/1639/comments","events_url":"https://api.github.com/repos/gravitational/teleport/issues/1639/events","html_url":"https://github.com/gravitational/teleport/issues/1639","id":292529686,"number":1639,"title":"Data race in auth package","user":{"login":"russjones","id":5017502,"avatar_url":"https://avatars0.githubusercontent.com/u/5017502?v=4","gravatar_id":"","url":"https://api.github.com/users/russjones","html_url":"https://github.com/russjones","followers_url":"https://api.github.com/users/russjones/followers","following_url":"https://api.github.com/users/russjones/following{/other_user}","gists_url":"https://api.github.com/users/russjones/gists{/gist_id}","starred_url":"https://api.github.com/users/russjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russjones/subscriptions","organizations_url":"https://api.github.com/users/russjones/orgs","repos_url":"https://api.github.com/users/russjones/repos","events_url":"https://api.github.com/users/russjones/events{/privacy}","received_events_url":"https://api.github.com/users/russjones/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"gravitational-jenkins","id":16409722,"avatar_url":"https://avatars0.githubusercontent.com/u/16409722?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational-jenkins","html_url":"https://github.com/gravitational-jenkins","followers_url":"https://api.github.com/users/gravitational-jenkins/followers","following_url":"https://api.github.com/users/gravitational-jenkins/following{/other_user}","gists_url":"https://api.github.com/users/gravitational-jenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational-jenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational-jenkins/subscriptions","organizations_url":"https://api.github.com/users/gravitational-jenkins/orgs","repos_url":"https://api.github.com/users/gravitational-jenkins/repos","events_url":"https://api.github.com/users/gravitational-jenkins/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational-jenkins/received_events","type":"User","site_admin":false},"assignees":[{"login":"gravitational-jenkins","id":16409722,"avatar_url":"https://avatars0.githubusercontent.com/u/16409722?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational-jenkins","html_url":"https://github.com/gravitational-jenkins","followers_url":"https://api.github.com/users/gravitational-jenkins/followers","following_url":"https://api.github.com/users/gravitational-jenkins/following{/other_user}","gists_url":"https://api.github.com/users/gravitational-jenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational-jenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational-jenkins/subscriptions","organizations_url":"https://api.github.com/users/gravitational-jenkins/orgs","repos_url":"https://api.github.com/users/gravitational-jenkins/repos","events_url":"https://api.github.com/users/gravitational-jenkins/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational-jenkins/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/gravitational/teleport/milestones/18","html_url":"https://github.com/gravitational/teleport/milestone/18","labels_url":"https://api.github.com/repos/gravitational/teleport/milestones/18/labels","id":2786474,"number":18,"title":"2.4.1 \"Chicago\"","description":"The purpose of this release is to eliminate testing issues.","creator":{"login":"kontsevoy","id":461020,"avatar_url":"https://avatars2.githubusercontent.com/u/461020?v=4","gravatar_id":"","url":"https://api.github.com/users/kontsevoy","html_url":"https://github.com/kontsevoy","followers_url":"https://api.github.com/users/kontsevoy/followers","following_url":"https://api.github.com/users/kontsevoy/following{/other_user}","gists_url":"https://api.github.com/users/kontsevoy/gists{/gist_id}","starred_url":"https://api.github.com/users/kontsevoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontsevoy/subscriptions","organizations_url":"https://api.github.com/users/kontsevoy/orgs","repos_url":"https://api.github.com/users/kontsevoy/repos","events_url":"https://api.github.com/users/kontsevoy/events{/privacy}","received_events_url":"https://api.github.com/users/kontsevoy/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":27,"state":"open","created_at":"2017-09-22T23:21:14Z","updated_at":"2018-02-16T01:25:32Z","due_on":"2018-01-31T08:00:00Z","closed_at":null},"comments":0,"created_at":"2018-01-29T19:25:38Z","updated_at":"2018-02-16T01:25:32Z","closed_at":"2018-02-16T01:25:32Z","author_association":"CONTRIBUTOR","body":"Found the following data race in https://github.com/gravitational/teleport/commit/9359f6ded5bb40f13192023a6141ecbd3228dde8 running `go test -race -v ./... -check.f=TestAudit` on our macOS cloud box.\r\n\r\n```\r\n==================\r\nWARNING: DATA RACE\r\nWrite at 0x000005c0aff0 by goroutine 122:\r\n  github.com/gravitational/teleport/lib/auth/native.(*nauth).Close()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:79 +0xae\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*certificateCache).generateHostCert()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/cache.go:164 +0x4ce\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*certificateCache).GetHostCertificate()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/cache.go:73 +0x111\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*localSite).dialWithAgent()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/localsite.go:163 +0x1e5\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*localSite).Dial()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/localsite.go:147 +0x129\r\n  github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).proxyToHost()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/proxy.go:301 +0xa2a\r\n  github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).Start()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/proxy.go:190 +0x621\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSubsystem()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:912 +0x313\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).dispatch()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:787 +0x59a\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSessionRequests()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:758 +0x3aa\r\n\r\nPrevious read at 0x000005c0aff0 by goroutine 23:\r\n  github.com/gravitational/teleport/lib/auth/native.(*nauth).precalculateKeys()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:110 +0x14f\r\n\r\nGoroutine 122 (running) created at:\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).HandleNewChan()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:619 +0x52f\r\n\r\nGoroutine 23 (running) created at:\r\n  github.com/gravitational/teleport/lib/auth/native.New()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:67 +0x155\r\n  github.com/gravitational/teleport/integration.NewInstance()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/helpers.go:140 +0x6a\r\n  github.com/gravitational/teleport/integration.(*IntSuite).newTeleportWithConfig()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/integration_test.go:138 +0x14d\r\n  github.com/gravitational/teleport/integration.(*IntSuite).TestAuditOff()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/integration_test.go:1558 +0x11c\r\n  runtime.call32()\r\n      /usr/local/go/src/runtime/asm_amd64.s:509 +0x3a\r\n  reflect.Value.Call()\r\n      /usr/local/go/src/reflect/value.go:302 +0xc0\r\n  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:763 +0x9b0\r\n  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:657 +0x89\r\n==================\r\n==================\r\nWARNING: DATA RACE\r\nWrite at 0x000005c0aff8 by goroutine 122:\r\n  github.com/gravitational/teleport/lib/auth/native.(*nauth).Close()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:80 +0xfc\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*certificateCache).generateHostCert()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/cache.go:164 +0x4ce\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*certificateCache).GetHostCertificate()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/cache.go:73 +0x111\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*localSite).dialWithAgent()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/localsite.go:163 +0x1e5\r\n  github.com/gravitational/teleport/lib/reversetunnel.(*localSite).Dial()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/reversetunnel/localsite.go:147 +0x129\r\n  github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).proxyToHost()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/proxy.go:301 +0xa2a\r\n  github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).Start()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/proxy.go:190 +0x621\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSubsystem()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:912 +0x313\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).dispatch()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:787 +0x59a\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSessionRequests()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:758 +0x3aa\r\n\r\nPrevious read at 0x000005c0aff8 by goroutine 23:\r\n  github.com/gravitational/teleport/lib/auth/native.(*nauth).precalculateKeys()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:107 +0x132\r\n\r\nGoroutine 122 (running) created at:\r\n  github.com/gravitational/teleport/lib/srv/regular.(*Server).HandleNewChan()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/srv/regular/sshserver.go:619 +0x52f\r\n\r\nGoroutine 23 (running) created at:\r\n  github.com/gravitational/teleport/lib/auth/native.New()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/lib/auth/native/native.go:67 +0x155\r\n  github.com/gravitational/teleport/integration.NewInstance()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/helpers.go:140 +0x6a\r\n  github.com/gravitational/teleport/integration.(*IntSuite).newTeleportWithConfig()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/integration_test.go:138 +0x14d\r\n  github.com/gravitational/teleport/integration.(*IntSuite).TestAuditOff()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/integration/integration_test.go:1558 +0x11c\r\n  runtime.call32()\r\n      /usr/local/go/src/runtime/asm_amd64.s:509 +0x3a\r\n  reflect.Value.Call()\r\n      /usr/local/go/src/reflect/value.go:302 +0xc0\r\n  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:763 +0x9b0\r\n  github.com/gravitational/teleport/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()\r\n      /tmp/teleport-tests/src/github.com/gravitational/teleport/vendor/gopkg.in/check.v1/check.go:657 +0x89\r\n==================\r\n```"}}
{"actor":{"display_login":"russjones"}}