paritytech / parity-bitcoin

The Parity Bitcoin client
GNU General Public License v3.0
729 stars 215 forks source link

Sync verification thread panicked with DatabaseError("Corruption: block checksum mismatch")', #393

Closed 5chdn closed 7 years ago

5chdn commented 7 years ago

I can not sync the Bitcoin chain from scratch, I'm getting:

2017-04-05 21:25:10  INFO sync "21:25:10" @ Processed 1001 blocks in 2.4438097209931584 seconds. Chain information: [sch:5744 / bh:5904 -> req:128 -> vfy:32 -> stored: 96097]
2017-04-05 21:25:12  INFO sync "21:25:12" @ Processed 1001 blocks in 2.0357384059898322 seconds. Chain information: [sch:4848 / bh:4903 -> req:38 -> vfy:17 -> stored: 97098]
2017-04-05 21:25:14  INFO sync "21:25:14" @ Processed 1001 blocks in 2.3736379760084674 seconds. Chain information: [sch:5568 / bh:5902 -> req:166 -> vfy:168 -> stored: 98099]
2017-04-05 21:25:19  INFO sync "21:25:19" @ Processed 1001 blocks in 4.65646599700267 seconds. Chain information: [sch:4672 / bh:4901 -> req:118 -> vfy:111 -> stored: 99100]
2017-04-05 21:25:21  INFO sync "21:25:21" @ Processed 1001 blocks in 1.8876338889967883 seconds. Chain information: [sch:5648 / bh:5900 -> req:252 -> vfy:0 -> stored: 100101]
2017-04-05 21:25:24  INFO sync "21:25:24" @ Processed 1001 blocks in 3.220806603989331 seconds. Chain information: [sch:4752 / bh:4899 -> req:128 -> vfy:19 -> stored: 101102]
2017-04-05 21:25:28  INFO sync "21:25:28" @ Processed 1001 blocks in 3.926666227998794 seconds. Chain information: [sch:5728 / bh:5898 -> req:170 -> vfy:0 -> stored: 102103]
2017-04-05 21:25:33  INFO sync "21:25:33" @ Processed 1001 blocks in 5.195186812998145 seconds. Chain information: [sch:4576 / bh:4897 -> req:302 -> vfy:19 -> stored: 103104]
2017-04-05 21:25:35  WARN sync Failed to get requested block from peer#6 in 60.0010822389886 seconds
2017-04-05 21:25:38  INFO sync "21:25:38" @ Processed 1001 blocks in 4.616189647000283 seconds. Chain information: [sch:5296 / bh:5896 -> req:597 -> vfy:3 -> stored: 104105]
2017-04-05 21:25:45  INFO sync "21:25:45" @ Processed 1001 blocks in 7.694645419003791 seconds. Chain information: [sch:4400 / bh:4895 -> req:495 -> vfy:0 -> stored: 105106]
2017-04-05 21:25:45  WARN sync Failed to get requested block from peer#12 in 61.374263060002704 seconds
2017-04-05 21:25:48  INFO sync "21:25:48" @ Processed 1001 blocks in 2.8934772450011224 seconds. Chain information: [sch:5504 / bh:5894 -> req:386 -> vfy:4 -> stored: 106107]
2017-04-05 21:25:50  INFO sync "21:25:50" @ Processed 1001 blocks in 2.0577144409908215 seconds. Chain information: [sch:4864 / bh:4893 -> req:27 -> vfy:2 -> stored: 107108]
2017-04-05 21:25:55  INFO sync "21:25:55" @ Processed 1001 blocks in 4.5385220979951555 seconds. Chain information: [sch:5840 / bh:5892 -> req:52 -> vfy:0 -> stored: 108109]
2017-04-05 21:25:55  WARN sync Failed to get requested block from peer#10 in 60.00125503000163 seconds
2017-04-05 21:26:00  INFO sync "21:26:00" @ Processed 1001 blocks in 4.683867430998362 seconds. Chain information: [sch:4688 / bh:4891 -> req:196 -> vfy:7 -> stored: 109110]
2017-04-05 21:26:04  INFO sync "21:26:04" @ Processed 1001 blocks in 4.306119133994798 seconds. Chain information: [sch:5664 / bh:5890 -> req:225 -> vfy:1 -> stored: 110111]
2017-04-05 21:26:10  INFO sync "21:26:10" @ Processed 1001 blocks in 5.930292293007369 seconds. Chain information: [sch:4640 / bh:4889 -> req:249 -> vfy:0 -> stored: 111112]
2017-04-05 21:26:17  INFO sync "21:26:17" @ Processed 1001 blocks in 7.30633241700707 seconds. Chain information: [sch:5744 / bh:5888 -> req:128 -> vfy:16 -> stored: 112113]
2017-04-05 21:26:24  INFO sync "21:26:24" @ Processed 1001 blocks in 6.726270119994297 seconds. Chain information: [sch:4720 / bh:4887 -> req:165 -> vfy:2 -> stored: 113114]
2017-04-05 21:26:35  WARN sync Failed to get requested block from peer#6 in 60.001214909003465 seconds
2017-04-05 21:26:35  WARN sync Too many failures for peer#6. Excluding from synchronization
2017-04-05 21:26:36  INFO sync "21:26:36" @ Processed 1001 blocks in 11.921171719994163 seconds. Chain information: [sch:5568 / bh:5886 -> req:318 -> vfy:0 -> stored: 114115]
2017-04-05 21:26:43  INFO sync "21:26:43" @ Processed 1001 blocks in 7.359186301997397 seconds. Chain information: [sch:4800 / bh:4885 -> req:80 -> vfy:5 -> stored: 115116]
2017-04-05 21:26:51  INFO sync "21:26:51" @ Processed 1001 blocks in 8.291601277000154 seconds. Chain information: [sch:5776 / bh:5884 -> req:77 -> vfy:31 -> stored: 116117]
2017-04-05 21:26:55  WARN sync Failed to get requested block from peer#10 in 60.001048438003636 seconds
2017-04-05 21:26:55  WARN sync Too many failures for peer#10. Excluding from synchronization
2017-04-05 21:26:58  INFO sync "21:26:58" @ Processed 1001 blocks in 6.20621675500297 seconds. Chain information: [sch:4752 / bh:4883 -> req:128 -> vfy:3 -> stored: 117118]
2017-04-05 21:27:07  INFO sync "21:27:07" @ Processed 1001 blocks in 9.556179481005529 seconds. Chain information: [sch:5728 / bh:5882 -> req:151 -> vfy:3 -> stored: 118119]
2017-04-05 21:27:20  INFO sync "21:27:20" @ Processed 1001 blocks in 12.702242341998499 seconds. Chain information: [sch:4704 / bh:4881 -> req:176 -> vfy:1 -> stored: 119120]
2017-04-05 21:27:32  INFO sync "21:27:32" @ Processed 1001 blocks in 12.42086299599032 seconds. Chain information: [sch:5424 / bh:5880 -> req:456 -> vfy:0 -> stored: 120121]
2017-04-05 21:27:35  WARN sync Failed to get requested block from peer#12 in 62.91913963299885 seconds
2017-04-05 21:27:47  INFO sync "21:27:47" @ Processed 1001 blocks in 15.096452813988435 seconds. Chain information: [sch:4400 / bh:4879 -> req:442 -> vfy:37 -> stored: 121122]
2017-04-05 21:27:56  INFO sync "21:27:56" @ Processed 1001 blocks in 8.21826640200743 seconds. Chain information: [sch:5504 / bh:5878 -> req:368 -> vfy:6 -> stored: 122123]
2017-04-05 21:28:05  INFO sync "21:28:05" @ Processed 1001 blocks in 9.14137881300121 seconds. Chain information: [sch:4480 / bh:4877 -> req:239 -> vfy:158 -> stored: 123124]
thread 'Sync verification thread' panicked at 'Block 00000000000005e49e1c8ad9ac0d2f621aafb99ba0d207c7f72603df6d7972fe insertion failed with error DatabaseError("Corruption: block checksum mismatch")', sync/src/synchronization_client_core.rs:1068
stack backtrace:
  1:     0x55b99f66314c - std::sys::imp::backtrace::tracing::imp::write::h0263459999f7f6d4
  2:     0x55b99f666e8e - std::panicking::default_hook::{{closure}}::hfb43d85657ad3a4c
  3:     0x55b99f666a8a - std::panicking::default_hook::h2f5648e30de6b0b9
  4:     0x55b99f66732b - std::panicking::rust_panic_with_hook::h9f3930ca8cee8a65
  5:     0x55b99f6671c4 - std::panicking::begin_panic::hbe2663b4713ef886
  6:     0x55b99f6670e9 - std::panicking::begin_panic_fmt::h6073f869f9b775fa
  7:     0x55b99f3d4b1d - sync::synchronization_verifier::AsyncVerifier::verification_worker_proc::h13c36c506344a3d8
                       at /home/user/.opt/parity-bitcoin/sync/src/synchronization_client_core.rs:1068
                       at /home/user/.opt/parity-bitcoin/sync/src/synchronization_client_core.rs:682
                       at /home/user/.opt/parity-bitcoin/sync/src/synchronization_verifier.rs:112
                       at /home/user/.opt/parity-bitcoin/sync/src/synchronization_verifier.rs:89
  8:     0x55b99f39a7d2 - std::panicking::try::do_call::hf15ad717544701f3
                       at /home/user/.opt/parity-bitcoin/sync/src/synchronization_verifier.rs:80
                       at /build/rust/src/rustc-1.16.0-src/src/libstd/panic.rs:296
                       at /build/rust/src/rustc-1.16.0-src/src/libstd/panicking.rs:460
  9:     0x55b99f66dd8b - <unknown>
Aborted (core dumped)

pbtc version (built with --release):

parity-bitcoin/target/release $ ./pbtc --version
pbtc 0.1.0
parity-bitcoin/target/release $ git rev-parse --verify HEAD
4cb65e3409f732211d2b26dfc272bda980c93f55

arch linux:

parity-bitcoin/target/release $ uname -a
Linux ursae 4.10.8-1-ARCH #1 SMP PREEMPT Fri Mar 31 16:50:19 CEST 2017 x86_64 GNU/Linux
parity-bitcoin/target/release $ rustc -Vv
rustc 1.16.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.16.0
LLVM version: 3.9
debris commented 7 years ago

looks like rocksdb error :/

5chdn commented 7 years ago

It might be my VPN tampering with my traffic (they have such an anti-malware filter).

I reset the database and tried again and now it works.