bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Build failure on 32-bits

Open NightTsarina opened this issue 8 years ago • 3 comments

Hi,

As reported in Debian bug #849663, BoltDB fails to build tests due to a constant overflow:

src/github.com/boltdb/bolt/db_test.go:534: constant 2147483648 overflows int

I guess using a slightly smaller constant would fix this and make the test work both in 64 and 32 bits architectures, but I am not sure why you used such a big constant in the first place. Could anybody give some insight on this?

Full log: https://tests.reproducible-builds.org/debian/rbuild/unstable/i386/golang-github-boltdb-bolt_1.2.1-2.rbuild.log

Thanks!

NightTsarina avatar Jan 06 '17 17:01 NightTsarina

From a quick glance, looks like 1 << 30 could be used instead. Want to see whether all tests pass with that change? But using bolt on a 32 bit system might not be a good idea anyway; see the readme.

josharian avatar Jan 16 '17 02:01 josharian

The readme says it might be "problematic" with large amounts of data. That implies that it's supported.

After changing db_test.go:534 to 1 << 30, there are still some failures:

  • TestBucket_Put_ValueTooLarge panics because it can't allocate 2GB (putting DRONE=true in the environment works around this)
  • TestOpen_Size_Large consistently panics with an "unexpected fault address" after writing about 1GB. I'm not sure why.

peterjeremy avatar Feb 03 '17 09:02 peterjeremy

I was able to make the tests pass by using 1 << 29

NightTsarina avatar Mar 23 '17 16:03 NightTsarina