From 43db38c50daa880d51aa89312d040697639a21fd Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Oct 08 2019 09:50:09 +0000 Subject: Bug 1751295: When sync-repl is enabled, slapi-nis can deadlock during retrochanglog trimming 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 lock 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 --- diff --git a/src/back-shr.c b/src/back-shr.c index 0c29d1f..4292e18 100644 --- a/src/back-shr.c +++ b/src/back-shr.c @@ -2919,7 +2919,7 @@ init_map_lock(void) * 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 *));