https://pantsbuild.org/ logo
f

fast-nail-55400

08/26/2022, 7:43 PM
Copy code
thread 'tests::shard_counts' panicked at 'called `Result::unwrap()` on an `Err` value: "Error creating/opening content database at \"/var/folders/xc/t6sxrjnj7p37q3mml1kj5qxc0000gn/T/.tmpZNLxIF/0\": MDB_MAP_FULL: Environment mapsize limit reached"', sharded_lmdb/src/tests.rs:20:4
I'm getting this error when running Rust tests. I've already increased
ulimit -n
to
10000
. I don't see anything else relevant in https://www.pantsbuild.org/docs/troubleshooting. Any advice on what else I should do to get the test to overcome this resource limit?
e

enough-analyst-54434

08/26/2022, 8:00 PM
That sounds more like a memory limit, like can't mmap. How are those sort of stats looking on your machine?
f

fast-nail-55400

08/26/2022, 9:46 PM
Copy code
$ ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8176
-c: core file size (blocks)         0
-v: address space (kbytes)          unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes                       2666
-n: file descriptors                10000
other than stack size, everything else is unlimited (or effectively so for file descriptors)
w

witty-crayon-22786

08/26/2022, 9:48 PM
is this an M1/M2?
oh, hm. though: that value is configured per-test.
that test configures a max size of
10_000_000
(bytes).
f

fast-nail-55400

08/26/2022, 9:51 PM
is this an M1/M2?
this is a M1
w

witty-crayon-22786

08/26/2022, 9:52 PM
does increasing the map size for the test help? one bit of FUD that i’ve heard but never confirmed is that LMDB’s file format is platform-specific, which might mean that you need more space on M1
f

fast-nail-55400

08/27/2022, 2:31 AM
doubling to 20,000,000 gets the test to pass
lowering the number 13 mil passes 12 mil fails