Skip to content

util/tracing: prevent spans reuse during registry iteration#75568

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:tracing.fix-race-registry
Feb 12, 2022
Merged

util/tracing: prevent spans reuse during registry iteration#75568
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:tracing.fix-race-registry

Conversation

@andreimatei
Copy link
Copy Markdown
Contributor

ActiveSpansRegistry.VisitSpans() was referencing spans without
accounting for the references by incrementing the span's reference
count. This resulted in races between that use and the spans getting
Finish()ed and re-allocated.

Fixes #75380

Release note: None

ActiveSpansRegistry.VisitSpans() was referencing spans without
accounting for the references by incrementing the span's reference
count. This resulted in races between that use and the spans getting
Finish()ed and re-allocated.

Fixes cockroachdb#75380

Release note: None
@andreimatei andreimatei requested a review from nvb January 26, 2022 20:16
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@nvb nvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)

Copy link
Copy Markdown
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 12, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 12, 2022

Build succeeded:

@craig craig bot merged commit d58220f into cockroachdb:master Feb 12, 2022
@andreimatei andreimatei deleted the tracing.fix-race-registry branch February 14, 2022 15:00
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 this pull request may close these issues.

jobs: TestRegistryLifecycle failed

3 participants