erigon icon indicating copy to clipboard operation
erigon copied to clipboard

BSC Mainnet on windows - Snapsync error: panic: runtime error: invalid memory address or nil pointer dereference

Open stefanosstef opened this issue 4 years ago • 21 comments

System information

32gb ram, 32gb pagefile AMD Ryzen 5 3600 6-Core Processor Graphics card GTX 1660 super

Erigon version: erigon version 2022.99.99-dev-64508a7d

OS & Version: Windows 10 x64

Commit hash : 64508a7d

Expected behaviour

Snapsync using this command: erigon.exe --chain bsc --datadir N:/erigon --prune hrtc --rpc.batch.concurrency 50 --torrent.download.rate=60mb --torrent.upload.rate=2mb --maxpeers 50 --ethash.dagdir N:/erigon/erigon-ethash --private.api.addr=localhost:9090 --http --ws --http.addr 192.168.2.6 --http.port 8545 --http.api=eth,debug,net,trace,web3,erigon

Actual behaviour

Output of the command & error:

INFO[05-22|21:23:16.037] Build info                               git_branch=devel git_tag=v2021.10.03-1110-g64508a7d4 git_commit=64508a7d4e5bdb47edc352bbe62d3682ca2e2d94
INFO[05-22|21:23:16.038] Starting Erigon on BSC mainnet...
INFO[05-22|21:23:16.045] Maximum peer count                       ETH=50 total=50
INFO[05-22|21:23:18.166] Set global gas cap                       cap=50000000
INFO[05-22|21:23:18.176] Opening Database                         label=chaindata path=N:\\erigon\\chaindata
INFO[05-22|21:23:18.217] Initialised chain configuration          config="{ChainID: 56 Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Engine: parlia}" genesis=0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b
INFO[05-22|21:23:20.224] Initialising Ethereum protocol           network=56
INFO[05-22|21:23:20.224] Effective                                prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--syncmode=snap"
INFO[05-22|21:23:20.253] Starting private RPC server              on=localhost:9090
INFO[05-22|21:23:20.253] new subscription to logs established
INFO[05-22|21:23:20.256] rpc filters: subscribing to Erigon events
INFO[05-22|21:23:20.257] new subscription to newHeaders established
INFO[05-22|21:23:20.257] New txs subscriber joined
INFO[05-22|21:23:20.259] HTTP endpoint opened                     url=192.168.2.6:8545 ws=true ws.compression=true grpc=false
INFO[05-22|21:23:20.275] [Snapshots] Fetching torrent files metadata
INFO[05-22|21:23:20.281] Started P2P networking                   version=66 self=enode://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@127.0.0.1:30303 name=erigon/v2022.99.99-dev-64508a7d/windows-amd64/go1.18.1
INFO[05-22|21:23:43.267] [Snapshots] Stat                         blocks=0 alloc=3.3Gb sys=3.7Gb
INFO[05-22|21:23:43.268] [snapshots] Build indices                from=0
INFO[05-22|21:24:05.757] [snapshots] HeadersIdx                   blockNum=5000000 alloc=4.5Gb sys=6.3Gb
INFO[05-22|21:24:23.916] [snapshots] HeadersIdx                   blockNum=9500000 alloc=4.9Gb sys=7.1Gb
INFO[05-22|21:24:45.554] [snapshots] HeadersIdx                   blockNum=15500000 alloc=6.3Gb sys=7.1Gb
EROR[05-22|21:24:45.555] Staged Sync                              panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff7286620a9]

goroutine 41896 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff72a15b458?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc0004de4e0, {0xc17dfc0000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff7295cf6d8, 0xc0005d0300}, 0xc04ec9e180, 0xf42400, {0xc0005f4180, 0x12}, 0xc0004de750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff7295cf6d8, 0xc0005d0300}, {0xc002a32030?, 0xc0004de7e8?}, 0x17374594670?, {0xc0005f4180, 0x12}, 0x7ff72786f065?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xf42400?, 0xfbc520?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be

I tried deleting the latest snapshot files and torrent files, (v1-016000-016500 and v1-016500 -017000) and I am getting this output:

INFO[05-22|21:25:28.634] Build info                               git_branch=devel git_tag=v2021.10.03-1110-g64508a7d4 git_commit=64508a7d4e5bdb47edc352bbe62d3682ca2e2d94
INFO[05-22|21:25:28.635] Starting Erigon on BSC mainnet...
INFO[05-22|21:25:28.638] Maximum peer count                       ETH=50 total=50
INFO[05-22|21:25:30.760] Set global gas cap                       cap=50000000
INFO[05-22|21:25:30.765] Opening Database                         label=chaindata path=N:\\erigon\\chaindata
INFO[05-22|21:25:30.798] Initialised chain configuration          config="{ChainID: 56 Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Engine: parlia}" genesis=0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b
INFO[05-22|21:25:32.074] Initialising Ethereum protocol           network=56
INFO[05-22|21:25:32.075] Effective                                prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--syncmode=snap"
INFO[05-22|21:25:32.097] Starting private RPC server              on=localhost:9090
INFO[05-22|21:25:32.097] new subscription to logs established
INFO[05-22|21:25:32.098] rpc filters: subscribing to Erigon events
INFO[05-22|21:25:32.098] new subscription to newHeaders established
INFO[05-22|21:25:32.098] New txs subscriber joined
INFO[05-22|21:25:32.098] HTTP endpoint opened                     url=192.168.2.6:8545 ws=true ws.compression=true grpc=false
INFO[05-22|21:25:32.108] [Snapshots] Fetching torrent files metadata
INFO[05-22|21:25:32.111] Started P2P networking                   version=66 self=enode://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@127.0.0.1:30303 name=erigon/v2022.99.99-dev-64508a7d/windows-amd64/go1.18.1
INFO[05-22|21:25:52.114] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-22|21:26:12.120] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:26:32.109] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:26:52.110] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:27:12.122] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:27:30.813] [p2p] GoodPeers                          eth66=3
INFO[05-22|21:27:32.111] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:27:52.113] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-22|21:28:14.611] [Snapshots] Stat                         blocks=0 alloc=3.3Gb sys=3.5Gb
INFO[05-22|21:28:14.611] [snapshots] Build indices                from=0
INFO[05-22|21:28:35.981] [snapshots] HeadersIdx                   blockNum=5000000 alloc=5.7Gb sys=6.1Gb
INFO[05-22|21:28:56.964] [snapshots] HeadersIdx                   blockNum=10500000 alloc=4.1Gb sys=7.0Gb
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff7286620a9]

goroutine 99669 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff72a15b458?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc01629a4e0, {0xc0e5626000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff7295cf6d8, 0xc000ea4300}, 0xc014a04080, 0xec82e0, {0xc00056e270, 0x12}, 0xc01629a750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff7295cf6d8, 0xc000ea4300}, {0xc019f1c000?, 0xc01629a7e8?}, 0x7ff72786e7cd?, {0xc00056e270, 0x12}, 0x7ff72786f065?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xec82e0?, 0xf42400?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be

Is this a problem with my system or a bug?

