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

Don't allow Free to recycle unfinished traces #6

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

peterbourgon
Copy link
Owner

If a core trace is Free'd before it is Finished, then it means it was dropped from a collector ring buffer before its caller is done with it. In this case, if it's returned to the trace pool, it can be recycled as a separate trace to a different caller, and can end up accepting mutations (events) from two different operations. Therefore, we fix Free to abandon any trace which is not yet finished, which means it will never be recycled (but will still be GC'd).

@peterbourgon peterbourgon merged commit 03f6fff into main Jun 16, 2023
@peterbourgon peterbourgon deleted the fix-trace-recycling branch June 16, 2023 16:43
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.

1 participant