{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22988","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22988/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22988/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22988/events","html_url":"https://github.com/cockroachdb/cockroach/pull/22988","id":299574490,"number":22988,"title":"util/tracing: allow StopRecording calls after span.Finish()","user":{"login":"andreimatei","id":377201,"avatar_url":"https://avatars1.githubusercontent.com/u/377201?v=4","gravatar_id":"","url":"https://api.github.com/users/andreimatei","html_url":"https://github.com/andreimatei","followers_url":"https://api.github.com/users/andreimatei/followers","following_url":"https://api.github.com/users/andreimatei/following{/other_user}","gists_url":"https://api.github.com/users/andreimatei/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimatei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimatei/subscriptions","organizations_url":"https://api.github.com/users/andreimatei/orgs","repos_url":"https://api.github.com/users/andreimatei/repos","events_url":"https://api.github.com/users/andreimatei/events{/privacy}","received_events_url":"https://api.github.com/users/andreimatei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"RaduBerinde","id":16544120,"avatar_url":"https://avatars1.githubusercontent.com/u/16544120?v=4","gravatar_id":"","url":"https://api.github.com/users/RaduBerinde","html_url":"https://github.com/RaduBerinde","followers_url":"https://api.github.com/users/RaduBerinde/followers","following_url":"https://api.github.com/users/RaduBerinde/following{/other_user}","gists_url":"https://api.github.com/users/RaduBerinde/gists{/gist_id}","starred_url":"https://api.github.com/users/RaduBerinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaduBerinde/subscriptions","organizations_url":"https://api.github.com/users/RaduBerinde/orgs","repos_url":"https://api.github.com/users/RaduBerinde/repos","events_url":"https://api.github.com/users/RaduBerinde/events{/privacy}","received_events_url":"https://api.github.com/users/RaduBerinde/received_events","type":"User","site_admin":false},"assignees":[{"login":"RaduBerinde","id":16544120,"avatar_url":"https://avatars1.githubusercontent.com/u/16544120?v=4","gravatar_id":"","url":"https://api.github.com/users/RaduBerinde","html_url":"https://github.com/RaduBerinde","followers_url":"https://api.github.com/users/RaduBerinde/followers","following_url":"https://api.github.com/users/RaduBerinde/following{/other_user}","gists_url":"https://api.github.com/users/RaduBerinde/gists{/gist_id}","starred_url":"https://api.github.com/users/RaduBerinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaduBerinde/subscriptions","organizations_url":"https://api.github.com/users/RaduBerinde/orgs","repos_url":"https://api.github.com/users/RaduBerinde/repos","events_url":"https://api.github.com/users/RaduBerinde/events{/privacy}","received_events_url":"https://api.github.com/users/RaduBerinde/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-02-23T02:02:09Z","updated_at":"2018-02-23T19:46:01Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/22988","html_url":"https://github.com/cockroachdb/cockroach/pull/22988","diff_url":"https://github.com/cockroachdb/cockroach/pull/22988.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/22988.patch"},"body":"I have a case where it's convenient to hang on to a span and later on\r\nget its recording and also disable (further) recording, regardless of\r\nwhether the span has been finished or not in the meantimed. This almost\r\nworks, except disabling the recording crashes sometimes when there's a\r\nspan.netTr attached - that guy doesn't like the use after finish. I've\r\nmade it always work. I've attempted to write a unit test but given up;\r\nthe conditions under which this used to crash were pretty specific - we\r\nneeded a span with a netTr and snowball recording. Even then, it'd only\r\ncrash depending on the number of events that had been previously logged\r\non the netTr - the thing that crashes is some bookkeeping related to\r\ndiscarding events past the event limit that we set. We have a cockroach\r\ntest where I get a crash, but I couldn't convince it to do the same in a\r\nunit test. I get a crash however if I set the debugging variable\r\nDebugUseAfterFinish in the x/net/trace/trace.go file.\r\n\r\nRelease note: None"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/368119030","html_url":"https://github.com/cockroachdb/cockroach/pull/22988#issuecomment-368119030","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22988","id":368119030,"user":{"login":"andreimatei","id":377201,"avatar_url":"https://avatars1.githubusercontent.com/u/377201?v=4","gravatar_id":"","url":"https://api.github.com/users/andreimatei","html_url":"https://github.com/andreimatei","followers_url":"https://api.github.com/users/andreimatei/followers","following_url":"https://api.github.com/users/andreimatei/following{/other_user}","gists_url":"https://api.github.com/users/andreimatei/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimatei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimatei/subscriptions","organizations_url":"https://api.github.com/users/andreimatei/orgs","repos_url":"https://api.github.com/users/andreimatei/repos","events_url":"https://api.github.com/users/andreimatei/events{/privacy}","received_events_url":"https://api.github.com/users/andreimatei/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T19:46:01Z","updated_at":"2018-02-23T19:46:01Z","author_association":"OWNER","body":"\n\n\n\nReview status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.\n\n---\n\n*[pkg/util/tracing/tracer_span.go, line 172 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/22988#-L61dva7p8zeFUqyczvo:-L63Bn4GoHhv61OzPf5U:b-896fix) ([raw file](https://github.com/cockroachdb/cockroach/blob/99c1ea2e496e4af98284e9cf5390f9426408f5f8/pkg/util/tracing/tracer_span.go#L172)):*\n<details><summary><i>Previously, RaduBerinde wrote…</i></summary><blockquote>\n\nUpdate the comment saying that it's fine to call on a finished span.\n</blockquote></details>\n\nDone.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/22988)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"andreimatei"}}