thor icon indicating copy to clipboard operation
thor copied to clipboard

testnet sync always fail

Open JaegerFong opened this issue 5 years ago • 12 comments

Hi there,

i create a testnet node using docker,but always sync fail . Sync show that out of sync ,and i try several time but fail

OS Version:

Ubuntu 20

here’s some log info

Starting Thor/v1.3.7-51b579c-release/linux/go1.13.15 Network [ 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 testnet ] Best block [ 0x00043f76cd77ba8c69b7fee9bf96828cac1ff35091fe59aebd7eaf4a3461a96b #278390 @2018-07-28 17:21:50 +0000 UTC ] Forks [ VIP191: #2898800, ETH_CONST: #3192500 ] Master [ 0xc9acf1b919e17e9347b50837c75e17c4ce3fb150 ] Beneficiary [ not set, defaults to endorsor ] Instance dir [ /root/.org.vechain.thor/instance-7f466536b20bb127-v2 ]

Syncing log db << 278390 / 278390 100.00% 0s API portal [ http://[::]:8669/ ] Node ID [ enode://d467eb2bcb6fa53c8cabe1cdc09e03aac84859e8495a014f6347951f171231e7343169d92e654217741b194418d582f96f7b86904d3b627ffd09d28b828861bf@[extip]:11235 ] t=2020-12-08T12:18:03+0000 lvl=info msg="starting P2P networking" t=2020-12-08T12:18:05+0000 lvl=info msg="waiting for synchronization..." pkg=node t=2020-12-08T12:18:05+0000 lvl=info msg="pruner started" pkg=pruner range="[208397, 275898]" step=archiveIndexTrie t=2020-12-08T12:18:05+0000 lvl=info msg="archiving index trie..." pkg=pruner t=2020-12-08T12:18:05+0000 lvl=warn msg="pruner interrupted" pkg=pruner error="leveldb/table: corruption on data-block (pos=36250155): checksum mismatch, want=0xc865f2d7 got=0x6cdb330 [file=000055.ldb]" t=2020-12-08T12:18:07+0000 lvl=eror msg="failed to commit block" pkg=node err="add block: leveldb/table: corruption on data-block (pos=36250155): checksum mismatch, want=0xc865f2d7 got=0x6cdb330 [file=000055.ldb]" t=2020-12-08T12:18:10+0000 lvl=eror msg="failed to commit block" pkg=node err="add block: leveldb/table: corruption on data-block (pos=36250155): checksum mismatch, want=0xc865f2d7 got=0x6cdb330 [file=000055.ldb]" t=2020-12-08T12:18:12+0000 lvl=eror msg="failed to commit block" pkg=node err="add block: leveldb/table: corruption on data-block (pos=36250155): checksum mismatch, want=0xc865f2d7 got=0x6cdb330 [file=000055.ldb]"

it seems that failed to add into leveldb and check fail,i retry several times,but every time has same error in different block. is it my network synchronization problem?

JaegerFong avatar Dec 08 '20 12:12 JaegerFong

looks like your local DB is corrupted, remove the dir /root/.org.vechain.thor/instance-7f466536b20bb127-v2 and try again

libotony avatar Dec 09 '20 02:12 libotony

looks like your local DB is corrupted, remove the dir /root/.org.vechain.thor/instance-7f466536b20bb127-v2 and try again

yes,i‘v been remove it serveral time and try agin,but it doesn't work. any other ideas?

JaegerFong avatar Dec 09 '20 02:12 JaegerFong

does it give the same error of every retry?

libotony avatar Dec 09 '20 02:12 libotony

does it give the same error of every retry?

yes

JaegerFong avatar Dec 09 '20 03:12 JaegerFong

please confirm that after you remove the data dir it syncs from block 0, every time you start the node it will print the best block info.

libotony avatar Dec 09 '20 03:12 libotony

please confirm that after you remove the data dir it syncs from block 0, every time you start the node it will print the best block info.

i retry agin,but now is shows :fatal error: unexpected signal during runtime execution

Starting Thor/v1.3.7-51b579c-release/linux/go1.13.15 Network [ 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 testnet ] Best block [ 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 #0 @2018-06-26 12:00:00 +0000 UTC ] Forks [ VIP191: #2898800, ETH_CONST: #3192500 ] Master [ 0xf3138f252b93cf689cd1e4f99bd87fce7bf367a8 ] Beneficiary [ not set, defaults to endorsor ] Instance dir [ /root/.org.vechain.thor/instance-7f466536b20bb127-v2 ] API portal [ http://[::]:8669/ ] Node ID [ enode://43102bfa3fe7ae58c28c0cb3f40fb55730831b38e4f75481d6902c5b50fb6f4c58a5902a05e532e3d11b5dbe0b0973ec4df006bb4ff34184571314dd1d313a23@[extip]:11235 ] t=2020-12-09T03:23:02+0000 lvl=info msg="starting P2P networking" t=2020-12-09T03:23:04+0000 lvl=info msg="pruner started" pkg=pruner t=2020-12-09T03:23:04+0000 lvl=info msg="waiting for synchronization..." pkg=node t=2020-12-09T03:23:20+0000 lvl=info msg="imported blocks (1)" pkg=node txs=0 mgas=0.000 et=145.647µs|999.001µs mgas/s=0.000 id=[#1…1f561c38] t=2020-12-09T03:23:30+0000 lvl=info msg="imported blocks (1023)" pkg=node txs=0 mgas=0.000 et=18.730ms|543.882ms mgas/s=0.000 id=[#1024…d7c8efca] t=2020-12-09T03:23:34+0000 lvl=info msg="imported blocks (4169)" pkg=node txs=0 mgas=0.000 et=69.369ms|1.663s mgas/s=0.000 id=[#5193…2ee1f8ce] t=2020-12-09T03:23:36+0000 lvl=info msg="imported blocks (4116)" pkg=node txs=0 mgas=0.000 et=64.869ms|1.819s mgas/s=0.000 id=[#9309…02382450] t=2020-12-09T03:23:38+0000 lvl=info msg="imported blocks (4244)" pkg=node txs=0 mgas=0.000 et=75.093ms|1.798s mgas/s=0.000 id=[#13553…aa9d811b] t=2020-12-09T03:23:40+0000 lvl=info msg="imported blocks (4310)" pkg=node txs=40 mgas=6.569 et=102.643ms|1.763s mgas/s=3.520 id=[#17863…28c3a302] t=2020-12-09T03:23:42+0000 lvl=info msg="imported blocks (4037)" pkg=node txs=0 mgas=0.000 et=65.673ms|1.810s mgas/s=0.000 id=[#21900…603cb25f] t=2020-12-09T03:23:44+0000 lvl=info msg="imported blocks (4205)" pkg=node txs=128 mgas=5.430 et=85.336ms|1.852s mgas/s=2.803 id=[#26105…9824403d] t=2020-12-09T03:23:46+0000 lvl=info msg="imported blocks (3755)" pkg=node txs=101 mgas=3.481 et=82.461ms|1.775s mgas/s=1.873 id=[#29860…e53f29d2] t=2020-12-09T03:23:53+0000 lvl=info msg="imported blocks (861)" pkg=node txs=2 mgas=0.045 et=15.165ms|301.082ms mgas/s=0.143 id=[#30721…7a5c7033] t=2020-12-09T03:23:55+0000 lvl=info msg="imported blocks (3919)" pkg=node txs=52 mgas=2.647 et=70.545ms|1.850s mgas/s=1.378 id=[#34640…99cb039f] t=2020-12-09T03:23:57+0000 lvl=info msg="imported blocks (3884)" pkg=node txs=31 mgas=4.285 et=73.425ms|1.838s mgas/s=2.241 id=[#38524…138adced] t=2020-12-09T03:23:59+0000 lvl=info msg="imported blocks (3928)" pkg=node txs=125 mgas=3.693 et=84.771ms|1.770s mgas/s=1.990 id=[#42452…ae2b5b8b] t=2020-12-09T03:24:01+0000 lvl=info msg="imported blocks (3561)" pkg=node txs=53 mgas=4.164 et=90.268ms|1.776s mgas/s=2.231 id=[#46013…7c2e131a] t=2020-12-09T03:24:02+0000 lvl=info msg="imported blocks (2115)" pkg=node txs=4 mgas=0.084 et=31.833ms|858.871ms mgas/s=0.094 id=[#48128…37b02d82] t=2020-12-09T03:24:06+0000 lvl=info msg="imported blocks (3272)" pkg=node txs=156 mgas=24.806 et=87.439ms|1.599s mgas/s=14.705 id=[#51400…dada2abc] t=2020-12-09T03:24:08+0000 lvl=info msg="imported blocks (1477)" pkg=node txs=15 mgas=0.470 et=32.124ms|1.968s mgas/s=0.235 id=[#52877…5e85efc1] t=2020-12-09T03:24:10+0000 lvl=info msg="imported blocks (2973)" pkg=node txs=5 mgas=0.250 et=59.503ms|1.924s mgas/s=0.126 id=[#55850…e02ce8a0] t=2020-12-09T03:24:12+0000 lvl=info msg="imported blocks (3476)" pkg=node txs=132 mgas=5.955 et=100.354ms|1.794s mgas/s=3.143 id=[#59326…700c0b5b] fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0x4000010 pc=0x421fa0]

goroutine 104049 [running]: runtime.throw(0xe57896, 0x2a) /usr/local/go/src/runtime/panic.go:774 +0x72 fp=0xc08ac19950 sp=0xc08ac19920 pc=0x44ad42 runtime.sigpanic() /usr/local/go/src/runtime/signal_unix.go:378 +0x47c fp=0xc08ac19980 sp=0xc08ac19950 pc=0x46066c runtime.(*waitq).dequeue(0xc08ea3c0a8, 0x0) /usr/local/go/src/runtime/chan.go:722 +0x30 fp=0xc08ac19990 sp=0xc08ac19980 pc=0x421fa0 runtime.closechan(0xc08ea3c070) /usr/local/go/src/runtime/chan.go:357 +0x87 fp=0xc08ac199d0 sp=0xc08ac19990 pc=0x4211f7 github.com/vechain/thor/co.(*Signal).Broadcast(0xc000442dd8) /go/thor/co/signal.go:50 +0x5a fp=0xc08ac19a00 sp=0xc08ac199d0 pc=0x96ac8a github.com/vechain/thor/chain.(*Repository).SetBestBlockID.func1(0xc08ac19ad0, 0xc000442d90) /go/thor/chain/repository.go:126 +0x46 fp=0xc08ac19a18 sp=0xc08ac19a00 pc=0x9705b6 github.com/vechain/thor/chain.(*Repository).SetBestBlockID(0xc000442d90, 0x4cc81bfa0cf10000, 0x5eb4d22afb735ef1, 0x33efc012c23be6ad, 0x53e785bcbe34305d, 0x0, 0x0) /go/thor/chain/repository.go:133 +0x114 fp=0xc08ac19aa8 sp=0xc08ac19a18 pc=0x96e5e4 github.com/vechain/thor/cmd/thor/node.(*Node).commitBlock(0xc00026e510, 0xc0a3890c90, 0xc08dd82de0, 0x16b68a8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /go/thor/cmd/thor/node/node.go:334 +0x361 fp=0xc08ac19c00 sp=0xc08ac19aa8 pc=0xb15631 github.com/vechain/thor/cmd/thor/node.(*Node).processBlock(0xc00026e510, 0xc08dd82de0, 0xc08ac19db8, 0x1, 0x0, 0x0) /go/thor/cmd/thor/node/node.go:273 +0x514 fp=0xc08ac19d80 sp=0xc08ac19c00 pc=0xb14ec4 github.com/vechain/thor/cmd/thor/node.(*Node).handleBlockStream(0xc00026e510, 0xfbca20, 0xc093735c40, 0xc08e9887e0, 0x0, 0x0) /go/thor/cmd/thor/node/node.go:110 +0x25c fp=0xc08ac19e98 sp=0xc08ac19d80 pc=0xb1316c github.com/vechain/thor/cmd/thor/node.(*Node).handleBlockStream-fm(0xfbca20, 0xc093735c40, 0xc08e9887e0, 0xc0913a6f80, 0x4780d0) /go/thor/cmd/thor/node/node.go:96 +0x48 fp=0xc08ac19ed8 sp=0xc08ac19e98 pc=0xb19af8 github.com/vechain/thor/comm.(*Communicator).download.func1() /go/thor/comm/sync.go:38 +0xac fp=0xc08ac19f80 sp=0xc08ac19ed8 pc=0xaeb37c github.com/vechain/thor/co.(*Goes).Go.func1(0xc08b3c9e00, 0xc093735c80) /go/thor/co/goes.go:22 +0x59 fp=0xc08ac19fd0 sp=0xc08ac19f80 pc=0x96af99 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc08ac19fd8 sp=0xc08ac19fd0 pc=0x47aca1 created by github.com/vechain/thor/co.(*Goes).Go /go/thor/co/goes.go:20 +0x62

JaegerFong avatar Dec 09 '20 03:12 JaegerFong

what's the hardware? how much memory allocated for the container?

libotony avatar Dec 09 '20 03:12 libotony

what's the hardware? how much memory allocated for the container?

cpu: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz Architecture: x86_64 memory:16g

i didn’t limit anythings,and i use docker stat ,i shows 16g used

my command is : sudo docker run -d
-v /thor_test/.org.vechain.thor:/root/.org.vechain.thor
-p 127.0.0.1:8669:8669 -p 11235:11235 -p 11235:11235/udp
--name thor-test-node vechain/thor --network test --api-addr 0.0.0.0:8669

JaegerFong avatar Dec 09 '20 04:12 JaegerFong

I doubt it might be an issue of docker engine(not so sure), I can confirm that it works fine, can you try to build from source and run it?

libotony avatar Dec 09 '20 06:12 libotony

I doubt it might be an issue of docker engine(not so sure), I can confirm that it works fine, can you try to build from source and run it?

i try to build from source and run it ,but it always fail.

WARN[12-10|19:46:15] low fd limit, increase it if possible limit=1024 Starting Thor/v1.3.7--dev/linux/go1.15.5 Network [ 0x00000000851caf3cfdb6e899cf5958bfb1ac3413d346d43539627e6be7ec1b4a mainnet ] Best block [ 0x00107ce98b4092741c57d2c68bf13c3c21c99f0113ebd7b0fa66237dfc1cf6b1 #1080553 @2018-11-02 13:25:00 +0800 CST ] Forks [ VIP191: #3337300, ETH_CONST: #3337300, BLOCKLIST: #4817300 ] Master [ 0xcb563bdf96cd0fa25f787f9c262adc113cbb392f ] Beneficiary [ not set, defaults to endorsor ] Instance dir [ /home/fangyangcheng/thor_main/.org.vechain.thor/instance-39627e6be7ec1b4a-v2-full ] API portal [ http://[::]:8669/ ] Node ID [ enode://f8fd6544163eafdbf90438ce9351c5b3ef2281b440c058b6a99d53514b3da87da2309b0178f38f834c2d32cb5b638e104bf1631a15cabd0b920f39d72458e97c@[extip]:11235 ] INFO[12-10|19:46:16] starting P2P networking INFO[12-10|19:46:18] waiting for synchronization... pkg=node EROR[12-10|19:46:22] failed to commit block pkg=node err="commit state: state: leveldb/table: corruption on data-block (pos=904504): checksum mismatch, want=0xea92d035 got=0x8ee2aeba [file=004245.ldb]" EROR[12-10|19:46:28] failed to commit block pkg=node err="commit state: state: leveldb/table: corruption on data-block (pos=904504): checksum mismatch, want=0xea92d035 got=0x8ee2aeba [file=004245.ldb]"

JaegerFong avatar Dec 10 '20 12:12 JaegerFong

@CoderFang it looks like your disk is out of space.

qianbin avatar Dec 10 '20 12:12 qianbin

@CoderFang it looks like your disk is out of space.

Thank you for your help, it may be a disk problem, I can change the machine

JaegerFong avatar Dec 18 '20 02:12 JaegerFong