]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10095 partial revert of ITS#9278 2fd44e325195ae81664eb5dc36e7d265927c5ebc
authorHoward Chu <hyc@openldap.org>
Sun, 27 Aug 2023 14:37:34 +0000 (15:37 +0100)
committerHoward Chu <hyc@openldap.org>
Sun, 27 Aug 2023 14:37:34 +0000 (15:37 +0100)
The patch was incorrect and introduced numerous race conditions.
The original problem was a FreeBSD bug, subsequently fixed:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269277

libraries/liblmdb/mdb.c

index 6e4c4d04bf944f99c056c095431fba1ea4e30d0b..965ba2a2b8280b64147fbc7505b524224051d72f 100644 (file)
@@ -5824,17 +5824,6 @@ mdb_env_close0(MDB_env *env, int excl)
                        if (excl > 0)
                                semctl(env->me_rmutex->semid, 0, IPC_RMID);
                }
-#elif defined(MDB_ROBUST_SUPPORTED)
-               /* If we have the filelock:  If we are the
-                * only remaining user, clean up robust
-                * mutexes.
-                */
-               if (excl == 0)
-                       mdb_env_excl_lock(env, &excl);
-               if (excl > 0) {
-                       pthread_mutex_destroy(env->me_txns->mti_rmutex);
-                       pthread_mutex_destroy(env->me_txns->mti_wmutex);
-               }
 #endif
                munmap((void *)env->me_txns, (env->me_maxreaders-1)*sizeof(MDB_reader)+sizeof(MDB_txninfo));
        }