Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing wallet software from Peercoin to Peerunity to Peercoin causing DB exception #68

Closed
pennybreak opened this issue May 27, 2014 · 4 comments

Comments

@pennybreak
Copy link

Changing wallet software from Peecoin 0.4.0 to Peerunity 0.1.0 and then back to Peercoin 0.4.0 causes DB exception upon startup:

EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
peershares in AppInit() 
@pennybreak
Copy link
Author

This is the same error that we saw when attempting to move from DB's built with BDB 5.3 to those built with the correct db-4.8.30.NC. This leads me back to wondering what kind of differences there are between the old libdb4.8++-dev packages that Sunny built Peercoin with and the db-4.8.30.NC.tar.gz package that we and bitcoin are now using.

@svk31
Copy link

svk31 commented May 31, 2014

I've got exactly the same error after compiling latest Peerunity from master, running Peerunity once then trying to restart ppcoind. Ubuntu 14.04 32bit.

************************
EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
ppcoin in AppInit()       

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

@brossi
Copy link

brossi commented May 31, 2014

As @pennybreak indicated above, all indications point to a version mismatch in the BerkeleyDB dependencies that @sunnyking used to compile the Peercoin reference client (a specific version of libdb4.8++-dev, which isn't available from any source that we can find) and the version that Peerunity is built with (db-4.8.30.NC).

Bitcoin ran into the same problem with incompatible versions of wallets, and there is a straight-forward fix that can be run from the command line to correct it.

Make sure that none of your Peerunity or Peercoin clients are running (GUI or daemon), and if they are, shut them down before you start. I'm assuming your .ppcoin directory is located at the root of your /home directory, so if it isn't, just adapt the first step:

$ cd ~/.ppcoin
$ rm -rf db* database* .lock *.pid

Now, when you restart ppcoind, it should launch as expected.

We've talked about adding a bash script that could do this for you, but other than in situations where you're testing the functionality, do we envision that large groups of users are going to be attempting to seamlessly go back and forth between their Peerunity clients and Peercoin reference clients?


If you see this, @sunnyking, could you please run a test for us? To try to lock down if this issue is in fact caused by the dependency mismatch that we think it is could you let us know what output is returned when you run this command on the system you used to build the Peercoin v0.4.0 reference binaries?

od -j12 -N8 -tx4 ~/.ppcoin/testnet/database/log.000*

The output will look something like this:

0000014 00040988 0000000f

Source

Thank you!

@pennybreak
Copy link
Author

On recent Ubuntu releases, the libdb4.8++-dev package is not in the default repositories. However it's in the bitcoin repository, which we can add with:

sudo apt-add-repository ppa:bitcoin/bitcoin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants