#32 Bug 1751295: When sync-repl is enabled, slapi-nis can deadlock during retrochanglog trimming
Merged 4 years ago by abbra. Opened 4 years ago by tbordaz.
tbordaz/slapi-nis bz_1751295  into  master

file modified
+1 -1
@@ -2919,7 +2919,7 @@ 

           * It will be used later in be_pre/post_write_cb

           */

          int cnt;

-         char *ignored_containers[3] = { "cn=config", "cn=schema", NULL};

+         char *ignored_containers[4] = { "cn=config", "cn=schema", "cn=changelog", NULL};

  

          for (cnt = 0; ignored_containers[cnt]; cnt++);

          ignored_containers_sdn = (Slapi_DN **) slapi_ch_calloc(cnt + 1, sizeof(Slapi_DN *));

Bug Description:
When sync-repl is enabled, it enables retroCL that can lead to the following deadlock scenario.

Since 1435663, slapi-nis lock is acquired from be_preop to be_postop.
So during a write operation on domain, retroCL is updated and being a BE_TXN_POST it holds slapi-nis lock when it tries to acquire retroCL backend lock.
If at the same time an operation on the retroCL (like retroCL trimming) acquire retroCL backend lock then during its BE_TXN_POST it tries to acquire slapi-nis lock.

This is a common scenario, when there are updates on several backends, there is a chance
that two updates are acquiring the backends in the opposite order.
Here the backends are slapi-nis and retroCL.

Fix Description:

Slapi-nis does nothing when an update happens on retroCL, so this suffix
can be ignored. It will prevent retroCL trimming to try to acquire slapi-nis lock.

https://bugzilla.redhat.com/show_bug.cgi?id=1751295

rebased onto c1f90d31132d9e8f7f795888a1fa5c4a8188f7da

4 years ago

rebased onto 43db38c

4 years ago

Pull-Request has been merged by abbra

4 years ago
Metadata