Segmentation fault (running ./bitcoind)

-1

I'm trying to run ./bitcoind on Ubuntu 17

Error: Error: A fatal internal error occurred, see debug.log for details
Segmentation fault (core dumped)

In debug.log

2017-12-01 20:18:50 Bitcoin version v0.15.99.0-g9e38d357447
2017-12-01 20:18:50 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-12-01 20:18:50 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2017-12-01 20:18:50 Setting nMinimumChainWork=000000000000000000000000000000000000000000723d3581fe1bd55373540a
2017-12-01 20:18:50 Using the 'sse4' SHA256 implementation
2017-12-01 20:18:50 Using RdRand as an additional entropy source
2017-12-01 20:18:50 Default data directory /home/home/.bitcoin
2017-12-01 20:18:50 Using data directory /home/home/.bitcoin
2017-12-01 20:18:50 Using config file /home/home/.bitcoin/bitcoin.conf
2017-12-01 20:18:50 Using at most 125 automatic connections (1024 file descriptors available)
2017-12-01 20:18:50 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2017-12-01 20:18:50 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2017-12-01 20:18:50 Using 2 threads for script verification
2017-12-01 20:18:50 scheduler thread start
2017-12-01 20:18:50 HTTP: creating work queue of depth 16
2017-12-01 20:18:50 No rpcpassword set - using random cookie authentication
2017-12-01 20:18:50 Generated RPC authentication cookie /home/home/.bitcoin/.cookie
2017-12-01 20:18:50 HTTP: starting 4 worker threads
2017-12-01 20:18:50 Using wallet directory /home/home/.bitcoin/wallets
2017-12-01 20:18:50 init message: Verifying wallet(s)...
2017-12-01 20:18:50 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-12-01 20:18:50 Using wallet wallet.dat
2017-12-01 20:18:50 CDBEnv::Open: LogDir=/home/home/.bitcoin/wallets/database ErrorFile=/home/home/.bitcoin/wallets/db.log
2017-12-01 20:18:50 Cache configuration:
2017-12-01 20:18:50 * Using 2.0MiB for block index database
2017-12-01 20:18:50 * Using 8.0MiB for chain state database
2017-12-01 20:18:50 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2017-12-01 20:18:50 init message: Loading block index...
2017-12-01 20:18:50 Opening LevelDB in /home/home/.bitcoin/blocks/index
2017-12-01 20:18:50 Opened LevelDB successfully
2017-12-01 20:18:50 Using obfuscation key for /home/home/.bitcoin/blocks/index: 0000000000000000
2017-12-01 20:18:50 LoadBlockIndexDB: last block file = 0
2017-12-01 20:18:50 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2017-12-01 20:18:50 Checking all blk files are present...
2017-12-01 20:18:50 LoadBlockIndexDB: transaction index disabled
2017-12-01 20:18:50 Initializing databases...
2017-12-01 20:18:50 Pre-allocating up to position 0x1000000 in blk00000.dat
2017-12-01 20:18:50 Opening LevelDB in /home/home/.bitcoin/chainstate
2017-12-01 20:18:50 Opened LevelDB successfully
2017-12-01 20:18:50 Wrote new obfuscate key for /home/home/.bitcoin/chainstate: f22764d2d2990e26
2017-12-01 20:18:50 Using obfuscation key for /home/home/.bitcoin/chainstate: f22764d2d2990e26
2017-12-01 20:18:50 init message: Rewinding blocks...
2017-12-01 20:18:50  block index             118ms
2017-12-01 20:18:50 init message: Loading wallet...
2017-12-01 20:18:50 nFileVersion = 159900
2017-12-01 20:18:50 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2017-12-01 20:18:50 Performing wallet upgrade to 60000
2017-12-01 20:18:51 keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2017-12-01 20:18:51  wallet                 1388ms
017-12-01 20:18:51 setKeyPool.size() = 2000
2017-12-01 20:18:51 mapWallet.size() = 0
2017-12-01 20:18:51 mapAddressBook.size() = 0
2017-12-01 20:18:51 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2017-12-01 20:18:51 *** Failed to read block
2017-12-01 20:18:51 Error: Error: A fatal internal error occurred, see debug.log for details
2017-12-02 00:07:28

I've tried ./bitcoind -reindex It's starting now, but not working properly. See debug.log:

2017-12-02 10:38:45 init message: Loading block index...
2017-12-02 10:38:45 Wiping LevelDB in /home/home/.bitcoin/blocks/index
2017-12-02 10:38:45 Opening LevelDB in /home/home/.bitcoin/blocks/index
2017-12-02 10:38:45 Opened LevelDB successfully
2017-12-02 10:38:45 Using obfuscation key for /home/home/.bitcoin/blocks/index: 0000000000000000
2017-12-02 10:38:45 Initializing databases...
2017-12-02 10:38:45 Wiping LevelDB in /home/home/.bitcoin/chainstate
2017-12-02 10:38:45 Opening LevelDB in /home/home/.bitcoin/chainstate
2017-12-02 10:38:45 Opened LevelDB successfully
2017-12-02 10:38:45 Wrote new obfuscate key for /home/home/.bitcoin/chainstate: 5def55d4b4b2f334
2017-12-02 10:38:45 Using obfuscation key for /home/home/.bitcoin/chainstate: 5def55d4b4b2f334
2017-12-02 10:38:45  block index              96ms
2017-12-02 10:38:45 init message: Loading wallet...
2017-12-02 10:38:45 nFileVersion = 159900
2017-12-02 10:38:45 Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total
2017-12-02 10:38:45  wallet                   45ms
2017-12-02 10:38:45 setKeyPool.size() = 2000
2017-12-02 10:38:45 mapWallet.size() = 0
2017-12-02 10:38:45 mapAddressBook.size() = 0
2017-12-02 10:38:45 Reindexing block file blk00000.dat...
2017-12-02 10:38:45 ERROR: AcceptBlock: high-hash, proof of work failed (code 16)
2017-12-02 10:38:45 Reindexing finished
2017-12-02 10:38:45 Failed to open mempool file from disk. Continuing anyway.

user8519841

Posted 2017-12-01T22:16:58.230

Reputation: 7

The debug.log lines are truncated, can you post the full thing? This error means that your blockchain is corrupted.Andrew Chow 2017-12-01T22:56:46.473

@AndrewChow I've edited the post. You can see details.user8519841 2017-12-02T08:00:27.797

Answers

-1

Your blockchain is corrupted and will need to be redownloaded. Go to the Bitcoin Core datadir (it's /home/home/.bitcoin for you) and delete the blocks and chainstate folders inside of it. This will cause bitcoind to redownload the entire blockchain.

Andrew Chow

Posted 2017-12-01T22:16:58.230

Reputation: 40 910

Will it work if i'm trying to generate a new genesis block? I've set a new timestamp, and all other values (including asserts) to 0x0.user8519841 2017-12-02T21:59:42.197

I've set to 0x0 the following variables: genesisOutputScript, BIP34Hash, defaultAssumeValid Removed the seeds and asserts, and I've set a new timestamp (unix and the text one). After that I've run make and got the result below.user8519841 2017-12-02T22:03:23.607

Are you trying to make your own altcoin?Andrew Chow 2017-12-02T22:38:31.293

I'm trying to understand how it works for academic purpose.user8519841 2017-12-02T22:57:37.857

Am I doing the right steps?user8519841 2017-12-03T07:28:04.723