Running "mdb_stat testdb" gives me the same "Resource Busy" error.

It looks like mdb.c:2941 is checking if the return address from mmap() is the same as the hint passed in. Is there a problem with just using the mmap() return address? It looks like the mmap() is successful but just allocating to a different place.

Ben Johnson

On May 23, 2013, at 4:55 PM, Howard Chu <> wrote:

Ben Johnson wrote:
I posted this to openldap-bugs but I didn't see it actually posted to the
archive so I'll try in openldap-technical. I have LMDB integrated and it's
working smoothly except for this issue.

---- Original Message ----

I'm an author of an open source database called Sky ( and I'm
interested in porting the backend off LevelDB and move it over to LMDB. I
pulled down the LMDB code using the instructions on Ferenc Szalai's gomdb

git clone -b mdb.master --single-branch git://

When I ran "make test" against the code it seems to run through most of the
tests but I get a "Resource Busy" error at one point. Here's the full output:

I'm running Mac OS X 10.8.3 and here's the output of my gcc -v:

MacOSX and FreeBSD are somewhat dicy. If you can run the failing command ("mdb_stat testdb") by hand, successfully, it's probably fine.

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
--disable-checking --enable-werror
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Let me know if you need any other info from me.

Ben Johnson <>

Ben Johnson <>

 -- Howard Chu
 CTO, Symas Corp. 
 Director, Highland Sun
 Chief Architect, OpenLDAP