{"action":"opened","issue":{"url":"https://api.github.com/repos/onsi/gomega/issues/88","labels_url":"https://api.github.com/repos/onsi/gomega/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/onsi/gomega/issues/88/comments","events_url":"https://api.github.com/repos/onsi/gomega/issues/88/events","html_url":"https://github.com/onsi/gomega/issues/88","id":61031037,"number":88,"title":"Data race in build.go","user":{"login":"glyn","id":94953,"avatar_url":"https://avatars.githubusercontent.com/u/94953?v=3","gravatar_id":"","url":"https://api.github.com/users/glyn","html_url":"https://github.com/glyn","followers_url":"https://api.github.com/users/glyn/followers","following_url":"https://api.github.com/users/glyn/following{/other_user}","gists_url":"https://api.github.com/users/glyn/gists{/gist_id}","starred_url":"https://api.github.com/users/glyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyn/subscriptions","organizations_url":"https://api.github.com/users/glyn/orgs","repos_url":"https://api.github.com/users/glyn/repos","events_url":"https://api.github.com/users/glyn/events{/privacy}","received_events_url":"https://api.github.com/users/glyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-13T10:24:20Z","updated_at":"2015-03-13T10:24:20Z","closed_at":null,"body":"When issuing Ctrl-C on one of our tests with `-race -untilItFails` specified, we (@avade) observed the following data race:\r\n```\r\nWARNING: DATA RACE\r\nRead by goroutine 8:\r\n  github.com/onsi/gomega/gexec.CleanupBuildArtifacts()\r\n      /Users/gnormington/go/src/github.com/onsi/gomega/gexec/build.go:63 +0x38\r\n  github.com/cloudfoundry-incubator/garden-linux/iodaemon_test.func·005()\r\n      /Users/gnormington/go/src/github.com/cloudfoundry-incubator/garden-linux/iodaemon/iodaemon_suite_test.go:50 +0x2c\r\n  github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync()\r\n      /Users/gnormington/go/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go:104 +0x11b\r\n  github.com/onsi/ginkgo/internal/leafnodes.(*runner).run()\r\n      /Users/gnormington/go/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go:63 +0xd3\r\n  github.com/onsi/ginkgo/internal/leafnodes.(*synchronizedAfterSuiteNode).Run()\r\n      /Users/gnormington/go/src/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go:36 +0x16e\r\n  github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runAfterSuite()\r\n      /Users/gnormington/go/src/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go:122 +0x166\r\n  github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).registerForInterrupts()\r\n      /Users/gnormington/go/src/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go:189 +0x35a\r\n\r\nPrevious write by goroutine 7:\r\n  github.com/onsi/gomega/gexec.temporaryDirectory()\r\n      /Users/gnormington/go/src/github.com/onsi/gomega/gexec/build.go:71 +0x108\r\n  github.com/onsi/gomega/gexec.BuildIn()\r\n      /Users/gnormington/go/src/github.com/onsi/gomega/gexec/build.go:30 +0x6a\r\n  github.com/onsi/gomega/gexec.Build()\r\n      /Users/gnormington/go/src/github.com/onsi/gomega/gexec/build.go:23 +0xdf\r\n  github.com/cloudfoundry-incubator/garden-linux/iodaemon_test.func·002()\r\n      /Users/gnormington/go/src/github.com/cloudfoundry-incubator/garden-linux/iodaemon/iodaemon_suite_test.go:30 +0x128\r\n<etc>\r\n```\r\nThe `tmpDir` global variable in `build.go` needs some synchronisation. (Also, running all the gomega tests with `-race` specified didn't spot this, so perhaps a test needs adding?)"}}