https://bugs.openldap.org/show_bug.cgi?id=9920
--- Comment #19 from kero renault.cle@gmail.com --- Further information that I forgot in my previous comment (as we cannot edit them). I added a helpful draft PR[1] that helps reproduce the bug with the redb benchmarks (you need my fork of redb and a specific branch of heed).
Additional information from my fix for my program: I tried many different AEADs encryption libraries, from eax with a zero-length auth data buffer to a good chacha20poly1305 with an auth data buffer of 16 bytes, and everything worked fine as long as there was no thread involved. Note that it was working perfectly fine with LMDB 0.9.
[1]: https://github.com/Kerollmops/redb/pull/1