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
deadlock on cos cache rebuild #2138
Comments
Comment from tbordaz (@tbordaz) at 2017-01-06 21:05:02 attachment |
Comment from tbordaz (@tbordaz) at 2017-01-06 21:07:56 Signature of the deadlock is
|
Comment from tbordaz (@tbordaz) at 2017-01-10 19:39:49 attachment |
Comment from firstyear (@Firstyear) at 2017-01-11 06:06:14 A small note, is cos_cache_create_unloc()? meant to be cos_cache_create_unlock()? Otherwise, I can understand the fix and how it works, it seems reasonable. I'm wondering if there is a cleaner way to achieve this with reordering of the backend lock compared to the change_lock, or with monitors. Regardless, I think this solution will work, |
Comment from tbordaz (@tbordaz) at 2017-01-11 18:23:33 attachment |
Comment from tbordaz (@tbordaz) at 2017-01-11 18:42:36 Thanks William and Ludwig for the reviews '''git push origin master''' commit ac44337 |
Comment from tbordaz (@tbordaz) at 2017-02-11 22:49:40 Metadata Update from @tbordaz:
|
Comment from firstyear (@Firstyear) at 2017-03-13 04:13:38 Hey Thierry, is this issue now resolved? Would you like to close it? |
Comment from firstyear (@Firstyear) at 2017-03-13 04:13:47 Metadata Update from @Firstyear:
|
Comment from tbordaz (@tbordaz) at 2017-03-29 15:35:07 Metadata Update from @tbordaz:
|
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/49079
The problem is easily reproducible using replication (see test case) but may also exists on standalone instance.
There is a thread responsible to rebuild cos cache when it is notified that a cos definition was updated. To do so this thread, holding the notification lock, will rebuild the cache reading the definitions (on backend) trying to acquire db page.
A thread that updates a cos definition will notify the first thread. The update acquire db page and tries to acquire notification lock.
This is a scenario of deadlock because of locks taken in the opposite order.
The text was updated successfully, but these errors were encountered: