4

I got this error all of a sudden, this is also my third time trying to sync the blockchain from scratch.

2017-07-01 02:37:30.764 [P2P7]  INFO    global  src/cryptonote_protocol/cryptonote_protocol_handler.inl:1004    [1;33m[167.114.166.199:55957 INC]  Synced 239998/1344461[0m
2017-07-01 02:37:33.263 [P2P3]  INFO    global  src/cryptonote_protocol/cryptonote_protocol_handler.inl:1004    [1;33m[192.81.219.211:55014 INC]  Synced 240198/1344461[0m
2017-07-01 02:37:38.763 [P2P9]  ERROR   blockchain  src/cryptonote_core/blockchain.cpp:3383 Error adding block with hash: <d2655d92c4bb008650350bb60658f612297dde0685ebf4cb5735f4c261edfb15> to blockchain, what = Error adding spent key image to db transaction: MDB_PAGE_NOTFOUND: Requested page not found
2017-07-01 02:37:38.764 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:40.152 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   DB error attempting to fetch block index from hashMDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:41.714 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   DB error attempting to fetch block index from hashMDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:41.834 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   DB error attempting to fetch block index from hashMDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:45.188 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:47.176 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2017-07-01 02:37:48.896 [P2P9]  WARN    blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:71   Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid

3 Answers 3

3

Your errors indicate that your blockchain is most likely corrupted. To resolve this issue you need to resync from scratch. This is done by deleting data.mdb from C:\ProgramData\bitmonero\lmdb (Windows) or $HOME/.bitmonero/lmdb (Linux and Mac OS X), which will trigger the resync.

To avoid corruptions make sure to always gracefully exit monerod. In addition, make sure you are running the latest version, which is 0.10.3.1 currently.

1
  • 1
    I'd test the RAM and HDD. Could be hardware failing if he tried 3 times without success. There was a case of bad RAM causing corruptions, if I rember well.
    – JollyMort
    Jul 1, 2017 at 13:02
2

TL;DR: give monero more disk space; restart it twice.

For me this was a full volume. I had given Monero 20G last year, and now lmdb is bigger than that. I was able to resize the volume and start monerod, which ran but did not write any new data. After restarting monreod again, synchronization started correctly.

On the second restart I saw:

2017-08-18 12:51:19.657 ... INFO global src/blockchain_db/lmdb/db_lmdb.cpp:571 [batch] DB resize needed 2017-08-18 12:51:19.662 ... INFO global src/blockchain_db/lmdb/db_lmdb.cpp:487 LMDB Mapsize increased. Old: 31744MiB, New: 32768MiB

Perhaps restarting it caused a clean database close? I was glad I did not have to resync the first 20GB of the blockchain. Thanks devs who care about consistency!

1

I had the same type of error! tried to resync the whole blockchain again, but the error wasn't solved. Maybe still isn't (guess problem is on my side)...

Anyway I get around by downloading the blockchain directly: here
And importing it:

monero-blockchain-import --input-file blockchain.raw --resume=1

--resume=1 to continue existing blockchain

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.