https://bugs.openldap.org/show_bug.cgi?id=9920
--- Comment #30 from Howard Chu hyc@openldap.org --- Please try your tests under valgrind/helgrind or valgrind/drd and provide the valgrind output.
Note that since decryption requires copies of the DB pages, a LMDB must maintain a cache of these pages and the locking of this cache is probably missing something somewhere.