Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use span read lock when reading span meta from span context #1437

Merged
merged 7 commits into from Aug 23, 2022

Conversation

alexandre-normand
Copy link
Contributor

This was a big oversight when I implemented #1226. Instead of using the span's mutex to protect the reading of the span's meta, I used the span context's mutex. This caused a race condition/panic when a concurrent goroutine called trace.finishedOne.

@alexandre-normand alexandre-normand requested a review from a team August 18, 2022 22:11
@alexandre-normand alexandre-normand added this to the 1.42.0 milestone Aug 18, 2022
@alexandre-normand alexandre-normand added the bug unintended behavior that has to be fixed label Aug 18, 2022
@ajgajg1134 ajgajg1134 merged commit 2bc6d1b into main Aug 23, 2022
@ajgajg1134 ajgajg1134 deleted the alex.normand/fix-race-condition-span-context-meta branch August 23, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behavior that has to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants