Issue 6372 - Deadlock while doing online backup#6475
Conversation
mreynolds389
left a comment
There was a problem hiding this comment.
Very nice, ack. I know that historically in DS we use "int" for boolean purposes, but using a PRBool for "dse_backup_in_progress" would be nice. I'm not asking for it, but it's something to consider.
|
Yeah I feel nspr is becoming less and less "needed" - if not already obsolete. It would actually be nice to completely remove it from DS as some point :-) So lets do this, lets use the C11 bool type here, so it's in the code for all to see, and then we can all start using this moving forward. |
|
Push the change with C11 bool |
Thanks, re-ack! |
* Issue 6372 - Deadlock while doing online backup Sometime server hangs during online backup because of a deadlock due to lock order inversion between the dse backup_lock mutex and the dse rwlock. Solution: Add functions to manage the lock/unlock to ensure consistency. Ensure that threads always tries to lock dse_backup_lock mutex before the dse write lock Code cleanup: Move the backup_lock into the dse struct Avoid the obsolete warning during tests (I think that we will have to do a second cleanup phase later to see if we could not replace self.conn.add_s by self.create . Issue: #6372 Reviewed by: @mreynolds389 (Thanks!) (cherry picked from commit 7e98ab3)
* Issue 6372 - Deadlock while doing online backup Sometime server hangs during online backup because of a deadlock due to lock order inversion between the dse backup_lock mutex and the dse rwlock. Solution: Add functions to manage the lock/unlock to ensure consistency. Ensure that threads always tries to lock dse_backup_lock mutex before the dse write lock Code cleanup: Move the backup_lock into the dse struct Avoid the obsolete warning during tests (I think that we will have to do a second cleanup phase later to see if we could not replace self.conn.add_s by self.create . Issue: #6372 Reviewed by: @mreynolds389 (Thanks!) (cherry picked from commit 7e98ab3)
* Issue 6372 - Deadlock while doing online backup Sometime server hangs during online backup because of a deadlock due to lock order inversion between the dse backup_lock mutex and the dse rwlock. Solution: Add functions to manage the lock/unlock to ensure consistency. Ensure that threads always tries to lock dse_backup_lock mutex before the dse write lock Code cleanup: Move the backup_lock into the dse struct Avoid the obsolete warning during tests (I think that we will have to do a second cleanup phase later to see if we could not replace self.conn.add_s by self.create . Issue: #6372 Reviewed by: @mreynolds389 (Thanks!) (cherry picked from commit 7e98ab3)
* Issue 6372 - Deadlock while doing online backup Sometime server hangs during online backup because of a deadlock due to lock order inversion between the dse backup_lock mutex and the dse rwlock. Solution: Add functions to manage the lock/unlock to ensure consistency. Ensure that threads always tries to lock dse_backup_lock mutex before the dse write lock Code cleanup: Move the backup_lock into the dse struct Avoid the obsolete warning during tests (I think that we will have to do a second cleanup phase later to see if we could not replace self.conn.add_s by self.create . Issue: #6372 Reviewed by: @mreynolds389 (Thanks!) (cherry picked from commit 7e98ab3)
Sometime server hangs during online backup because of a deadlock due to lock order inversion between the dse backup_lock mutex and the dse rwlock.
Solution:
Add functions to manage the lock/unlock to ensure consistency.
Ensure that threads always tries to lock dse_backup_lock mutex before the dse write lock
Code cleanup:
Issue: #6372
Closing: #6372
Reviewed by: @mreynolds389 (Thanks!)