[pkg-go] Bug#976907: golang-github-boltdb-bolt: FTBFS on ppc64el (arch:all-only src pkg): dh_auto_test: error: cd obj-powerpc64le-linux-gnu && go test -vet=off -v -p 160 -short github.com/boltdb/bolt github.com/boltdb/bolt/cmd/bolt returned exit code 1

Andreas Henriksson andreas at fatal.se
Sat Dec 12 16:59:37 GMT 2020

Hello all,

1 down, 1 to go.... info below.

On Wed, Dec 09, 2020 at 10:03:31AM +0100, Lucas Nussbaum wrote:
> Source: golang-github-boltdb-bolt
> Version: 1.3.1-7
> Severity: serious
> Justification: FTBFS on ppc64el
> Tags: bullseye sid ftbfs
> Usertags: ftbfs-20201209 ftbfs-bullseye ftbfs-ppc64el
> Hi,
> During a rebuild of all packages in sid, your package failed to build
> on ppc64el. At the same time, it did not fail on amd64.
> > === RUN   TestBucket_Stats
> >     bucket_test.go:1172: unexpected BranchPageN: 0
> > --- FAIL: TestBucket_Stats (6.41s)

^--- I've not looked into this one yet.

> > === RUN   TestTx_Commit_ErrTxNotWritable
> > panic: test timed out after 10m0s

^-- this one is solved by adding `tx.Rollback()` last in
TestTx_Commit_ErrTxNotWritable function (in tx_test.go:65).
In other words, this is a test-suite bug (not a bug in the actual
product code).

The reasoning goes that tx.Commit() is expected to
return error bolt.ErrTxNotWritable, which it does -- but this
means it's holding a reader lock on db.mmaplock.
After the test function finishes the deferred function
db.MustClose() runs and calls into things that tries
to take a read-write lock of db.mmaplock which times out.
The added tx.Rollback() on a read-only tx basically only
removes the transaction and releases the db.mmaplock.

I have no idea why this would not also trigger on any other arch.

Andreas Henriksson

More information about the Pkg-go-maintainers mailing list