< provoostenator>
I tried #11857, deleted the indexes folder, swichted back to master and then tried to use index=1. If I agree to rebuilding the block database I get "Error opening block database". Any ideas?
< provoostenator>
(technically master from yesterday)
< provoostenator>
Master from today has the same issue. Seems to works fine with txindex=0. Seems to be QT specific, bitcoind does reindex.
< provoostenator>
In fact, if I let bitcoind do its thing for a minute, stop it and then start QT, it's happy.
< provoostenator>
(by happy I mean that it takes over the reindex work)
< wumpus>
hmm strange
< achow101>
sipa: yeah, that was fixed. Originally we weren't going to fix it but then we did
< provoostenator>
It's actually happening on master: "testnet3/blocks/index/LOCK: already held by process"
< provoostenator>
I'm pretty sure I quit QT cleanly, so don't know why that lock file doesn't get removed.
< provoostenator>
Also I think I'm confused about the difference between chainstate, blocks/index and the proposed /indexes directory.
< provoostenator>
If I delete blocks/index and start QT, it immedidately creates a fresh directory with a LOCK file. It then complains "Error initializing block database [rebuild?]". If I say OK I get error building block database and the log compalins "LOCK: already held by process"
< provoostenator>
If instead I click on Abort, it also doesn't clean up the LOCK file.
< provoostenator>
Launching with -reindex avoids the error message.
< provoostenator>
Deleting the LOCK file before agreeing to "Do you want to rebuild the block database now?" doesn't help either; it just creates a new one and throws the above error
< provoostenator>
Which then calls CDBWrapper::CDBWrapper with fWipe = true, which calls leveldb::DestroyDB which fails if the file is locked.
< jimpo>
Why would that be QT specific then?
< provoostenator>
Because bitcoind refuses to start withotu -reindex
< provoostenator>
Whereas QT will first open the levelDB file, then find a problem and then run the loop again trying to wipe it.
< provoostenator>
I think it needs to close the DB file first
< jimpo>
I'll try to reproduce on master
< provoostenator>
Deleting blocks/index is probably the easiest way to produce the issue
< provoostenator>
I "fixed" the issue by adding one line above: if (fReset) { pblocktree.reset(); }
< provoostenator>
jimpo: actually, I had to use the chainstate dir generated by your branch (though possibly corrupted due to some other mistake on my end) to get the error
< jimpo>
I think my testnet chain is corrupt anyway, so I need to deal with that first
< bitcoin-git>
[bitcoin] Sjors opened pull request #12401: Reset pblocktree before deleting LevelDB file (master...2018/02/reset-pblocktree) https://github.com/bitcoin/bitcoin/pull/12401
< berndj>
why were dev keys removed from contrib/gitian-keys/ and replaced with a list of fingerprints? isn't this dangerous now that SHA1 is on its last legs?
< mesh_>
berndj: well, finding collisions is much easier than preimage attacks