bitcoind daemon crashing
Describe the issue
bitcoind daemon crashes.
Can you reliably reproduce the issue?
No. It seems to happen randomly every now and then.
What version of bitcoin-abc are you using?
bitcoin-abc-0.20.1 official binary.
Machine specs:
DigitalOcean vps:
- OS: ubuntu 18.04
- CPU: Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
- RAM: 32GB
- Disk size: 640GB
- Disk Type (HD/SDD): SSD
Any extra information that might be useful in the debugging process.
I'm using the rest interface to load blockchain data for custom indexing. I'm not sure if this is related to using it too excessively or not. Below is a few lines from debug.log before the last two crashes:
2019-09-23T12:26:55Z UpdateTip: new best=000000000000000001776c0a68cb547dd1631253431ff2b92657b4a809313b08 height=601495 version=0x20400000 log2_work=87.995986 tx=278960024 date='2019-09-23T12:26:46Z' progress=1.000000 cache=5.5MiB(40856txo)
2019-09-23T12:27:04Z New outbound peer connected: version: 70015, blocks=601495, peer=14
2019-09-23T12:27:11Z New outbound peer connected: version: 70015, blocks=530361, peer=16
2019-09-23T12:27:12Z New outbound peer connected: version: 70015, blocks=601495, peer=17
2019-09-23T12:27:17Z ERROR: ContextualCheckBlockHeader: rejected by checkpoint lock-in at 530359
2019-09-23T12:27:17Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 0000000000000000012f7ed499fd8f51fa6b9ea0c1e35ed24d11b5bee8c8b0fe, checkpoint mismatch (code 67)
2019-09-23T12:27:17Z Misbehaving: 47.74.129.133:8333 peer=16 (0 -> 100) reason: checkpoint mismatch BAN THRESHOLD EXCEEDED
2019-09-23T12:27:17Z ERROR: invalid header received
2019-09-23T12:27:18Z New outbound peer connected: version: 70015, blocks=601495, peer=18
2019-09-23T12:27:20Z New outbound peer connected: version: 80003, blocks=601495, peer=21
2019-09-23T12:31:20Z ERROR: ContextualCheckBlockHeader: rejected by checkpoint lock-in at 582680
2019-09-23T12:31:20Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 0000000000000000037c7e613bb562ee5712ad871d7097add955c5bff5b20517, checkpoint mismatch (code 67)
2019-09-23T12:31:20Z Misbehaving: 95.216.145.252:60080 peer=34 (0 -> 100) reason: checkpoint mismatch BAN THRESHOLD EXCEEDED
2019-09-23T12:31:20Z ERROR: invalid header received
2019-09-24T04:51:25Z
2019-09-24T04:53:12Z UpdateTip: new best=00000000000000000249523f4db94dd3c377569899510da32943a74246a361c8 height=601618 version=0x20000000 log2_work=87.996833 tx=278981863 date='2019-09-24T04:19:55Z' progress=0.999977 cache=11.9MiB(89457txo)
2019-09-24T04:53:13Z ERROR: ContextualCheckBlockHeader: rejected by checkpoint lock-in at 556767
2019-09-24T04:53:13Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000000000000001d956714215d96ffc00e0afda4cd0a96c96f8d802b1662b, checkpoint mismatch (code 67)
2019-09-24T04:53:13Z Misbehaving: 77.74.192.2:8333 peer=11 (0 -> 100) reason: checkpoint mismatch BAN THRESHOLD EXCEEDED
2019-09-24T04:53:13Z ERROR: invalid header received
2019-09-24T04:53:13Z ERROR: ContextualCheckBlockHeader: rejected by checkpoint lock-in at 556767
2019-09-24T04:53:13Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000000000000001d956714215d96ffc00e0afda4cd0a96c96f8d802b1662b, checkpoint mismatch (code 67)
2019-09-24T04:53:13Z Misbehaving: 47.90.246.229:8333 peer=8 (0 -> 100) reason: checkpoint mismatch BAN THRESHOLD EXCEEDED
2019-09-24T04:53:13Z ERROR: invalid header received
2019-09-24T04:53:13Z New outbound peer connected: version: 80003, blocks=601618, peer=14
2019-09-24T04:53:26Z New outbound peer connected: version: 70015, blocks=601618, peer=16
2019-09-24T04:53:31Z New outbound peer connected: version: 70015, blocks=601618, peer=17
2019-09-24T05:01:29Z socket recv error Connection reset by peer (104)
The common thing seems to the checkpoint mismatch and invalid header received errors.
Actually I'm now pretty confident that that the crashes are indeed related to using the rest interface too excessively because the http requests from my parser fail around big blocks such as https://explorer.bitcoin.com/bch/block/000000000000000000b0c3406da9406ddaa9a54605e4e9b02dee96e02eba7170 and https://explorer.bitcoin.com/bch/block/000000000000000000f9dbebe6d10047e9ab1f7b0a2fdfa73738e60af3416958. I'm doing several requests in parallel so I think lowering rpcthreads in bitcoin.conf from 32 to something like 1 or 2 should solve my issue.
I'm not sure why the errors in debug.log seem to be completely unrelated but I'm guessing that excessive rpc usage is causing some other mechanism to fail.
Closing this issue now. I will reopen if the issue persists with a single rpcthread.
I also encountered a similar problem. My bitcoin.conf is configured by myself. How is rpcthreads configured? Is there any relevant documentation, thanks
2020-01-14T13:13:07Z UpdateTip: new best=0000000000000000000c15666da3b854d4b3830e0dec97b79883457fca56cef1 height=612797 version=0x3fff0000 log2_work=91.550872 tx=493128123 date='2020-01-14T13:13:24Z' progress=1.000000 cache=10.7MiB(80607txo) warning='69 of last 100 blocks have unexpected version'