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

potential deadlock? #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

potential deadlock? #113

wants to merge 3 commits into from

Conversation

sebdiem
Copy link

@sebdiem sebdiem commented Jul 23, 2024

I think I found a deadlock issue in the library.
I added a unit test that reproduces the issue and a potential fix.

We find the same pattern with buffer_log and flush: a sync version and a
version distributed to a thread pool.
This commit harmonizes namings:
- schedule_flush_sync => flush_with_lock
- try_lock_and_do_flush_request => flush_sync
when logging and closing simultaneously the code enters a deadlock.
The previous version was prone to a deadlock (see added test in previous
commit)
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