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

double-lock in WriteImplWALOnly #7197

Closed
jonahgao opened this issue Jul 29, 2020 · 1 comment
Closed

double-lock in WriteImplWALOnly #7197

jonahgao opened this issue Jul 29, 2020 · 1 comment

Comments

@jonahgao
Copy link
Contributor

jonahgao commented Jul 29, 2020

In WriteImplWALOnly, mutex_ is locked twice, cause deadlock.

First time:

InstrumentedMutexLock l(&mutex_);

Then the second one in the call of WriteStatusCheck:

mutex_.Lock();

@zhichao-cao
Copy link
Contributor

Hi @byteink , you are right, will create a PR to fix it. Thanks for pointing out it!

facebook-github-bot pushed a commit that referenced this issue Aug 7, 2020
…able (#7199)

Summary:
Pointed out by #7197 , there is a double lock in WriteImplWALOnly.
Also find another deadlock in UnorderedWriteMemtable. Move the check after switch_all_.notify_all().

Pull Request resolved: #7199

Test Plan: pass make check

Reviewed By: anand1976

Differential Revision: D22961714

Pulled By: zhichao-cao

fbshipit-source-id: 0707922dc50d28ea141a15a8cdcbd1c8993ea0d8
@jonahgao jonahgao closed this as completed Aug 9, 2020
codingrhythm pushed a commit to SafetyCulture/rocksdb that referenced this issue Mar 5, 2021
…able (facebook#7199)

Summary:
Pointed out by facebook#7197 , there is a double lock in WriteImplWALOnly.
Also find another deadlock in UnorderedWriteMemtable. Move the check after switch_all_.notify_all().

Pull Request resolved: facebook#7199

Test Plan: pass make check

Reviewed By: anand1976

Differential Revision: D22961714

Pulled By: zhichao-cao

fbshipit-source-id: 0707922dc50d28ea141a15a8cdcbd1c8993ea0d8
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

No branches or pull requests

2 participants