nosql
nosql copied to clipboard
TestBadger fails on 32-bit / i386 linux
Subject of the issue
TestBadger
fails when running reproducibility testing on 32-bit / i386 debian
Your environment
- OS: Debian
- Version: unstable
- Architecture: i386
Additional context
=== RUN TestBadger
badger 2022/08/01 05:59:21 INFO: All 0 tables opened in 0s
nosql_test.go:322: error 'error opening Badger database: During db.vlog.open: Error while creating log file in valueLog.open: Mmap value log file. Path=./tmp/badgerdb/000000.vlog. Error=cannot allocate memory' not expected
--- FAIL: TestBadger (0.06s)
For full logs see here: https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/i386/golang-github-smallstep-nosql.html
Hey @pymnh thanks for opening the issue!
Truth be told I haven't dug into the Badger integration in a looong time. However, I recall that specific architectures require Badger to be run with configuration flags that restrict the memory, disk, addressable bit space.
I think the error you're seeing is a known Badger error (https://github.com/dgraph-io/badger/issues/246) -- it's Badger yelling that it doesn't have enough room to run. Since we generally test in 64 bit environments, we haven't optimized the tests to run in 32 bit environments. If you'd like to post a PR with the changes necessary to run the tests against a 32 bit env, we'll happily merge. I imagine it would just be adding some options here - https://github.com/smallstep/nosql/blob/78e6f87e489a1dd4eac28da3b4f0f0a5c3722d49/nosql_test.go#L344.
Cheers 🍻