{"action":"closed","issue":{"url":"https://api.github.com/repos/honeycombio/beeline-go/issues/38","repository_url":"https://api.github.com/repos/honeycombio/beeline-go","labels_url":"https://api.github.com/repos/honeycombio/beeline-go/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/honeycombio/beeline-go/issues/38/comments","events_url":"https://api.github.com/repos/honeycombio/beeline-go/issues/38/events","html_url":"https://github.com/honeycombio/beeline-go/issues/38","id":383282278,"node_id":"MDU6SXNzdWUzODMyODIyNzg=","number":38,"title":"Data race when sending spans ","user":{"login":"blake-wilson","id":6109374,"node_id":"MDQ6VXNlcjYxMDkzNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6109374?v=4","gravatar_id":"","url":"https://api.github.com/users/blake-wilson","html_url":"https://github.com/blake-wilson","followers_url":"https://api.github.com/users/blake-wilson/followers","following_url":"https://api.github.com/users/blake-wilson/following{/other_user}","gists_url":"https://api.github.com/users/blake-wilson/gists{/gist_id}","starred_url":"https://api.github.com/users/blake-wilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blake-wilson/subscriptions","organizations_url":"https://api.github.com/users/blake-wilson/orgs","repos_url":"https://api.github.com/users/blake-wilson/repos","events_url":"https://api.github.com/users/blake-wilson/events{/privacy}","received_events_url":"https://api.github.com/users/blake-wilson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-21T20:30:19Z","updated_at":"2018-11-28T21:56:34Z","closed_at":"2018-11-28T21:56:34Z","author_association":"NONE","body":"While running some tests with the race detector enabled, we noticed the following data race in the `Span`'s `Send` method:\r\n\r\n```\r\nRead at 0x00c008aed051 by goroutine 173:\r\n  github.com/{***}/vendor/github.com/honeycombio/beeline-go/trace.(*Span).Send()\r\n      /go/src/github.com/{***}/vendor/github.com/honeycombio/beeline-go/trace/trace.go:241 +0x3f6\r\n  github.com/{***}/vendor/github.com/{***}/finstrument.(*Span).Finish()\r\n\r\nPrevious write at 0x00c008aed051 by goroutine 212:\r\n  github.com/{***}/vendor/github.com/honeycombio/beeline-go/trace.(*Span).Send()\r\n      /go/src/github.com/{***}/vendor/github.com/honeycombio/beeline-go/trace/trace.go:250 +0x48c\r\n  github.com/{***}/vendor/github.com/{***}/finstrument.(*Span).Finish()\r\n```\r\n\r\nI am using the latest master of libhoney-go (a6839afb6be6f3ec9de43b3a2c08f89b338e8534)  and beeline-go (87bb646f47ddd2e7226aba28e83bd08c2c821e17).\r\n\r\nThese lines correspond to the following code \r\n- https://github.com/honeycombio/beeline-go/blob/master/trace/trace.go#L241\r\n- https://github.com/honeycombio/beeline-go/blob/master/trace/trace.go#L250\r\n\r\nIt's not clear exactly what happened to me, but perhaps if a parent span is sent at the same time as one of its children it could lead to this race?"}}
{"actor":{"display_login":"tredman"}}