[Pkg-bitcoin-devel] Bug#700908: DB_LOG_AUTOREMOVE makes the block database incompatible with bitcoin-qt

Antoine Beaupré anarcat at debian.org
Tue Feb 19 06:10:11 UTC 2013


Package: bitcoind
Version: 0.7.2-3
Severity: important

The wrapper script, established around this thread here:

http://lists.debian.org/debian-wnpp/2011/01/msg00205.html

... sets the DB_LOG_AUTOREMOVE flag for the bitcoin infamous BDB
database. That's cool because it avoids extra I/O we may not need,
especially for the first block sync. *However*, it *does* mean it is
incompatible with the -qt interface, which *doesn't* have such a
wrapper.

Today I had to rebootstrap my whole block database because I stopped the
bootstrap from qt to restart it with bitcoind. It failed with a nasty
error at some point:

file blkindex.dat has LSN 727/2518588, past end of log at 727/1519938
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
__db_meta_setup: /home/anarcat/.bitcoin/blkindex.dat: unexpected file type or format

I am not sure this is the problem I went through, but it does raise a
red flag in my mind now. I *think* bitcoind was able to start with the
bitcoin-qt data *once*. Then maybe I interrupted it or something
similar, and then the above error appeared and my block database was
basically hosed.

I am not convinced by the arguments put forward in the aforementionned
thread: seems to me we should follow upstream convention of using
berkeley DB logs, or at least talk with upstream clearly about it (e.g.
file the issue with logs garbage collection in the github bugtracker).

At the very least, bitcoin-qt and bitcoind need to be consistent, as
they operate on the same data.

Thanks,

A.
 
-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bitcoind depends on:
ii  libboost-filesystem1.49.0       1.49.0-3.2
ii  libboost-program-options1.49.0  1.49.0-3.2
ii  libboost-system1.49.0           1.49.0-3.2
ii  libboost-thread1.49.0           1.49.0-3.2
ii  libc6                           2.13-37
ii  libdb5.1++                      5.1.29-5
ii  libgcc1                         1:4.7.2-5
ii  libminiupnpc5                   1.5-2
ii  libssl1.0.0                     1.0.1c-4
ii  libstdc++6                      4.7.2-5
ii  zlib1g                          1:1.2.7.dfsg-13

bitcoind recommends no packages.

Versions of packages bitcoind suggests:
ii  db-util     5.1.6
ii  db4.8-util  4.8.30-12

-- no debconf information



More information about the Pkg-bitcoin-devel mailing list