stefanosstef avatar May 22 '22 18:05 stefanosstef

  • show sizes of <datadir>/snapshots/*-headers.seg files aka du -h
  • run ./build/bin/downloader verify --datadir=<datadir>

AskAlexSharov avatar May 23 '22 08:05 AskAlexSharov

  • show sizes of <datadir>/snapshots/*-headers.seg files aka du -h
  • run ./build/bin/downloader verify --datadir=<datadir>

Sizes:

19-May-22  12:43        89,743,703 v1-000000-000500-headers.seg
19-May-22  12:43       140,293,263 v1-000500-001000-headers.seg
19-May-22  12:43       157,997,330 v1-001000-001500-headers.seg
19-May-22  12:43       157,685,219 v1-001500-002000-headers.seg
19-May-22  12:44       146,546,486 v1-002000-002500-headers.seg
19-May-22  12:43       157,329,334 v1-002500-003000-headers.seg
19-May-22  12:43       165,793,232 v1-003000-003500-headers.seg
19-May-22  12:44       183,273,745 v1-003500-004000-headers.seg
19-May-22  12:44       187,996,286 v1-004000-004500-headers.seg
19-May-22  12:43       232,648,207 v1-004500-005000-headers.seg
19-May-22  12:44       240,966,364 v1-005000-005500-headers.seg
19-May-22  12:43       240,687,259 v1-005500-006000-headers.seg
19-May-22  12:43       240,927,250 v1-006000-006500-headers.seg
19-May-22  12:44       242,207,481 v1-006500-007000-headers.seg
19-May-22  12:44       241,651,242 v1-007000-007500-headers.seg
19-May-22  12:44       241,790,986 v1-007500-008000-headers.seg
19-May-22  12:44       240,328,364 v1-008000-008500-headers.seg
19-May-22  12:44       241,369,187 v1-008500-009000-headers.seg
19-May-22  12:43       241,642,256 v1-009000-009500-headers.seg
19-May-22  12:44       240,335,795 v1-009500-010000-headers.seg
19-May-22  12:44       240,890,908 v1-010000-010500-headers.seg
19-May-22  12:44       240,756,116 v1-010500-011000-headers.seg
19-May-22  12:43       243,092,761 v1-011000-011500-headers.seg
19-May-22  12:44       242,843,632 v1-011500-012000-headers.seg
19-May-22  12:44       241,158,993 v1-012000-012500-headers.seg
19-May-22  12:43       237,411,905 v1-012500-013000-headers.seg
19-May-22  12:43       237,879,848 v1-013000-013500-headers.seg
19-May-22  12:44       242,243,926 v1-013500-014000-headers.seg
19-May-22  12:44       241,485,747 v1-014000-014500-headers.seg
19-May-22  12:44       242,143,949 v1-014500-015000-headers.seg
19-May-22  12:43       242,177,210 v1-015000-015500-headers.seg
22-May-22  21:25       242,219,883 v1-015500-016000-headers.seg
22-May-22  21:25       241,884,454 v1-016000-016500-headers.seg
23-May-22  01:58       243,828,015 v1-016500-017000-headers.seg

Verification showed this:

INFO[05-24|02:53:50.033] [Snapshots] Verify                       Progress=89.66%
INFO[05-24|02:53:55.041] [Snapshots] Verify                       Progress=90.02%
INFO[05-24|02:54:00.028] [Snapshots] Verify                       Progress=90.39%
EROR[05-24|02:54:02.724] [Snapshots] Verify hash mismatch         at piece=0 file=n:\\erigon\\snapshots\\v1-015500-016000-bodies.seg.torrent
Error: invalid file
Usage:
   torrent_hashes [flags]

I deleted up to those files and started sync again. Output is this:

INFO[05-24|03:59:43.591] Build info                               git_branch=devel git_tag=v2021.10.03-1110-g64508a7d4 git_commit=64508a7d4e5bdb47edc352bbe62d3682ca2e2d94
INFO[05-24|03:59:43.592] Starting Erigon on BSC mainnet...
INFO[05-24|03:59:43.601] Maximum peer count                       ETH=50 total=50
INFO[05-24|03:59:45.729] Set global gas cap                       cap=50000000
INFO[05-24|03:59:45.744] Opening Database                         label=chaindata path=N:\\erigon\\chaindata
INFO[05-24|03:59:45.784] Initialised chain configuration          config="{ChainID: 56 Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Engine: parlia}" genesis=0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b
INFO[05-24|03:59:47.151] Initialising Ethereum protocol           network=56
INFO[05-24|03:59:47.151] Effective                                prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--syncmode=snap"
INFO[05-24|03:59:47.179] Starting private RPC server              on=localhost:9090
INFO[05-24|03:59:47.179] new subscription to logs established
INFO[05-24|03:59:47.181] rpc filters: subscribing to Erigon events
INFO[05-24|03:59:47.182] new subscription to newHeaders established
INFO[05-24|03:59:47.182] New txs subscriber joined
INFO[05-24|03:59:47.183] HTTP endpoint opened                     url=192.168.2.6:8545 ws=true ws.compression=true grpc=false
INFO[05-24|03:59:47.198] [Snapshots] Fetching torrent files metadata
INFO[05-24|03:59:47.202] Started P2P networking                   version=66 self=enode://[email protected]:30303 name=erigon/v2022.99.99-dev-64508a7d/windows-amd64/go1.18.1
INFO[05-24|04:00:07.199] [Snapshots] Waiting for torrents metadata: 92/102
INFO[05-24|04:00:27.208] [Snapshots] Waiting for torrents metadata: 95/102
INFO[05-24|04:00:47.200] [Snapshots] Waiting for torrents metadata: 97/102
INFO[05-24|04:01:07.200] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:01:27.200] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:01:45.787] [p2p] GoodPeers                          eth66=1
INFO[05-24|04:01:47.210] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:02:07.200] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:02:27.199] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:02:47.200] [Snapshots] Waiting for torrents metadata: 98/102
INFO[05-24|04:03:07.199] [Snapshots] Waiting for torrents metadata: 99/102
INFO[05-24|04:03:27.201] [Snapshots] Waiting for torrents metadata: 99/102
INFO[05-24|04:03:45.784] [p2p] GoodPeers                          eth66=2
INFO[05-24|04:03:47.203] [Snapshots] Waiting for torrents metadata: 99/102
INFO[05-24|04:04:07.203] [Snapshots] Waiting for torrents metadata: 100/102
INFO[05-24|04:04:27.199] [Snapshots] Waiting for torrents metadata: 100/102
INFO[05-24|04:04:47.202] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:05:07.205] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:05:27.200] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:05:45.788] [p2p] GoodPeers                          eth66=3
INFO[05-24|04:05:47.204] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:06:07.205] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:06:27.207] [Snapshots] Waiting for torrents metadata: 101/102
INFO[05-24|04:06:49.891] [Snapshots] Stat                         blocks=0 alloc=3.3Gb sys=3.5Gb
INFO[05-24|04:06:49.891] [snapshots] Build indices                from=0
INFO[05-24|04:07:12.943] [snapshots] HeadersIdx                   blockNum=5000000 alloc=4.4Gb sys=5.7Gb
INFO[05-24|04:07:31.264] [snapshots] HeadersIdx                   blockNum=9500000 alloc=5.2Gb sys=6.3Gb
INFO[05-24|04:07:45.784] [p2p] GoodPeers                          eth66=3
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff6cd5120a9]

goroutine 190213 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff6cf00b458?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc16d0884e0, {0xc16d092000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff6ce47f6d8, 0xc00035aa40}, 0xc150b94c80, 0xe4e1c0, {0xc00019c270, 0x12}, 0xc16d088750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff6ce47f6d8, 0xc00035aa40}, {0xc016744030?, 0x2533d0?}, 0x2533d8?, {0xc00019c270, 0x12}, 0x2533e0?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xe4e1c0?, 0xec82e0?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be

stefanosstef avatar May 24 '22 01:05 stefanosstef

weird. show:

git status
make all
go run -trimpath ./cmd/downloader torrent_hashes --verify --datadir=<datadir>
go run -trimpath ./cmd/downloader torrent_hashes --datadir=<datadir>
go run -trimpath ./cmd/downloader torrent_hashes --rebuild --datadir=<datadir>
rm -f <datadir>/snapshots/*.torrent

AskAlexSharov avatar May 24 '22 03:05 AskAlexSharov

Added more context info to such errors by: https://github.com/ledgerwatch/erigon/pull/4245

AskAlexSharov avatar May 24 '22 04:05 AskAlexSharov

Git status:

PS N:\erigon-repo> git status
On branch devel
Your branch is up to date with 'origin/devel'.

nothing to commit, working tree clean

Make all:

PS N:\erigon-repo> .\wmake.ps1 all

 ------------------------------------------------------------------------------
  Erigon's wmake.ps1 : Selected target(s) cons devnettest downloader erigon evm hack integration observer pics rpcdaemon rpctest sentry state txpool
 ------------------------------------------------------------------------------

 Found Git version 2.36.0

 Erigon Branch : devel
 Erigon Tag    : v2021.10.03-1110-g64508a7d4
 Erigon Commit : 64508a7d4e5bdb47edc352bbe62d3682ca2e2d94

 Updating git submodules ...
Submodule path 'cmd/downloader/trackers/trackerslist': checked out '17f277f376286f5a99db386421897d5f82031f57'
Submodule path 'libmdbx': checked out 'a6b506be45dbfe1bb3ab88ce8ac6e351adbe9f40'
Submodule path 'tests/testdata': checked out '005931a700d4e4c4fd9e0d158771484403e7cb19'
Submodule path 'tests/testdata/LegacyTests': checked out 'd7abc42a7b352a7b44b1f66b58aca54e4af6a9d7'
Submodule path 'turbo/snapshotsync/snapshothashes/erigon-snapshots': checked out '9372e92cb4abe894c1123af8af3bb4d00e73c0b4'

 Building cons

 Built cons. Run N:\erigon-repo\build\bin\cons.exe to launch

 Building devnettest

 Built devnettest. Run N:\erigon-repo\build\bin\devnettest.exe to launch

 Building downloader

 Built downloader. Run N:\erigon-repo\build\bin\downloader.exe to launch

 Building erigon

 Built erigon. Run N:\erigon-repo\build\bin\erigon.exe to launch

 Building evm

 Built evm. Run N:\erigon-repo\build\bin\evm.exe to launch

 Building hack
go: downloading github.com/wcharczuk/go-chart/v2 v2.1.0
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading golang.org/x/image v0.0.0-20200927104501-e162460cd6b5

 Built hack. Run N:\erigon-repo\build\bin\hack.exe to launch

 Building integration

 Built integration. Run N:\erigon-repo\build\bin\integration.exe to launch

 Building observer
go: downloading modernc.org/sqlite v1.17.0
go: downloading modernc.org/libc v1.15.0
go: downloading modernc.org/memory v1.0.7
go: downloading modernc.org/mathutil v1.4.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0

 Built observer. Run N:\erigon-repo\build\bin\observer.exe to launch

 Building pics

 Built pics. Run N:\erigon-repo\build\bin\pics.exe to launch

 Building rpcdaemon

 Built rpcdaemon. Run N:\erigon-repo\build\bin\rpcdaemon.exe to launch

 Building rpctest

 Built rpctest. Run N:\erigon-repo\build\bin\rpctest.exe to launch

 Building sentry

 Built sentry. Run N:\erigon-repo\build\bin\sentry.exe to launch

 Building state

 Built state. Run N:\erigon-repo\build\bin\state.exe to launch

 Building txpool

 Built txpool. Run N:\erigon-repo\build\bin\txpool.exe to launch

Verification: PS N:\erigon-repo> go run -trimpath ./cmd/downloader torrent_hashes --verify --datadir=n:\erigon

Output:

INFO[05-24|09:26:11.692] [Snapshots] Verify                       Progress=86.37%
INFO[05-24|09:26:16.688] [Snapshots] Verify                       Progress=86.71%
INFO[05-24|09:26:21.687] [Snapshots] Verify                       Progress=87.00%
EROR[05-24|09:26:24.295] [Snapshots] Verify hash mismatch         at piece=0 file=n:\\erigon\\snapshots\\v1-015000-015500-bodies.seg.torrent
Error: invalid file
Usage:
   torrent_hashes [flags]

Examples:
[...](omitted)

invalid file
exit status 1
PS N:\erigon-repo>

go run -trimpath ./cmd/downloader torrent_hashes --datadir=

Output:

PS N:\erigon-repo> go run -trimpath ./cmd/downloader torrent_hashes --datadir=n:\erigon
'v1-000000-000500-bodies.seg' = '44f9d695c21fdff5c6d143712b341a9fc00fbb9a'
'v1-000000-000500-headers.seg' = 'e0900d8feacd87383a54e11ef731250ad5d314cc'
'v1-000000-000500-transactions.seg' = '300e308db1ac62976b9691d073327bf5ea5f1b0a'
'v1-000500-001000-bodies.seg' = 'fb56112bb9ef658d108d739b63c9cbeb668f07ae'
'v1-000500-001000-headers.seg' = '85e88eae0fb97fc4ecc7aa7aa93715d10464648f'
'v1-000500-001000-transactions.seg' = '98e4d5723c7128e59e0870ae587023bbf7fbccb9'
'v1-001000-001500-bodies.seg' = 'f05052d0f55f8b9e60779f27057e7cabab6f44fd'
'v1-001000-001500-headers.seg' = '71e3791e43b3f11d0a50bae4797c731f6fa16527'
'v1-001000-001500-transactions.seg' = 'f34da5809500a444ddc253979e54513e4e9c5aef'
'v1-001500-002000-bodies.seg' = '1d1fdcfde5a0ca16b1c07b67406058d3bfc850fd'
'v1-001500-002000-headers.seg' = '21a1388d1c5c7999b17f31cacf247d5305548c01'
'v1-001500-002000-transactions.seg' = '37ebca1667828ea9f086fa21213bfee9afbc6766'
'v1-002000-002500-bodies.seg' = '96759bc735d1ce2e2fbfa64fc205cafa19b0c4cf'
'v1-002000-002500-headers.seg' = '97bca4862b836a993eb8f33a506710e47f8c611e'
'v1-002000-002500-transactions.seg' = '2765ea75d3bc63ad6bf84e99765289318a48cbb8'
'v1-002500-003000-bodies.seg' = '445d437194c179b88b3b880500a1ac327e5715f0'
'v1-002500-003000-headers.seg' = '144c27650194bf83785a29818396cb1e30a9b6ec'
'v1-002500-003000-transactions.seg' = '7bc1417134856c4f8186398c7d8eb250243e5fc7'
'v1-003000-003500-bodies.seg' = '2b7aa142cbffaa1b00be9da266f504443b3e7cc9'
'v1-003000-003500-headers.seg' = 'd8d3525d65bbe971a5ca76a1d49b03c91ab0525f'
'v1-003000-003500-transactions.seg' = 'e633bec3882ccee54c0c337f0bc6a8bd831ed9ff'
'v1-003500-004000-bodies.seg' = '164c7cf991a57e4fb26a57ed694ba2196be514aa'
'v1-003500-004000-headers.seg' = '914e6d4407b941e228af33bf6249062bb768f1d5'
'v1-003500-004000-transactions.seg' = 'e117a4fca3ee11911ccd584de51f95bd8fc937ab'
'v1-004000-004500-bodies.seg' = 'ed285ea99efe22b5b92ec7ab853deaabbd6f5fc2'
'v1-004000-004500-headers.seg' = '62c85dcee47752ae162bab55b45e2af25ed8c0fc'
'v1-004000-004500-transactions.seg' = 'da340312f216908c80040328dae57eb2029034e6'
'v1-004500-005000-bodies.seg' = 'ec4a06462e74e84922fa7a7b23fe75ac2c8422e8'
'v1-004500-005000-headers.seg' = '3e8a0d82421b81784b7a48c46eefd97b6f77bd3b'
'v1-004500-005000-transactions.seg' = '9423db0d12c5071e12437b570a58908a6a4f4a3c'
'v1-005000-005500-bodies.seg' = '07c4b4b0f474958a41d4abadcba7b1adec2655eb'
'v1-005000-005500-headers.seg' = '1f3a9c39565932646130e8670286171b9cef564e'
'v1-005000-005500-transactions.seg' = 'd2f92014b2096db2131aa8ece91379f7d98dcd76'
'v1-005500-006000-bodies.seg' = 'f9bc80a9e3ddf2e4d03ac106e64f2f30d108cbde'
'v1-005500-006000-headers.seg' = '77ec4d02cb8d002625fd97de642cdaa45fd091d2'
'v1-005500-006000-transactions.seg' = 'dc03c6dbad22c49ca2b653fe2fa2fb9c7b561cd6'
'v1-006000-006500-bodies.seg' = '1e3a4f492e8e2003fadb10ede0bb2cbc6a433171'
'v1-006000-006500-headers.seg' = '5afe43d76d50f899b43a42f43e521915b85a007f'
'v1-006000-006500-transactions.seg' = 'a7b949b58fd7df20b17b3960853b1e528ad85050'
'v1-006500-007000-bodies.seg' = '44d8f9078337911cf792fd25468b582a01446b06'
'v1-006500-007000-headers.seg' = '05b8aeff846478ab0b5ca5b393efcf3170bba086'
'v1-006500-007000-transactions.seg' = '0588bad214f719dc1efe1e537472957131bec047'
'v1-007000-007500-bodies.seg' = 'a4db1bf983bd9e2a4281873bf38a9725d57f4680'
'v1-007000-007500-headers.seg' = 'f93e5b71e27a8b09d6fe0e32937eac243e8a865d'
'v1-007000-007500-transactions.seg' = '55edc4308dcf4652bf3be36cec1d84eac6f301ed'
'v1-007500-008000-bodies.seg' = '9a850776449d6aa13a48bd6aa23d3d2b5d3079a2'
'v1-007500-008000-headers.seg' = '63080d189802258d33a3473fb86776b38a377d78'
'v1-007500-008000-transactions.seg' = '0f2de7351e93387d287530c4b93942e2253e3e8e'
'v1-008000-008500-bodies.seg' = '3623b7fbb270a4c7a13fd1c8ee26fd9b4dd623e2'
'v1-008000-008500-headers.seg' = '2f9e06a7396b0be11810d64bad9f71917e66c8a9'
'v1-008000-008500-transactions.seg' = 'acf0cf21e2989db1e246aeb6a14db2e4ec4a0ff3'
'v1-008500-009000-bodies.seg' = '7281a42fcd8d4dc13e7d5aafa213668083489030'
'v1-008500-009000-headers.seg' = '6793e04bed63a55bc4fd451a8766a5eccd7d5267'
'v1-008500-009000-transactions.seg' = 'c7dc8fa1359d2ba99d484296929333056bdee115'
'v1-009000-009500-bodies.seg' = '3b796a625a2768788c3c05adaa45ca09d194a52b'
'v1-009000-009500-headers.seg' = '79c9fcc66bd955be4c555fe5efc6112261212941'
'v1-009000-009500-transactions.seg' = 'cd19598d7507b205039e0c4a658014a0c6fb37cb'
'v1-009500-010000-bodies.seg' = '91393b5e90092a86edef13fd4aac085b478dbcb9'
'v1-009500-010000-headers.seg' = '5782d8ed95e78d7f52663d41cb9b324d3c69e233'
'v1-009500-010000-transactions.seg' = '7cd42a5ebaf2c5a2827886b13988b547e508551e'
'v1-010000-010500-bodies.seg' = '9cacc9848b77ce5da3031f6cecdd5d9cdc87fb1d'
'v1-010000-010500-headers.seg' = 'aab4c271cf0d1332d6363183dd06eb4fd3f7905e'
'v1-010000-010500-transactions.seg' = 'b0d0af0da6d13687c7f12c01d9ea081b1bf326cb'
'v1-010500-011000-bodies.seg' = 'abc33edd9b31a8e12e80f274e7cada4afd37376d'
'v1-010500-011000-headers.seg' = 'c1cc651b9ad707b120ae4e63fdabd918e82b10ab'
'v1-010500-011000-transactions.seg' = '2e7865a190059448f59e3222a3323f8ce92c8823'
'v1-011000-011500-bodies.seg' = '42283495e06108ff23d1e48decc119fa0b420c4e'
'v1-011000-011500-headers.seg' = '5176ff9401ad093216142c2930d0395b103b9565'
'v1-011000-011500-transactions.seg' = '492b78d21233263908da0553e83adbe9ff2e1472'
'v1-011500-012000-bodies.seg' = '45c0371de9d624599574a8495c70549c90fa4304'
'v1-011500-012000-headers.seg' = '99ae5bb8b57f7d29d0c78c0805dddc5538897e7e'
'v1-011500-012000-transactions.seg' = 'e63297690a2eceb8a6449a6dffb6172b099350f2'
'v1-012000-012500-bodies.seg' = '38d8c84b66c25f553f9785b36ab36961d72f0dbe'
'v1-012000-012500-headers.seg' = 'a04f936d1fc3c6973238ae3d477313e310a734ec'
'v1-012000-012500-transactions.seg' = '265d6a62bae187d7cb9c6c47ea651296c1b55051'
'v1-012500-013000-bodies.seg' = '36be97289a84829b4a06519be5184e266ce39a6f'
'v1-012500-013000-headers.seg' = '36562d7cee86c5c5e97d4debd480c66ff7c364f3'
'v1-012500-013000-transactions.seg' = 'fb6ee7ef88efbffb0bbc73052b8b1408a1ec8eb5'
'v1-013000-013500-bodies.seg' = '19b8fa44cc02b2b13a63a194506ab808fc16713b'
'v1-013000-013500-headers.seg' = 'fe4109a7ba33012154a2101d75ce0ad8d82aefec'
'v1-013000-013500-transactions.seg' = '41ba787d4f84ca8240d6ce0839ce9891496fc380'
'v1-013500-014000-bodies.seg' = '0971b42e10968b04d222c96308fdd7b949520754'
'v1-013500-014000-headers.seg' = 'fd72ef03f3e65b664a58356a1b8717c0804bfde4'
'v1-013500-014000-transactions.seg' = '7b24d7dd20b54ccd8ff92a02dd23f129c2990366'
'v1-014000-014500-bodies.seg' = '1edd9a777d66c470396d1bfa0b94365ab7b05278'
'v1-014000-014500-headers.seg' = '1f377f08b101dce055047968189b508f5101a58a'
'v1-014000-014500-transactions.seg' = '05ed7210809062e00c1cc96d8f8915d6fd88380b'
'v1-014500-015000-bodies.seg' = 'a23242f53dce0f37c04df1860a064cebfe175c77'
'v1-014500-015000-headers.seg' = '0c9e186a225317157394626cff215c678a8344da'
'v1-014500-015000-transactions.seg' = '62b065d738deaa3facbd911a2638557bea0ead3f'
'v1-015000-015500-bodies.seg' = 'faf20f9c0c1f2ce97467728d6f46f2ceae3ff964'
'v1-015000-015500-headers.seg' = 'bac2201f748dabd8163667e876eaab949f78dddc'
'v1-015000-015500-transactions.seg' = '603ae10dd64d185205434c4e4dd12acda2e40913'
'v1-015500-016000-bodies.seg' = '5cfa342762718e6d892b6232e5e2124bca5c8279'
'v1-015500-016000-headers.seg' = '49fb22bca7750c36e804893e6a105fdf1a51420d'
'v1-015500-016000-transactions.seg' = '4b2f4f400309b6f6495aa6c2b633c109c2fa9820'
'v1-016000-016500-bodies.seg' = 'fdcea7fa768e4d45f20b12bce6f7f522c0282f42'
'v1-016000-016500-headers.seg' = '70a3cb550a78e06797c822b2db54efc61cdfb967'
'v1-016000-016500-transactions.seg' = '2dd7f6f46f1d4758591f776c504cb257db733c2b'
'v1-016500-017000-bodies.seg' = '14dfd8e4d699f95cce69549bc40e779502aa7d83'
'v1-016500-017000-headers.seg' = '061df103a6f80bcdf3469eba20749abca2b36b2d'
'v1-016500-017000-transactions.seg' = '9c3e2cd5545924883189bc5b762d64d6ab83ab77'

Rebuild:

PS N:\erigon-repo> go run -trimpath ./cmd/downloader torrent_hashes --rebuild --datadir=n:\erigon
INFO[05-24|09:32:12.070] [Snapshots] Creating .torrent files      Progress=26/102
INFO[05-24|09:32:44.374] [Snapshots] Creating .torrent files      Progress=29/102
INFO[05-24|09:32:52.543] [Snapshots] Creating .torrent files      Progress=92/102
INFO[05-24|09:33:25.226] [Snapshots] Creating .torrent files      Progress=32/102
INFO[05-24|09:33:36.814] [Snapshots] Creating .torrent files      Progress=35/102
INFO[05-24|09:34:16.593] [Snapshots] Creating .torrent files      Progress=53/102
INFO[05-24|09:34:38.489] [Snapshots] Creating .torrent files      Progress=50/102
INFO[05-24|09:34:57.348] [Snapshots] Creating .torrent files      Progress=68/102
INFO[05-24|09:35:13.448] [Snapshots] Creating .torrent files      Progress=86/102
INFO[05-24|09:35:40.731] [Snapshots] Creating .torrent files      Progress=59/102
INFO[05-24|09:35:52.427] [Snapshots] Creating .torrent files      Progress=41/102
'v1-000000-000500-bodies.seg' = '44f9d695c21fdff5c6d143712b341a9fc00fbb9a'
'v1-000000-000500-headers.seg' = 'e0900d8feacd87383a54e11ef731250ad5d314cc'
'v1-000000-000500-transactions.seg' = '300e308db1ac62976b9691d073327bf5ea5f1b0a'
'v1-000500-001000-bodies.seg' = 'fb56112bb9ef658d108d739b63c9cbeb668f07ae'
'v1-000500-001000-headers.seg' = '85e88eae0fb97fc4ecc7aa7aa93715d10464648f'
'v1-000500-001000-transactions.seg' = '98e4d5723c7128e59e0870ae587023bbf7fbccb9'
'v1-001000-001500-bodies.seg' = 'f05052d0f55f8b9e60779f27057e7cabab6f44fd'
'v1-001000-001500-headers.seg' = '71e3791e43b3f11d0a50bae4797c731f6fa16527'
'v1-001000-001500-transactions.seg' = 'f34da5809500a444ddc253979e54513e4e9c5aef'
'v1-001500-002000-bodies.seg' = '1d1fdcfde5a0ca16b1c07b67406058d3bfc850fd'
'v1-001500-002000-headers.seg' = '21a1388d1c5c7999b17f31cacf247d5305548c01'
'v1-001500-002000-transactions.seg' = '37ebca1667828ea9f086fa21213bfee9afbc6766'
'v1-002000-002500-bodies.seg' = '96759bc735d1ce2e2fbfa64fc205cafa19b0c4cf'
'v1-002000-002500-headers.seg' = '97bca4862b836a993eb8f33a506710e47f8c611e'
'v1-002000-002500-transactions.seg' = '2765ea75d3bc63ad6bf84e99765289318a48cbb8'
'v1-002500-003000-bodies.seg' = '445d437194c179b88b3b880500a1ac327e5715f0'
'v1-002500-003000-headers.seg' = '144c27650194bf83785a29818396cb1e30a9b6ec'
'v1-002500-003000-transactions.seg' = '7bc1417134856c4f8186398c7d8eb250243e5fc7'
'v1-003000-003500-bodies.seg' = '2b7aa142cbffaa1b00be9da266f504443b3e7cc9'
'v1-003000-003500-headers.seg' = 'd8d3525d65bbe971a5ca76a1d49b03c91ab0525f'
'v1-003000-003500-transactions.seg' = 'e633bec3882ccee54c0c337f0bc6a8bd831ed9ff'
'v1-003500-004000-bodies.seg' = '164c7cf991a57e4fb26a57ed694ba2196be514aa'
'v1-003500-004000-headers.seg' = '914e6d4407b941e228af33bf6249062bb768f1d5'
'v1-003500-004000-transactions.seg' = 'e117a4fca3ee11911ccd584de51f95bd8fc937ab'
'v1-004000-004500-bodies.seg' = 'ed285ea99efe22b5b92ec7ab853deaabbd6f5fc2'
'v1-004000-004500-headers.seg' = '62c85dcee47752ae162bab55b45e2af25ed8c0fc'
'v1-004000-004500-transactions.seg' = 'da340312f216908c80040328dae57eb2029034e6'
'v1-004500-005000-bodies.seg' = 'ec4a06462e74e84922fa7a7b23fe75ac2c8422e8'
'v1-004500-005000-headers.seg' = '3e8a0d82421b81784b7a48c46eefd97b6f77bd3b'
'v1-004500-005000-transactions.seg' = '9423db0d12c5071e12437b570a58908a6a4f4a3c'
'v1-005000-005500-bodies.seg' = '07c4b4b0f474958a41d4abadcba7b1adec2655eb'
'v1-005000-005500-headers.seg' = '1f3a9c39565932646130e8670286171b9cef564e'
'v1-005000-005500-transactions.seg' = 'd2f92014b2096db2131aa8ece91379f7d98dcd76'
'v1-005500-006000-bodies.seg' = 'f9bc80a9e3ddf2e4d03ac106e64f2f30d108cbde'
'v1-005500-006000-headers.seg' = '77ec4d02cb8d002625fd97de642cdaa45fd091d2'
'v1-005500-006000-transactions.seg' = 'dc03c6dbad22c49ca2b653fe2fa2fb9c7b561cd6'
'v1-006000-006500-bodies.seg' = '1e3a4f492e8e2003fadb10ede0bb2cbc6a433171'
'v1-006000-006500-headers.seg' = '5afe43d76d50f899b43a42f43e521915b85a007f'
'v1-006000-006500-transactions.seg' = 'a7b949b58fd7df20b17b3960853b1e528ad85050'
'v1-006500-007000-bodies.seg' = '44d8f9078337911cf792fd25468b582a01446b06'
'v1-006500-007000-headers.seg' = '05b8aeff846478ab0b5ca5b393efcf3170bba086'
'v1-006500-007000-transactions.seg' = '0588bad214f719dc1efe1e537472957131bec047'
'v1-007000-007500-bodies.seg' = 'a4db1bf983bd9e2a4281873bf38a9725d57f4680'
'v1-007000-007500-headers.seg' = 'f93e5b71e27a8b09d6fe0e32937eac243e8a865d'
'v1-007000-007500-transactions.seg' = '55edc4308dcf4652bf3be36cec1d84eac6f301ed'
'v1-007500-008000-bodies.seg' = '9a850776449d6aa13a48bd6aa23d3d2b5d3079a2'
'v1-007500-008000-headers.seg' = '63080d189802258d33a3473fb86776b38a377d78'
'v1-007500-008000-transactions.seg' = '0f2de7351e93387d287530c4b93942e2253e3e8e'
'v1-008000-008500-bodies.seg' = '3623b7fbb270a4c7a13fd1c8ee26fd9b4dd623e2'
'v1-008000-008500-headers.seg' = '2f9e06a7396b0be11810d64bad9f71917e66c8a9'
'v1-008000-008500-transactions.seg' = 'acf0cf21e2989db1e246aeb6a14db2e4ec4a0ff3'
'v1-008500-009000-bodies.seg' = '7281a42fcd8d4dc13e7d5aafa213668083489030'
'v1-008500-009000-headers.seg' = '6793e04bed63a55bc4fd451a8766a5eccd7d5267'
'v1-008500-009000-transactions.seg' = 'c7dc8fa1359d2ba99d484296929333056bdee115'
'v1-009000-009500-bodies.seg' = '3b796a625a2768788c3c05adaa45ca09d194a52b'
'v1-009000-009500-headers.seg' = '79c9fcc66bd955be4c555fe5efc6112261212941'
'v1-009000-009500-transactions.seg' = 'cd19598d7507b205039e0c4a658014a0c6fb37cb'
'v1-009500-010000-bodies.seg' = '91393b5e90092a86edef13fd4aac085b478dbcb9'
'v1-009500-010000-headers.seg' = '5782d8ed95e78d7f52663d41cb9b324d3c69e233'
'v1-009500-010000-transactions.seg' = '7cd42a5ebaf2c5a2827886b13988b547e508551e'
'v1-010000-010500-bodies.seg' = '9cacc9848b77ce5da3031f6cecdd5d9cdc87fb1d'
'v1-010000-010500-headers.seg' = 'aab4c271cf0d1332d6363183dd06eb4fd3f7905e'
'v1-010000-010500-transactions.seg' = 'b0d0af0da6d13687c7f12c01d9ea081b1bf326cb'
'v1-010500-011000-bodies.seg' = 'abc33edd9b31a8e12e80f274e7cada4afd37376d'
'v1-010500-011000-headers.seg' = 'c1cc651b9ad707b120ae4e63fdabd918e82b10ab'
'v1-010500-011000-transactions.seg' = '2e7865a190059448f59e3222a3323f8ce92c8823'
'v1-011000-011500-bodies.seg' = '42283495e06108ff23d1e48decc119fa0b420c4e'
'v1-011000-011500-headers.seg' = '5176ff9401ad093216142c2930d0395b103b9565'
'v1-011000-011500-transactions.seg' = '492b78d21233263908da0553e83adbe9ff2e1472'
'v1-011500-012000-bodies.seg' = '45c0371de9d624599574a8495c70549c90fa4304'
'v1-011500-012000-headers.seg' = '99ae5bb8b57f7d29d0c78c0805dddc5538897e7e'
'v1-011500-012000-transactions.seg' = 'e63297690a2eceb8a6449a6dffb6172b099350f2'
'v1-012000-012500-bodies.seg' = '38d8c84b66c25f553f9785b36ab36961d72f0dbe'
'v1-012000-012500-headers.seg' = 'a04f936d1fc3c6973238ae3d477313e310a734ec'
'v1-012000-012500-transactions.seg' = '265d6a62bae187d7cb9c6c47ea651296c1b55051'
'v1-012500-013000-bodies.seg' = '36be97289a84829b4a06519be5184e266ce39a6f'
'v1-012500-013000-headers.seg' = '36562d7cee86c5c5e97d4debd480c66ff7c364f3'
'v1-012500-013000-transactions.seg' = 'fb6ee7ef88efbffb0bbc73052b8b1408a1ec8eb5'
'v1-013000-013500-bodies.seg' = '19b8fa44cc02b2b13a63a194506ab808fc16713b'
'v1-013000-013500-headers.seg' = 'fe4109a7ba33012154a2101d75ce0ad8d82aefec'
'v1-013000-013500-transactions.seg' = '41ba787d4f84ca8240d6ce0839ce9891496fc380'
'v1-013500-014000-bodies.seg' = '0971b42e10968b04d222c96308fdd7b949520754'
'v1-013500-014000-headers.seg' = 'fd72ef03f3e65b664a58356a1b8717c0804bfde4'
'v1-013500-014000-transactions.seg' = '7b24d7dd20b54ccd8ff92a02dd23f129c2990366'
'v1-014000-014500-bodies.seg' = '1edd9a777d66c470396d1bfa0b94365ab7b05278'
'v1-014000-014500-headers.seg' = '1f377f08b101dce055047968189b508f5101a58a'
'v1-014000-014500-transactions.seg' = '05ed7210809062e00c1cc96d8f8915d6fd88380b'
'v1-014500-015000-bodies.seg' = 'a23242f53dce0f37c04df1860a064cebfe175c77'
'v1-014500-015000-headers.seg' = '0c9e186a225317157394626cff215c678a8344da'
'v1-014500-015000-transactions.seg' = '62b065d738deaa3facbd911a2638557bea0ead3f'
'v1-015000-015500-bodies.seg' = 'c616f8189257b3baed45b2cfe22ed66678431b30'
'v1-015000-015500-headers.seg' = '0d7c7160a9fb0f914170aa10e457ca94a87671f3'
'v1-015000-015500-transactions.seg' = 'e91e911c27bd7e60ff8c826a80a619d30d5f1e8f'
'v1-015500-016000-bodies.seg' = '5c83cb001f2f6d511f5805360b09661aaafcfd5b'
'v1-015500-016000-headers.seg' = '405563abe4e29ef8a51afa48575968f70d000e05'
'v1-015500-016000-transactions.seg' = '822c64dab3c849afa8a5f17fdbacec0ba4761207'
'v1-016000-016500-bodies.seg' = '355929dac09fe11d1e963094cf9346c79dbeab95'
'v1-016000-016500-headers.seg' = '15d03c2642155ec167098ed61f33ba44e5993b25'
'v1-016000-016500-transactions.seg' = 'ea0e7d7de6e577fdd8585adb07c81de0eef8649e'
'v1-016500-017000-bodies.seg' = '503899d19be20214c530d2698a52b9722735d429'
'v1-016500-017000-headers.seg' = 'e3dcd2f21218638d453c2baf6304a16b8669a17e'
'v1-016500-017000-transactions.seg' = '7293d23352951a55d3c9da4786cbc5c7b9714626'

And finally I deleted the .torrent files in snapshots folder

Attempting to sync after these gave this output:

N:\erigon-repo\build\bin>erigon.exe --chain bsc --datadir N:/erigon --prune hrtc --rpc.batch.concurrency 50 --torrent.download.rate=60mb --torrent.upload.rate=2mb --maxpeers 50 --ethash.dagdir n:/erigon/erigon-ethash --private.api.addr=localhost:9090 --http --ws --http.addr 192.168.2.6 --http.port 8545 --http.api=eth,debug,net,trace,web3,erigon
INFO[05-24|09:42:33.601] Build info                               git_branch=devel git_tag=v2021.10.03-1110-g64508a7d4 git_commit=64508a7d4e5bdb47edc352bbe62d3682ca2e2d94
INFO[05-24|09:42:33.602] Starting Erigon on BSC mainnet...
INFO[05-24|09:42:33.605] Maximum peer count                       ETH=50 total=50
INFO[05-24|09:42:35.736] Set global gas cap                       cap=50000000
INFO[05-24|09:42:35.746] Opening Database                         label=chaindata path=N:\\erigon\\chaindata
INFO[05-24|09:42:35.789] Initialised chain configuration          config="{ChainID: 56 Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Engine: parlia}" genesis=0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b
INFO[05-24|09:43:01.562] [Snapshots] Verify snapshots             Progress=60/102
INFO[05-24|09:43:22.129] [Snapshots] Verify snapshots             Progress=63/102
INFO[05-24|09:43:56.282] [Snapshots] Verify snapshots             Progress=69/102
INFO[05-24|09:44:23.042] [Snapshots] Verify snapshots             Progress=78/102
INFO[05-24|09:44:35.791] [p2p] GoodPeers                          eth66=0
INFO[05-24|09:44:58.399] [Snapshots] Verify snapshots             Progress=81/102
INFO[05-24|09:45:17.090] [Snapshots] Verify snapshots             Progress=87/102
INFO[05-24|09:45:45.574] [Snapshots] Verify snapshots             Progress=96/102
INFO[05-24|09:46:35.793] [p2p] GoodPeers                          eth66=0
INFO[05-24|09:47:33.520] Initialising Ethereum protocol           network=56
INFO[05-24|09:47:33.523] Effective                                prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--syncmode=snap"
INFO[05-24|09:47:33.614] Starting private RPC server              on=localhost:9090
INFO[05-24|09:47:33.614] new subscription to logs established
INFO[05-24|09:47:33.630] rpc filters: subscribing to Erigon events
INFO[05-24|09:47:33.632] new subscription to newHeaders established
INFO[05-24|09:47:33.630] New txs subscriber joined
INFO[05-24|09:47:33.649] HTTP endpoint opened                     url=192.168.2.6:8545 ws=true ws.compression=true grpc=false
INFO[05-24|09:47:33.669] [Snapshots] Fetching torrent files metadata
INFO[05-24|09:47:33.726] Started P2P networking                   version=66 self=enode://[...]@127.0.0.1:30303 name=erigon/v2022.99.99-dev-64508a7d/windows-amd64/go1.18.1
INFO[05-24|09:47:53.681] [Snapshots] Waiting for torrents metadata: 108/114
INFO[05-24|09:48:13.683] [Snapshots] Waiting for torrents metadata: 112/114
INFO[05-24|09:48:35.794] [p2p] GoodPeers                          eth66=5
INFO[05-24|09:48:41.230] [Snapshots] Stat                         blocks=0 alloc=3.2Gb sys=3.5Gb
INFO[05-24|09:48:41.232] [snapshots] Build indices                from=0
INFO[05-24|09:49:02.304] [snapshots] HeadersIdx                   blockNum=1500000 alloc=3.7Gb sys=4.6Gb
INFO[05-24|09:49:26.020] [snapshots] HeadersIdx                   blockNum=5500000 alloc=3.8Gb sys=6.7Gb
INFO[05-24|09:49:42.912] [snapshots] HeadersIdx                   blockNum=10000000 alloc=4.0Gb sys=6.7Gb
INFO[05-24|09:50:03.061] [snapshots] HeadersIdx                   blockNum=14500000 alloc=4.4Gb sys=6.8Gb
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff71c6d20a9]

goroutine 234569 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff71e1cb458?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc14a8be4e0, {0xc10fb0e000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff71d63f6d8, 0xc000f50300}, 0xc12cdb0000, 0xe4e1c0, {0xc000f1e228, 0x12}, 0xc14a8be750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff71d63f6d8, 0xc000f50300}, {0xc019250000?, 0x13a62e1718c0?}, 0x13a62ec6b9c8?, {0xc000f1e228, 0x12}, 0x7ff71b8df065?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xe4e1c0?, 0xec82e0?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff71c6d20a9]

goroutine 234618 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff71e1cb458?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc00c6c84e0, {0xc0eaf38000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff71d63f6d8, 0xc000f50300}, 0xc166852000, 0xec82e0, {0xc000f1e228, 0x12}, 0xc00c6c8750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff71d63f6d8, 0xc000f50300}, {0xc017a1a000?, 0x1339d91c7ae8?}, 0x13904e508b00?, {0xc000f1e228, 0x12}, 0x7ff71b8df065?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xec82e0?, 0xf42400?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be

stefanosstef avatar May 24 '22 06:05 stefanosstef

Thank you for providing each listing. Seems like you have invalid files, below is comparison to ethalon version

Yours hashsums
< 'v1-015000-015500-bodies.seg' = 'c616f8189257b3baed45b2cfe22ed66678431b30'
< 'v1-015000-015500-headers.seg' = '0d7c7160a9fb0f914170aa10e457ca94a87671f3'
< 'v1-015000-015500-transactions.seg' = 'e91e911c27bd7e60ff8c826a80a619d30d5f1e8f'
< 'v1-015500-016000-bodies.seg' = '5c83cb001f2f6d511f5805360b09661aaafcfd5b'
< 'v1-015500-016000-headers.seg' = '405563abe4e29ef8a51afa48575968f70d000e05'
< 'v1-015500-016000-transactions.seg' = '822c64dab3c849afa8a5f17fdbacec0ba4761207'
< 'v1-016000-016500-bodies.seg' = '355929dac09fe11d1e963094cf9346c79dbeab95'
< 'v1-016000-016500-headers.seg' = '15d03c2642155ec167098ed61f33ba44e5993b25'
< 'v1-016000-016500-transactions.seg' = 'ea0e7d7de6e577fdd8585adb07c81de0eef8649e'
< 'v1-016500-017000-bodies.seg' = '503899d19be20214c530d2698a52b9722735d429'
< 'v1-016500-017000-headers.seg' = 'e3dcd2f21218638d453c2baf6304a16b8669a17e'
< 'v1-016500-017000-transactions.seg' = '7293d23352951a55d3c9da4786cbc5c7b9714626'
---
Ours hashsums
> 'v1-015000-015500-bodies.seg' = 'faf20f9c0c1f2ce97467728d6f46f2ceae3ff964'
> 'v1-015000-015500-headers.seg' = 'bac2201f748dabd8163667e876eaab949f78dddc'
> 'v1-015000-015500-transactions.seg' = '603ae10dd64d185205434c4e4dd12acda2e40913'
> 'v1-015500-016000-bodies.seg' = '5cfa342762718e6d892b6232e5e2124bca5c8279'
> 'v1-015500-016000-headers.seg' = '49fb22bca7750c36e804893e6a105fdf1a51420d'
> 'v1-015500-016000-transactions.seg' = '4b2f4f400309b6f6495aa6c2b633c109c2fa9820'
> 'v1-016000-016500-bodies.seg' = 'fdcea7fa768e4d45f20b12bce6f7f522c0282f42'
> 'v1-016000-016500-headers.seg' = '70a3cb550a78e06797c822b2db54efc61cdfb967'
> 'v1-016000-016500-transactions.seg' = '2dd7f6f46f1d4758591f776c504cb257db733c2b'
> 'v1-016500-017000-bodies.seg' = '14dfd8e4d699f95cce69549bc40e779502aa7d83'
> 'v1-016500-017000-headers.seg' = '061df103a6f80bcdf3469eba20749abca2b36b2d'
> 'v1-016500-017000-transactions.seg' = '9c3e2cd5545924883189bc5b762d64d6ab83ab77'
> 'v1-017000-017500-bodies.seg' = 'e35ba56450b20556b73f2bf0e02c8d4b30680ef2'
> 'v1-017000-017500-headers.seg' = 'a64f3e8f796144b866309793540c8b72d3ff6cde'
> 'v1-017000-017500-transactions.seg' = 'f16b1b72d789c8a17636b6c29e0f20ea2e5ecd05'

Please, start downloader with --verify option again and make sure that process will be finished correctly

awskii avatar May 25 '22 17:05 awskii

rm <your_datadir>/snapshots/v1-015*
rm <your_datadir>/snapshots/v1-016*
rm <your_datadir>/snapshots/v1-017*

AskAlexSharov avatar May 26 '22 04:05 AskAlexSharov

@stefanosstef did it help?

AskAlexSharov avatar May 30 '22 02:05 AskAlexSharov

Sorry for the late reply, I didn't have the chance to test it out. Still the same error after deleting:

N:\erigon\snapshots>del v1-015*

N:\erigon\snapshots>del v1-016*

N:\erigon\snapshots>del v1-017*
Could Not Find N:\erigon\snapshots\v1-017*

N:\erigon\snapshots>cd..

N:\erigon>cd..

N:\>cd erigon-repo

N:\erigon-repo>cd build

N:\erigon-repo\build>cd bin
N:\erigon-repo\build\bin>erigon.exe --chain bsc --datadir N:/erigon --prune hrtc --rpc.batch.concurrency 50 --torrent.download.rate=60mb --torrent.upload.rate=2mb --maxpeers 50 --ethash.dagdir N:/erigon/erigon-ethash --private.api.addr=localhost:9090 --http --ws --http.addr 192.168.2.6 --http.port 8545 --http.api=eth,debug,net,trace,web3,erigon
INFO[06-02|22:44:35.627] Build info                               git_branch=devel git_tag=v2021.10.03-1110-g64508a7d4 git_commit=64508a7d4e5bdb47edc352bbe62d3682ca2e2d94
INFO[06-02|22:44:35.627] Starting Erigon on BSC mainnet...
INFO[06-02|22:44:35.630] Maximum peer count                       ETH=50 total=50
INFO[06-02|22:44:38.071] [torrent] Public IP                      ip=62.1.172.136
INFO[06-02|22:44:38.071] Set global gas cap                       cap=50000000
INFO[06-02|22:44:38.075] Opening Database                         label=chaindata path=N:\\erigon\\chaindata
INFO[06-02|22:44:38.111] Initialised chain configuration          config="{ChainID: 56 Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Engine: parlia}" genesis=0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b
INFO[06-02|22:44:39.390] Initialising Ethereum protocol           network=56
INFO[06-02|22:44:39.390] Effective                                prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--syncmode=snap"
INFO[06-02|22:44:39.412] Starting private RPC server              on=localhost:9090
INFO[06-02|22:44:39.412] new subscription to logs established
INFO[06-02|22:44:39.413] rpc filters: subscribing to Erigon events
INFO[06-02|22:44:39.413] new subscription to newHeaders established
INFO[06-02|22:44:39.413] New txs subscriber joined
INFO[06-02|22:44:39.414] HTTP endpoint opened                     url=192.168.2.6:8545 ws=true ws.compression=true grpc=false
INFO[06-02|22:44:39.424] [Snapshots] Fetching torrent files metadata
INFO[06-02|22:44:39.428] Started P2P networking                   version=66 self=enode://[email protected]:30303 name=erigon/v2022.99.99-dev-64508a7d/windows-amd64/go1.18.1
INFO[06-02|22:44:41.532] Mapped network port                      proto=udp extport=30303 intport=30303 interface="UPNP IGDv1-PPP1"
INFO[06-02|22:44:43.092] Mapped network port                      proto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-PPP1"
INFO[06-02|22:45:01.957] [Snapshots] Stat                         blocks=0 alloc=3.1Gb sys=3.4Gb
INFO[06-02|22:45:01.957] [snapshots] Build indices                from=0
INFO[06-02|22:45:24.299] [snapshots] HeadersIdx                   blockNum=5000000 alloc=5.6Gb sys=5.9Gb
INFO[06-02|22:45:42.151] [snapshots] HeadersIdx                   blockNum=9500000 alloc=3.3Gb sys=6.9Gb
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff76edd20a9]

goroutine 123748 [running]:
github.com/ledgerwatch/erigon-lib/compress.(*Getter).nextPos(0x7ff7708cf7d8?, 0x20?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:296 +0x29
github.com/ledgerwatch/erigon-lib/compress.(*Getter).Next(0xc0f10a84e0, {0xc0cf47c000, 0x0, 0x1000})
        github.com/ledgerwatch/[email protected]/compress/decompress.go:372 +0x59
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx.func1()
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1545 +0x15a
github.com/ledgerwatch/erigon-lib/compress.(*Decompressor).WithReadAhead(0x0?, 0x7d0?)
        github.com/ledgerwatch/[email protected]/compress/decompress.go:274 +0x7b
github.com/ledgerwatch/erigon/turbo/snapshotsync.Idx({0x7ff76fd3f6d8, 0xc0007b6f80}, 0xc18ed10080, 0xe4e1c0, {0xc0001d2390, 0x12}, 0xc0f10a8750)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1540 +0x29c
github.com/ledgerwatch/erigon/turbo/snapshotsync.HeadersIdx({0x7ff76fd3f6d8, 0xc0007b6f80}, {0xc0039de0c0?, 0x140a26a15f78?}, 0x140a26a18288?, {0xc0001d2390, 0x12}, 0x7ff76dfdf065?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:1451 +0x194
github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1.1(0xe4e1c0?, 0xec82e0?)
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:608 +0x194
created by github.com/ledgerwatch/erigon/turbo/snapshotsync.BuildIndices.func1
        github.com/ledgerwatch/erigon/turbo/snapshotsync/block_snapshots.go:601 +0x2be

stefanosstef avatar Jun 02 '22 19:06 stefanosstef

Switch to latest devel and try again: go run -trimpath ./cmd/downloader torrent_hashes --verify --datadir=n:\erigon

AskAlexSharov avatar Jun 03 '22 01:06 AskAlexSharov

Switch to latest devel and try again: go run -trimpath ./cmd/downloader torrent_hashes --verify --datadir=n:\erigon

I deleted everything and tried from scratch (updated to latest devel before starting) Last time I checked it was ~98% then I saw a warn and then a panic error I wasn't able to capture because of the big output. I will quote the end of it and as far as I can go to the beggining from the terminal's output:

warn: screenshot

error:

github.com/anacrolix/torrent.(*Client).initiateProtocolHandshakes(0xc003362000, {0x7ff6a0f33420, 0xc000036300}, {0x7ff6a0f3add8, 0xc054f48a00}, 0xc0603dc960?, 0x0?, 0x1, {0x7ff6a0f25e40, 0xc08ca2f1e0}, ...)
        github.com/anacrolix/[email protected]/client.go:708 +0x185
github.com/anacrolix/torrent.(*Client).establishOutgoingConnEx(0xc003362000, 0x7ff6a0933027?, {0x7ff6a0f25e40, 0xc08ca2f1e0}, 0x1?)
        github.com/anacrolix/[email protected]/client.go:728 +0x1df
github.com/anacrolix/torrent.(*Client).establishOutgoingConn(0xc003362000, 0x7ff6a0f33420?, {0x7ff6a0f25e40, 0xc08ca2f1e0})
        github.com/anacrolix/[email protected]/client.go:740 +0x78
github.com/anacrolix/torrent.(*Client).outgoingConnection(0xc003362000, 0x7ff69f2e4145?, {0x7ff6a0f25e40?, 0xc08ca2f1e0}, {0x7ff6a0901245, 0x2}, 0x0)
        github.com/anacrolix/[email protected]/client.go:764 +0xc5
created by github.com/anacrolix/torrent.(*Torrent).initiateConn
        github.com/anacrolix/[email protected]/torrent.go:2257 +0x25d

goroutine 133282478 [chan receive, 325 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 137582788 [chan receive, 234 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 136868415 [chan receive, 250 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 139366036 [chan receive, 195 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 148387392 [select]:
golang.org/x/time/rate.(*Limiter).WaitN(0xc04c1dc6e0, {0x7ff6a0f33420, 0xc000036300}, 0x1)
        golang.org/x/[email protected]/rate/rate.go:258 +0x3ba
golang.org/x/time/rate.(*Limiter).Wait(...)
        golang.org/x/[email protected]/rate/rate.go:218
github.com/anacrolix/torrent.(*Client).outgoingConnection(0xc003362000, 0x7ff69f2e4145?, {0x7ff6a0f25e40?, 0xc0f8b7d340}, {0x7ff6a0901245, 0x2}, 0x0)
        github.com/anacrolix/[email protected]/client.go:763 +0x9f
created by github.com/anacrolix/torrent.(*Torrent).initiateConn
        github.com/anacrolix/[email protected]/torrent.go:2257 +0x25d

error ending:

goroutine 145395484 [chan receive, 66 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 148387678 [select]:
golang.org/x/time/rate.(*Limiter).WaitN(0xc04c1dc6e0, {0x7ff6a0f33420, 0xc000036300}, 0x1)
        golang.org/x/[email protected]/rate/rate.go:258 +0x3ba
golang.org/x/time/rate.(*Limiter).Wait(...)
        golang.org/x/[email protected]/rate/rate.go:218
github.com/anacrolix/torrent.(*Client).outgoingConnection(0xc003362000, 0x7ff69f2e4145?, {0x7ff6a0f25e40?, 0xc0cd45aac0}, {0x7ff6a0901245, 0x2}, 0x0)
        github.com/anacrolix/[email protected]/client.go:763 +0x9f
created by github.com/anacrolix/torrent.(*Torrent).initiateConn
        github.com/anacrolix/[email protected]/torrent.go:2257 +0x25d

goroutine 140097839 [chan receive, 180 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 146416379 [chan receive, 44 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 142617111 [chan receive, 126 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 146243322 [chan receive, 48 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 146287192 [chan receive, 48 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 146742755 [chan receive, 38 minutes]:
github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo.func1()
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:73 +0x51
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.NewPeerInfo
        github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_grpc_server.go:72 +0x190

goroutine 148388178 [chan receive]:
github.com/anacrolix/go-libutp.(*Conn).waitForConnect.func1()
        github.com/anacrolix/[email protected]/conn.go:70 +0x32
created by github.com/anacrolix/go-libutp.(*Conn).waitForConnect
        github.com/anacrolix/[email protected]/conn.go:69 +0xba

goroutine 148386800 [select]:
net.(*netFD).connect.func2()
        net/fd_windows.go:95 +0x71
created by net.(*netFD).connect
        net/fd_windows.go:94 +0x39f

goroutine 148384988 [select]:
net.(*netFD).connect.func2()
        net/fd_windows.go:95 +0x71
created by net.(*netFD).connect
        net/fd_windows.go:94 +0x39f

The only thing that might have played a role is that I had a couple of few seconds disconnect in my internet and I noticed that while the downloading continued, it displayed good peers=0 (and after a while it went to a very small number of peers, like 3) for quite some time after each disconnect.

I am keeping it as it is in case I can help you find what's wrong with the sync but eventually I will have to do a full sync. So if you want me to try any diagnostics or possible fixes please do suggest. Thank you

stefanosstef avatar Jun 05 '22 10:06 stefanosstef

Need beginning of error - there is reason

AskAlexSharov avatar Jun 06 '22 01:06 AskAlexSharov

Need beginning of error - there is reason

Accidentally deleted everything. I am retrying with piping output and replying in around 2 days (if it does crash again at the same point)

stefanosstef avatar Jun 06 '22 14:06 stefanosstef

This time I didn't get this error, instead, after going 100% for the snapshots the output was this:

INFO[06-09|08:57:37.475] [Snapshots] download                     progress="99.98% 449.9Gb/450.0Gb" download=1.9Mb/s upload=102.4Kb/s peers=17 connections=20 files=105 alloc=2.0Gb sys=3.1Gb
INFO[06-09|08:57:57.475] [Snapshots] download                     progress="99.99% 450.0Gb/450.0Gb" download=1.7Mb/s upload=102.4Kb/s peers=17 connections=20 files=105 alloc=2.2Gb sys=3.1Gb
INFO[06-09|08:58:17.475] [Snapshots] download                     progress="100.00% 450.0Gb/450.0Gb" download=1.6Mb/s upload=102.4Kb/s peers=14 connections=18 files=105 alloc=2.4Gb sys=3.1Gb
WARN[06-09|08:58:37.430] "v1-012000-012500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.430] "v1-016000-016500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.430] "v1-017000-017500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.431] "v1-016500-017000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.437] "v1-000500-001000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.441] "v1-002500-003000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.443] "v1-006500-007000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.450] "v1-013000-013500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.453] "v1-009500-010000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.455] "v1-010000-010500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.467] "v1-000000-000500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.473] "v1-000500-001000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.476] "v1-001000-001500-transactions.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-09|08:58:37.504] "v1-008500-009000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.507] "v1-008000-008500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.514] "v1-017000-017500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.516] "v1-003000-003500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.516] "v1-011000-011500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.518] "v1-012500-013000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.522] "v1-008000-008500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.541] "v1-015500-016000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.547] "v1-005000-005500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.549] "v1-002000-002500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.550] "v1-004000-004500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.551] "v1-013500-014000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.558] "v1-010000-010500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.561] "v1-009500-010000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.575] "v1-001000-001500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.581] "v1-003000-003500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.598] "v1-016000-016500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.607] "v1-001500-002000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.607] "v1-012000-012500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.613] "v1-015500-016000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.620] "v1-003000-003500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.627] "v1-003500-004000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.657] "v1-005000-005500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.659] "v1-007500-008000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.669] "v1-011500-012000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.748] "v1-014500-015000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.160] "v1-008500-009000-bodies.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-09|08:58:38.160] "v1-009000-009500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.162] "v1-001500-002000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.162] "v1-006000-006500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.168] "v1-005500-006000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.168] "v1-010500-011000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.169] "v1-017000-017500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.169] "v1-005000-005500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.170] "v1-015000-015500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.176] "v1-003500-004000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.181] "v1-011500-012000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.199] "v1-014000-014500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.200] "v1-003500-004000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.201] "v1-007000-007500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.208] "v1-007500-008000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.210] "v1-013500-014000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.210] "v1-014500-015000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.211] "v1-011000-011500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.212] "v1-002500-003000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.220] "v1-004000-004500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.227] "v1-002000-002500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.276] "v1-005500-006000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.317] "v1-006000-006500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.321] "v1-015500-016000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.333] "v1-009000-009500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.340] "v1-016000-016500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.344] "v1-014000-014500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.363] "v1-008000-008500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.413] "v1-009500-010000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.441] "v1-006500-007000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.569] "v1-012500-013000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.512] "v1-010500-011000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.524] "v1-002500-003000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.525] "v1-012500-013000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
[...............]

it displays this warning for all snapshot files, then continues:

alex1: N:\erigon_node\snapshots\
INFO[06-09|08:59:07.167] [Snapshots] Stat                         blocks=0 segments=17499999 indices=0 alloc=3.7Gb sys=4.2Gb
INFO[06-09|08:59:07.170] [snapshots] Build indices                from=0
INFO[06-09|08:59:29.526] [snapshots] HeadersIdx                   blockNum=3500000 alloc=6.3Gb sys=6.9Gb
INFO[06-09|08:59:37.390] [p2p] GoodPeers                          eth66=49
INFO[06-09|08:59:49.104] [snapshots] HeadersIdx                   blockNum=7500000 alloc=6.2Gb sys=7.1Gb
INFO[06-09|09:00:11.095] [snapshots] HeadersIdx                   blockNum=12500000 alloc=3.5Gb sys=7.2Gb
INFO[06-09|09:00:28.341] [snapshots] HeadersIdx                   blockNum=16500000 alloc=3.4Gb sys=7.2Gb
INFO[06-09|09:00:48.828] [snapshots] BodiesIdx                    blockNum=6500000 alloc=5.6Gb sys=7.2Gb
INFO[06-09|09:01:08.216] [snapshots] BodiesIdx                    blockNum=14500000 alloc=5.3Gb sys=7.3Gb
INFO[06-09|09:01:35.908] [Snapshots Indexing] TransactionsIdx     blockNum=500000 alloc=6.5Gb sys=8.3Gb

stefanosstef avatar Jun 09 '22 07:06 stefanosstef

This time I didn't get this error, instead, after going 100% for the snapshots the output was this:

INFO[06-09|08:57:37.475] [Snapshots] download                     progress="99.98% 449.9Gb/450.0Gb" download=1.9Mb/s upload=102.4Kb/s peers=17 connections=20 files=105 alloc=2.0Gb sys=3.1Gb
INFO[06-09|08:57:57.475] [Snapshots] download                     progress="99.99% 450.0Gb/450.0Gb" download=1.7Mb/s upload=102.4Kb/s peers=17 connections=20 files=105 alloc=2.2Gb sys=3.1Gb
INFO[06-09|08:58:17.475] [Snapshots] download                     progress="100.00% 450.0Gb/450.0Gb" download=1.6Mb/s upload=102.4Kb/s peers=14 connections=18 files=105 alloc=2.4Gb sys=3.1Gb
WARN[06-09|08:58:37.430] "v1-012000-012500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.430] "v1-016000-016500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.430] "v1-017000-017500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.431] "v1-016500-017000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.437] "v1-000500-001000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.441] "v1-002500-003000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.443] "v1-006500-007000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.450] "v1-013000-013500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.453] "v1-009500-010000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.455] "v1-010000-010500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.467] "v1-000000-000500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.473] "v1-000500-001000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.476] "v1-001000-001500-transactions.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-09|08:58:37.504] "v1-008500-009000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.507] "v1-008000-008500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.514] "v1-017000-017500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.516] "v1-003000-003500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.516] "v1-011000-011500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.518] "v1-012500-013000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.522] "v1-008000-008500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.541] "v1-015500-016000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.547] "v1-005000-005500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.549] "v1-002000-002500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.550] "v1-004000-004500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.551] "v1-013500-014000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.558] "v1-010000-010500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.561] "v1-009500-010000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.575] "v1-001000-001500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.581] "v1-003000-003500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.598] "v1-016000-016500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.607] "v1-001500-002000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.607] "v1-012000-012500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.613] "v1-015500-016000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.620] "v1-003000-003500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.627] "v1-003500-004000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.657] "v1-005000-005500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.659] "v1-007500-008000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.669] "v1-011500-012000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:37.748] "v1-014500-015000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.160] "v1-008500-009000-bodies.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-09|08:58:38.160] "v1-009000-009500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.162] "v1-001500-002000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.162] "v1-006000-006500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.168] "v1-005500-006000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.168] "v1-010500-011000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.169] "v1-017000-017500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.169] "v1-005000-005500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.170] "v1-015000-015500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.176] "v1-003500-004000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.181] "v1-011500-012000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.199] "v1-014000-014500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.200] "v1-003500-004000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.201] "v1-007000-007500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.208] "v1-007500-008000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.210] "v1-013500-014000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.210] "v1-014500-015000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.211] "v1-011000-011500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.212] "v1-002500-003000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.220] "v1-004000-004500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.227] "v1-002000-002500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.276] "v1-005500-006000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.317] "v1-006000-006500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.321] "v1-015500-016000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.333] "v1-009000-009500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.340] "v1-016000-016500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.344] "v1-014000-014500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.363] "v1-008000-008500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.413] "v1-009500-010000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.441] "v1-006500-007000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:38.569] "v1-012500-013000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.512] "v1-010500-011000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.524] "v1-002500-003000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-09|08:58:39.525] "v1-012500-013000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
[...............]

it displays this warning for all snapshot files, then continues:

alex1: N:\erigon_node\snapshots\
INFO[06-09|08:59:07.167] [Snapshots] Stat                         blocks=0 segments=17499999 indices=0 alloc=3.7Gb sys=4.2Gb
INFO[06-09|08:59:07.170] [snapshots] Build indices                from=0
INFO[06-09|08:59:29.526] [snapshots] HeadersIdx                   blockNum=3500000 alloc=6.3Gb sys=6.9Gb
INFO[06-09|08:59:37.390] [p2p] GoodPeers                          eth66=49
INFO[06-09|08:59:49.104] [snapshots] HeadersIdx                   blockNum=7500000 alloc=6.2Gb sys=7.1Gb
INFO[06-09|09:00:11.095] [snapshots] HeadersIdx                   blockNum=12500000 alloc=3.5Gb sys=7.2Gb
INFO[06-09|09:00:28.341] [snapshots] HeadersIdx                   blockNum=16500000 alloc=3.4Gb sys=7.2Gb
INFO[06-09|09:00:48.828] [snapshots] BodiesIdx                    blockNum=6500000 alloc=5.6Gb sys=7.2Gb
INFO[06-09|09:01:08.216] [snapshots] BodiesIdx                    blockNum=14500000 alloc=5.3Gb sys=7.3Gb
INFO[06-09|09:01:35.908] [Snapshots Indexing] TransactionsIdx     blockNum=500000 alloc=6.5Gb sys=8.3Gb

Get the same err error closing storage: FlushFileBuffers: The handle is invalid. Have you solved it?

lqucool avatar Jun 10 '22 00:06 lqucool

It's from https://github.com/edsrzf/mmap-go/issues/22

AskAlexSharov avatar Jun 10 '22 01:06 AskAlexSharov

probably solved by https://github.com/ledgerwatch/erigon/pull/4426

AskAlexSharov avatar Jun 10 '22 01:06 AskAlexSharov

probably solved by #4426

I updated to latest devel. Do I need to delete everything and start over? I'm getting this:

INFO[06-10|23:16:51.331] [Snapshots] Waiting for torrents metadata: 103/105
INFO[06-10|23:17:11.329] [Snapshots] Waiting for torrents metadata: 104/105
INFO[06-10|23:17:28.244] [p2p] GoodPeers                          eth66=8
INFO[06-10|23:17:32.671] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:32.671] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:32.674] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:33.180] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:34.234] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:34.234] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:34.235] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:34.735] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:35.773] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:35.774] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:35.774] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:36.283] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:37.366] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.8Gb sys=3.2Gb
INFO[06-10|23:17:37.366] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:37.366] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013000-013500-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:37.871] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:39.003] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.7Gb sys=3.2Gb
INFO[06-10|23:17:39.003] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:39.004] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:39.504] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:40.479] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:40.479] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:40.480] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013000-013500-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:40.984] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:42.022] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.8Gb sys=3.2Gb
INFO[06-10|23:17:42.022] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:42.023] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:42.524] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:43.634] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.8Gb sys=3.2Gb
INFO[06-10|23:17:43.634] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:43.635] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013000-013500-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"
INFO[06-10|23:17:44.138] [Snapshots] Fetching torrent files metadata
INFO[06-10|23:17:45.114] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:45.114] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:45.115] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"

I verified, rebuild and I'm getting the same, even after deleting from v1-013 and below

After canceling (ctrl+c) I got this:

WARN[06-10|23:17:46.101] "v1-010000-010500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-008000-008500-transactions.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-10|23:17:46.156] "v1-011500-012000-headers.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-10|23:17:46.155] "v1-014500-015000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-005000-005500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-007000-007500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-010500-011000-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-008500-009000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-015000-015500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-016500-017000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.155] "v1-013500-014000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.156] "v1-004000-004500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.156] "v1-017000-017500-transactions.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-10|23:17:46.156] "v1-000000-000500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.156] "v1-003500-004000-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.156] "v1-011000-011500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.159] "v1-014000-014500-bodies.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.160] "v1-006000-006500-headers.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.161] "v1-014000-014500-headers.seg": error closing storage: FlushFileBuffers: Incorrect function.
WARN[06-10|23:17:46.161] "v1-005000-005500-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
WARN[06-10|23:17:46.320] "v1-012500-013000-transactions.seg": error closing storage: FlushFileBuffers: The handle is invalid.
INFO[06-10|23:17:46.634] [Snapshots] Stat                         blocks=12999999 segments=17499999 indices=12999999 alloc=1.9Gb sys=3.2Gb
INFO[06-10|23:17:46.634] [snapshots] Build indices                from=12999999
EROR[06-10|23:17:46.635] Staged Sync                              err="[1/16 Headers] BuildIndices: HeadersIdx: at=v1-013500-014000-headers.seg, runtime error: invalid memory address or nil pointer dereference, [block_snapshots.go:1524 panic.go:838 panic.go:220 signal_windows.go:255 decompress.go:312 decompress.go:389 block_snapshots.go:1637 decompress.go:287 block_snapshots.go:1632 block_snapshots.go:1536 block_snapshots.go:627 asm_amd64.s:1571]"

stefanosstef avatar Jun 10 '22 20:06 stefanosstef

You can try remove only “datadir/snapshots/db” folder

AskAlexSharov avatar Jun 11 '22 04:06 AskAlexSharov

i am trying to run daemon on Mac M1, receiving this:

anastasiya@MacBook-Pro-Anastasiya bin % ./rpcdaemon --datadir=dev --private.api.addr=localhost:9090 --http.api=eth,erigon,web3,net,debug,trace,txpool,parity

INFO[08-08|15:46:00.755] rpc filters: subscribing to Erigon events 
INFO[08-08|15:46:00.763] HTTP endpoint opened                     url=localhost:8545 ws=false ws.compression=false grpc=false
INFO[08-08|15:46:00.780] interfaces compatible                    remote_db= client=6.0.0 server=6.0.0
INFO[08-08|15:46:00.780] interfaces compatible                    remote_service=eth_backend client=3.1.0 server=3.1.0
INFO[08-08|15:46:00.781] interfaces compatible                    remote_service=mining client=1.0.0 server=1.0.0
INFO[08-08|15:46:00.781] interfaces compatible                    remote_service=tx_pool client=1.0.0 server=1.0.0
WARN[08-08|15:46:00.781] [Snapshots] reopen                       err="rpc error: code = Internal desc = runtime error: invalid memory address or nil pointer dereference" 

Build / OS info: 8gb ram Apple Silicone M1

Erigon version: erigon version git_branch =devel git_commit = 7a64fe44eb9d3c6e3ff4e9830d4e828f248ef2a0

OS & Version: MacOS Monterey 12.5

anastasiyaig avatar Aug 08 '22 13:08 anastasiyaig