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

UsedChunkList may not synchonize memory when application aborts abnormally #1771

Closed
elBoberido opened this issue Oct 31, 2022 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@elBoberido
Copy link
Member

After having a closer look at the UsedChunkList, it seems there is a small window where the subscriber removed the sample from the UsedChunkList but the memory is not yet synchronized. When the subscriber is killed within this window and RouDi does the cleanup we have a double free. The problem can be solved, the question is just how expensive it will be.

Originally posted by @elBoberido in #1740 (comment)

@elBoberido elBoberido added the bug Something isn't working label Oct 31, 2022
@elBoberido elBoberido added this to the Medium prio milestone Oct 31, 2022
@elBoberido
Copy link
Member Author

After having an even closer look at the UsedChunkList it turned out to not be an issue since the sample is not freed in the application but returned to the caller which means the memory is properly synchronized. It seems I confused the releaseToSharedChunk call in remove with the one in cleanup. The former one is called in the application and does not free the sample but returns it to the caller. The latter is called from RouDi to do the cleanup and therefore frees the sample immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant