On 02/21/13 21:07, David Hill wrote:
I have been playing with bitcoind, trying to get it working on OpenBSD.
I have stumbled on some bugs that have been fixed.  One included the use
of rand(), which caused all the wallet unit tests to fail.

https://github.com/bitcoin/bitcoin/pull/2312

This also fixed the other BSDs and Windows as well, I believe.

Anyway, they last huge bug I am tracking down is data corruption in my
btree files from db4.  They recommended I try the latest code which
replaces Berekely DB with Google's Leveldb.  I still get corruption.

The good news is, leveldb comes with unit tests.  The corruption_test
fails almost immediately with OpenBSD, but passes on Linux and FreeBSD.

I sifted through the code and created a test to attempt to emulate what
it is doing, which I've included below.  I am not sure if this is the
cause of the corruption, but the output is different on OpenBSD than on
with FreeBSD, Linux, and NetBSD.

On FreeBSD, Linux, and NetBSD, the second fread outputs 43.  On OpenBSD,
it outputs 00.

On OpenBSD, mmaped files and the buffer cache are not automatically in sync.
Placing a call to msync(2) between the modification and the write fixes this.
--
Ariane

  • OpenBSD mmap David Hill
    • Re: OpenBSD mmap Ariane van der Steldt

Reply via email to