ledgerwatch / erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
3.03k stars 1.05k forks source link

2.59.3 OOM #10873

Closed MrFreezeDZ closed 5 days ago

MrFreezeDZ commented 5 days ago

System information

Erigon version: ./erigon --version 2.59.3

OS & Version: Windows/Linux/OSX Kubernetes, Image from here: https://hub.docker.com/r/thorax/erigon The Erigon container has resources of 16 CPUs and 112Gi Memory.

Commit hash: 088fd8ef69389a72da6faa0fc7903a4ba5726911

Erigon Command (with flags/config): erigon --chain=bor-mainnet --datadir=/data/ --log.json=true --http.addr=0.0.0.0 --http.vhosts= --http --http.api=eth,admin,debug,net,trace,web3,erigon,txpool --ws --bor.heimdall=http://heimdallrest --authrpc.vhosts= --authrpc.jwtsecret=/secret/jwt.hex --authrpc.addr=0.0.0.0 --db.size.limit=12TB --db.pagesize=16k --metrics --metrics.addr=0.0.0.0 --maxpeers=500 --torrent.download.rate=300mb --bootnodes=enode://bdcd4786a616a853b8a041f53496d853c68d99d54ff305615cd91c03cd56895e0a7f6e9f35dbf89131044e2114a9a782b792b5661e3aff07faf125a98606a071@43.200.206.40:30303,enode://209aaf7ed549cf4a5700fd833da25413f80a1248bd3aa7fe2a87203e3f7b236dd729579e5c8df61c97bf508281bae4969d6de76a7393bcbd04a0af70270333b3@54.216.248.9:30303

Consensus Layer: Heimdall 1.0.7

Consensus Layer Command (with flags/config): /usr/bin/heimdalld start --home=/heimdall-home

Chain/Network: bor-mainnet

Expected behaviour

Erigon will keep working and a bad header should not make erigon log it every few milliseconds until Erigon gets OOMKilled by Kubernetes.

Actual behaviour

Erigon logs the following:

Steps to reproduce the behaviour

I do not know how to actively reproduce this behaviour. Erigon was updated to 2.59.3 on the last friday.

Backtrace

These logs are copy pasted from the google cloud UI so the timestamps before each line are from googles logs explorer. At 2024-06-23 07:18:40.271 the logs get filled with the "Rejected header marked as bad" message. In the Memory usage we can see that the memory gets used more and more until Kubernetes kills the pod.

2024-06-23 07:16:23.681
{"file prefix":"erigon", "json":false, "log dir":"/data/logs", "log level":"info", "lvl":"info", "msg":"logging to file system", "t":"2024-06-23T07:16:23.681158535Z"}
2024-06-23 07:16:23.684
{"lvl":"info", "msg":"Enabling metrics export to prometheus", "path":"http://0.0.0.0:6060/debug/metrics/prometheus", "t":"2024-06-23T07:16:23.684796921Z"}
2024-06-23 07:16:23.685
{"git_branch":"heads/v2.59.3", "git_commit":"088fd8ef69389a72da6faa0fc7903a4ba5726911", "git_tag":"v2.59.3-dirty", "lvl":"info", "msg":"Build info", "t":"2024-06-23T07:16:23.684868667Z"}
2024-06-23 07:16:23.685
{"lvl":"info", "msg":"Starting Erigon on Bor Mainnet...", "t":"2024-06-23T07:16:23.684918147Z"}
2024-06-23 07:16:23.693
{"ETH":500, "lvl":"info", "msg":"Maximum peer count", "t":"2024-06-23T07:16:23.693041658Z", "total":500}
2024-06-23 07:16:23.693
{"APIs":"eth,admin,debug,net,trace,web3,erigon,txpool", "lvl":"info", "msg":"starting HTTP APIs", "port":8545, "t":"2024-06-23T07:16:23.693343655Z"}

2024-06-23 07:16:23.694
{"level":"WRN", "lvl":"info", "msg":"torrent verbosity", "t":"2024-06-23T07:16:23.694357165Z"}
2024-06-23 07:16:25.799
{"cap":5.0E7, "lvl":"info", "msg":"Set global gas cap", "t":"2024-06-23T07:16:25.799291617Z"}
2024-06-23 07:16:25.801
{"download.rate":"300mb", "ipv4-enabled":true, "ipv6-enabled":true, "lvl":"info", "msg":"[Downloader] Running with", "t":"2024-06-23T07:16:25.801383241Z", "upload.rate":"4mb"}
2024-06-23 07:16:25.804
{"label":"chaindata", "lvl":"info", "msg":"Opening Database", "path":"/data/chaindata", "t":"2024-06-23T07:16:25.804355716Z"}
2024-06-23 07:16:25.821
{"lable":"chaindata", "lvl":"info", "msg":"[db] open", "pageSize":16384, "sizeLimit":"12TB", "t":"2024-06-23T07:16:25.82089512Z"}
2024-06-23 07:16:25.868
{"config":"{ChainID: 137, Homestead: 0, DAO: <nil>, Tangerine Whistle: 0, Spurious Dragon: 0, Byzantium: 0, Constantinople: 0, Petersburg: 0, Istanbul: 3395000, Muir Glacier: 3395000, Berlin: 14750000, London: 23850000, Arrow Glacier: <nil>, Gray Glacier: <nil>, Terminal Total Difficulty: <nil>, Merge Netsplit: <nil>, Shanghai: <nil>, Cancun: <nil>, Prague: <nil>, Osaka: <nil>, Engine: bor, NoPruneContracts: map[]}", "genesis":"0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b", "lvl":"info", "msg":"Initialised chain configuration", "t":"2024-06-23T07:16:25.868415324Z"}
2024-06-23 07:16:55.892
{"lvl":"info", "msg":"Initialising Ethereum protocol", "network":137, "t":"2024-06-23T07:16:55.891817874Z"}
2024-06-23 07:16:55.892
{"label":"bor", "lvl":"info", "msg":"Opening Database", "path":"/data/bor", "t":"2024-06-23T07:16:55.891973602Z"}
2024-06-23 07:17:03.431
{"lvl":"info", "msg":"Starting private RPC server", "on":"127.0.0.1:9090", "t":"2024-06-23T07:17:03.431695569Z"}
2024-06-23 07:17:03.431
{"lvl":"info", "msg":"new subscription to logs established", "t":"2024-06-23T07:17:03.431788152Z"}
2024-06-23 07:17:03.432
{"lvl":"info", "msg":"rpc filters: subscribing to Erigon events", "t":"2024-06-23T07:17:03.432117437Z"}
2024-06-23 07:17:03.432
{"lvl":"info", "msg":"New txs subscriber joined", "t":"2024-06-23T07:17:03.432281433Z"}
2024-06-23 07:17:03.432
{"lvl":"info", "msg":"new subscription to newHeaders established", "t":"2024-06-23T07:17:03.432412748Z"}
2024-06-23 07:17:03.433
{"grpc":false, "http.url":"[::]:8545", "lvl":"info", "msg":"JsonRpc endpoint opened", "t":"2024-06-23T07:17:03.4334495Z", "websocket.url":"[::]:8546", "ws":true, "ws.compression":true}
2024-06-23 07:17:03.442
{"lvl":"info", "msg":"[txpool] Started", "t":"2024-06-23T07:17:03.442164628Z"}
2024-06-23 07:17:03.444
{"from":5.8494419E7, "lvl":"info", "msg":"[2/15 Headers] Waiting for headers...", "t":"2024-06-23T07:17:03.444624929Z"}
2024-06-23 07:17:03.454
{"err":"no UPnP or NAT-PMP router discovered", "lvl":"warn", "msg":"NAT ExternalIP resolution has failed, try to pass a different --nat option", "t":"2024-06-23T07:17:03.454395229Z"}
2024-06-23 07:17:03.458
{"lvl":"info", "msg":"Started P2P networking", "name":"erigon/v2.59.3-088fd8ef/linux-amd64/go1.21.5", "self":"enode://e9706fc5afa05013402f58f3481b693e9330f0501d981a398c1a86832e1f789620bca9edaca56702a03f520132e541e0ffb95bb9d3fde31b08c490f223bd08c2@127.0.0.1:30303", "t":"2024-06-23T07:17:03.457979359Z", "version":68}
2024-06-23 07:17:03.464
{"err":"no UPnP or NAT-PMP router discovered", "lvl":"warn", "msg":"NAT ExternalIP resolution has failed, try to pass a different --nat option", "t":"2024-06-23T07:17:03.464207686Z"}
2024-06-23 07:17:03.470
{"lvl":"info", "msg":"Started P2P networking", "name":"erigon/v2.59.3-088fd8ef/linux-amd64/go1.21.5", "self":"enode://e9706fc5afa05013402f58f3481b693e9330f0501d981a398c1a86832e1f789620bca9edaca56702a03f520132e541e0ffb95bb9d3fde31b08c490f223bd08c2@127.0.0.1:30304", "t":"2024-06-23T07:17:03.470680086Z", "version":67}
2024-06-23 07:17:07.190
{"age":"1s", "blk/sec":1748, "headers":6551, "highest":5.850097E7, "in":3.745866696, "lvl":"info", "msg":"[2/15 Headers] Processed", "t":"2024-06-23T07:17:07.19047113Z"}
2024-06-23 07:17:07.192
{"from":9141, "lvl":"info", "msg":"[3/15 BorHeimdall] Processing spans...", "t":"2024-06-23T07:17:07.19276268Z", "to":9141}
2024-06-23 07:17:07.201
{"from":5.849442E7, "lvl":"info", "msg":"[3/15 BorHeimdall] Processing sync events...", "t":"2024-06-23T07:17:07.201267551Z", "to":5.850097E7}
2024-06-23 07:17:09.601
{"fetch time":"871.050575ms", "lastSpanID":9141, "lastStateSyncEventID":2925684, "lvl":"info", "msg":"[3/15 BorHeimdall] Sync events processed", "process time":"2.410127706s", "progress":5.850097E7, "t":"2024-06-23T07:17:09.600831645Z", "total records":54}
2024-06-23 07:17:20.744
{"from":5.8494419E7, "lvl":"info", "msg":"[5/15 Bodies] Processing bodies...", "t":"2024-06-23T07:17:20.744214738Z", "to":5.850097E7}
2024-06-23 07:17:27.453
{"err":"[bor] block not found: 58500946", "lvl":"warn", "msg":"[bor] unable to handle whitelist milestone", "t":"2024-06-23T07:17:27.453153611Z"}
2024-06-23 07:17:39.452
{"err":"[bor] block not found: 58500959", "lvl":"warn", "msg":"[bor] unable to handle whitelist milestone", "t":"2024-06-23T07:17:39.452593557Z"}
2024-06-23 07:17:50.744
{"alloc":"395.2MB", "blk/sec":3, "block_num":5.8499639E7, "cache":"43.2KB", "delivered":103, "delivery/sec":"209.3KB", "lvl":"info", "msg":"[5/15 Bodies] Downloading block bodies", "remaining":1330, "sys":"1.4GB", "t":"2024-06-23T07:17:50.744726327Z", "wasted/sec":"1.6KB"}
2024-06-23 07:17:51.452
{"err":"[bor] block not found: 58500959", "lvl":"warn", "msg":"[bor] unable to handle whitelist milestone", "t":"2024-06-23T07:17:51.452225084Z"}
2024-06-23 07:18:03.452
{"err":"[bor] block not found: 58500959", "lvl":"warn", "msg":"[bor] unable to handle whitelist milestone", "t":"2024-06-23T07:18:03.452192018Z"}
2024-06-23 07:18:20.745
{"alloc":"737.0MB", "blk/sec":43, "block_num":5.8500592E7, "cache":"15.7MB", "delivered":1308, "delivery/sec":"2.5MB", "lvl":"info", "msg":"[5/15 Bodies] Downloading block bodies", "remaining":377, "sys":"1.4GB", "t":"2024-06-23T07:18:20.745692992Z", "wasted/sec":"816.7KB"}
2024-06-23 07:18:36.340
{"blk/sec":86, "blocks":6551, "highest":5.850097E7, "in":75.596420629, "lvl":"info", "msg":"[5/15 Bodies] Processed", "t":"2024-06-23T07:18:36.340473792Z"}
2024-06-23 07:18:36.340
{"in":"1m15.596644852s", "lvl":"info", "msg":"[5/15 Bodies] DONE", "t":"2024-06-23T07:18:36.340610438Z"}
2024-06-23 07:18:36.340
{"from":5.8494419E7, "lvl":"info", "msg":"[6/15 Senders] Started", "t":"2024-06-23T07:18:36.340859414Z", "to":5.850097E7}
2024-06-23 07:18:37.733
{"from":5.8494419E7, "lvl":"info", "msg":"[7/15 Execution] Blocks execution", "t":"2024-06-23T07:18:37.73333498Z", "to":5.850097E7}
2024-06-23 07:18:39.256
{"block":5.849442E7, "err":"invalid block: mismatched receipt headers for block 58494420 (0x8fb7e950af131b1e2a443383cddd5dc663025f6212383e6578baf28512a1cbe0 != 0xfb68d26a7b23ea46a10130e8048fff104a503a91c53533a3bddc363d11080bb9)", "hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "lvl":"warn", "msg":"[7/15 Execution] Execution failed", "t":"2024-06-23T07:18:39.256331768Z"}
2024-06-23 07:18:39.259
{"block":5.8494419E7, "lvl":"info", "msg":"[7/15 Execution] Completed on", "t":"2024-06-23T07:18:39.259501744Z"}
2024-06-23 07:18:40.260
{"amount":1024, "from":5.8493335E7, "hash":"0x10d632646e277931a6962b7a315e0ae5ec5acc21a6a6790dbdee5d42687722d6", "header sending":"7.850048ms", "log sending":"500ns", "lvl":"info", "msg":"RPC Daemon notified of new headers", "t":"2024-06-23T07:18:40.260310991Z", "to":5.8494359E7}
2024-06-23 07:18:40.260
{"BlockHashes":"11.142s", "Bodies":"1m15.596s", "BorHeimdall":"2.41s", "Execution":"1.526s", "Headers":"3.746s", "Senders":"1.392s", "Unwind Headers":"977ms", "lvl":"info", "msg":"Timings (slower than 50ms)", "t":"2024-06-23T07:18:40.260495788Z"}
2024-06-23 07:18:40.261
{"from":5.8494419E7, "lvl":"info", "msg":"[2/15 Headers] Waiting for headers...", "t":"2024-06-23T07:18:40.261060968Z"}
2024-06-23 07:18:40.271
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.271468128Z"}
2024-06-23 07:18:40.271
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.271717916Z"}
2024-06-23 07:18:40.272
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.272017159Z"}
2024-06-23 07:18:40.272
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.272411515Z"}
2024-06-23 07:18:40.753
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.753127424Z"}
2024-06-23 07:18:40.774
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:40.773909435Z"}
2024-06-23 07:18:41.272
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:41.272119442Z"}
2024-06-23 07:18:41.272
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:41.272335032Z"}
2024-06-23 07:18:41.272
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:41.27256187Z"}
2024-06-23 07:18:42.065
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:42.065039977Z"}
2024-06-23 07:18:42.275
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:42.274941172Z"}
2024-06-23 07:18:42.275
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:42.27519346Z"}
2024-06-23 07:18:42.275
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:42.275394442Z"}
2024-06-23 07:18:42.345
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:42.345596849Z"}
2024-06-23 07:18:43.075
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.075636901Z"}
2024-06-23 07:18:43.076
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.07612136Z"}
2024-06-23 07:18:43.118
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.118160445Z"}
2024-06-23 07:18:43.118
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.118467162Z"}
2024-06-23 07:18:43.118
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.118589732Z"}
2024-06-23 07:18:43.276
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.276338637Z"}
2024-06-23 07:18:43.276
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.276731261Z"}
2024-06-23 07:18:43.276
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.276879841Z"}
2024-06-23 07:18:43.459
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.459396249Z"}
2024-06-23 07:18:43.766
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.766151576Z"}
2024-06-23 07:18:43.766
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.766490081Z"}
2024-06-23 07:18:43.779
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.779688572Z"}
2024-06-23 07:18:43.779
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.779889638Z"}
2024-06-23 07:18:43.788
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.788736767Z"}
2024-06-23 07:18:43.789
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.789138452Z"}
2024-06-23 07:18:43.796
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.796438486Z"}
2024-06-23 07:18:43.815
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.814834641Z"}
2024-06-23 07:18:43.817
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.817391921Z"}
2024-06-23 07:18:43.824
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.824156286Z"}
2024-06-23 07:18:43.825
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.825138384Z"}
2024-06-23 07:18:43.834
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.8342254Z"}
2024-06-23 07:18:43.834
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.834462521Z"}
2024-06-23 07:18:43.834
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.834603758Z"}
2024-06-23 07:18:43.839
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.839731574Z"}
2024-06-23 07:18:43.860
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.860281459Z"}
2024-06-23 07:18:43.861
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.860948103Z"}
2024-06-23 07:18:43.867
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.867727677Z"}
2024-06-23 07:18:43.868
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.868070834Z"}
2024-06-23 07:18:43.874
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.874651116Z"}
2024-06-23 07:18:43.875
{"hash":"0x939b2534c03bc5b9dddeaef77cf0f8a5f031f9e7ef1495d16c95e37d890d9683", "height":5.849442E7, "lvl":"warn", "msg":"[downloader] Rejected header marked as bad", "t":"2024-06-23T07:18:43.874889349Z"}

Please help us, as this is our productive Erigon instance.

AskAlexSharov commented 5 days ago

maybe same thing as https://github.com/ledgerwatch/erigon/issues/10734

AskAlexSharov commented 5 days ago

try

integration state_stages --unwind=10
integration stage_headers --unwind=10
start erigon
MrFreezeDZ commented 5 days ago

Thank you very much for the quick response. We ran the commands and it seems to work. Right now Erigon is running and is catching up again. The memory consumption graph also looks normal again. I think the problem is solved. There was an ERROR-message in the integration logs at 09:46:25.956 but reading the messages I think everything worked correct. We executed a "print_stages" before, after and between the two given integration commands out of curiosity. Perhaps the integration logs will help to find the cause?

integration --chain bor-mainnet --datadir /data --bor.heimdall http://heimdallrest print_stages
INFO[06-24|09:41:55.746] logging to file system log dir=/data/logs file prefix=integration log level=info json=false
INFO[06-24|09:41:55.770] [db] open lable=chaindata sizeLimit=12TB pageSize=16384
Note: prune_at doesn't mean 'all data before were deleted' - it just mean stage.Prune function were run to this block. Because 1 stage may prune multiple data types to different prune distance.

stage_at prune_at
Snapshots 58494359 0
Headers 58494419 0
BorHeimdall 58494419 0
BlockHashes 58494419 0
Bodies 58494419 0
Senders 58494419 0
Execution 58494419 58494419
Translation 0 0
HashState 58494359 0
IntermediateHashes 58494359 58494359
AccountHistoryIndex 58494359 0
StorageHistoryIndex 58494359 0
LogIndex 58494359 0
CallTraces 58494359 58494359
TxLookup 58494359 0
Finish 58494359 0
--
prune distance:

blocks.v2: false, blocks=0, segments=0, indices=0
blocks.bor.v2: segments=0, indices=0

history.v3: false, idx steps: 0.00, lastBlockInSnap=0, TxNums_Index(0,1)

sequence: EthTx=4274791252, NonCanonicalTx=1534519

in db: first header 1, last header 58543547, first body 1, last body 58543547
--
/ $ integration --chain bor-mainnet --datadir /data --bor.heimdall http://heimdallrest state_stages --unwind=10
INFO[06-24|09:42:36.758] logging to file system log dir=/data/logs file prefix=integration log level=info json=false
INFO[06-24|09:42:36.766] [db] open lable=chaindata sizeLimit=12TB pageSize=16384
INFO[06-24|09:42:36.865] Opening Database label=bor path=/data/bor
INFO[06-24|09:42:47.859] [8/15 HashState] Promoting plain state from=58494359 to=58494419
INFO[06-24|09:42:47.859] [8/15 HashState] Incremental promotion from=58494359 to=58494419 codes=true csbucket=AccountChangeSet
INFO[06-24|09:43:07.530] [8/15 HashState] Incremental promotion from=58494359 to=58494419 codes=false csbucket=AccountChangeSet
INFO[06-24|09:43:23.295] [8/15 HashState] Incremental promotion from=58494359 to=58494419 codes=false csbucket=StorageChangeSet
INFO[06-24|09:44:08.293] [8/15 HashState] ETL [2/2] Loading into=HashedStorage current_prefix=e9dae3d7
INFO[06-24|09:44:11.642] [8/15 HashState] DONE in=1m23.783196667s
INFO[06-24|09:44:11.643] [9/15 IntermediateHashes] Generating intermediate hashes from=58494359 to=58494419
INFO[06-24|09:44:41.772] [9/15 IntermediateHashes] Calculating Merkle root current key=499a35fd
INFO[06-24|09:45:11.769] [9/15 IntermediateHashes] Calculating Merkle root current key=94788105
INFO[06-24|09:45:41.872] [9/15 IntermediateHashes] Calculating Merkle root current key=e0967326
INFO[06-24|09:46:16.373] [9/15 IntermediateHashes] Calculating Merkle root current key=e9dae3d7
EROR[06-24|09:46:25.956] [9/15 IntermediateHashes] Wrong trie root of block 58494419: f5b101a3788642d0199d7b1fe0493dd82340a590316967f8553b72f948900407, expected (from header): d5e06ab51fcddfa0887c3db8305aecf1f29928bc2726a2f59611a8a5674e166b. Block hash: 42e6674c65b0bf044670324585ee11a33a3142b6c5e10843a16adb6441e94f7d
WARN[06-24|09:46:25.957] Unwinding due to incorrect root hash to=58494389
INFO[06-24|09:46:25.957] [9/15 IntermediateHashes] DONE in=2m14.314088045s
INFO[06-24|09:46:25.957] [8/15 HashState] Unwinding started from=58494419 to=58494389 storage=false codes=true
INFO[06-24|09:46:25.977] [8/15 HashState] Unwinding started from=58494419 to=58494389 storage=false codes=false
INFO[06-24|09:46:26.019] [8/15 HashState] Unwinding started from=58494419 to=58494389 storage=true codes=false
INFO[06-24|09:46:26.169] [7/15 Execution] Unwind Execution from=58494419 to=58494389
/ $ integration --chain bor-mainnet --datadir /data --bor.heimdall http://heimdallrest print_stages
INFO[06-24|09:46:45.884] logging to file system log dir=/data/logs file prefix=integration log level=info json=false
INFO[06-24|09:46:45.891] [db] open lable=chaindata sizeLimit=12TB pageSize=16384
Note: prune_at doesn't mean 'all data before were deleted' - it just mean stage.Prune function were run to this block. Because 1 stage may prune multiple data types to different prune distance.

stage_at prune_at
Snapshots 58494359 0
Headers 58494419 0
BorHeimdall 58494389 0
BlockHashes 58494419 0
Bodies 58494419 0
Senders 58494419 0
Execution 58494389 58494419
Translation 0 0
HashState 58494389 0
IntermediateHashes 58494359 58494359
AccountHistoryIndex 58494359 0
StorageHistoryIndex 58494359 0
LogIndex 58494359 0
CallTraces 58494359 58494359
TxLookup 58494359 0
Finish 58494359 0
--
prune distance:

blocks.v2: false, blocks=0, segments=0, indices=0
blocks.bor.v2: segments=0, indices=0

history.v3: false, idx steps: 0.00, lastBlockInSnap=0, TxNums_Index(0,1)

sequence: EthTx=4274791252, NonCanonicalTx=1534519

in db: first header 1, last header 58543547, first body 1, last body 58543547
--
/ $ integration --chain bor-mainnet --datadir /data --bor.heimdall http://heimdallrest stage_headers --unwind=10
INFO[06-24|09:47:11.968] logging to file system log dir=/data/logs file prefix=integration log level=info json=false
INFO[06-24|09:47:11.974] [db] open lable=chaindata sizeLimit=12TB pageSize=16384
INFO[06-24|09:47:12.031] Opening Database label=bor path=/data/bor
INFO[06-24|09:47:32.770] TruncateBlocks block=58498042
INFO[06-24|09:47:52.769] TruncateBlocks block=58501711
INFO[06-24|09:48:12.785] TruncateBlocks block=58505520
INFO[06-24|09:48:32.773] TruncateBlocks block=58509740
INFO[06-24|09:48:52.771] TruncateBlocks block=58513827
INFO[06-24|09:49:12.772] TruncateBlocks block=58517661
INFO[06-24|09:49:32.778] TruncateBlocks block=58522270
INFO[06-24|09:49:52.769] TruncateBlocks block=58526813
INFO[06-24|09:50:12.774] TruncateBlocks block=58530811
INFO[06-24|09:50:32.770] TruncateBlocks block=58534131
INFO[06-24|09:50:52.770] TruncateBlocks block=58537614
INFO[06-24|09:51:12.772] TruncateBlocks block=58540927
INFO[06-24|09:51:30.842] Progress headers=58494409
/ $ integration --chain bor-mainnet --datadir /data --bor.heimdall http://heimdallrest print_stages
INFO[06-24|09:51:42.270] logging to file system log dir=/data/logs file prefix=integration log level=info json=false
INFO[06-24|09:51:42.276] [db] open lable=chaindata sizeLimit=12TB pageSize=16384
Note: prune_at doesn't mean 'all data before were deleted' - it just mean stage.Prune function were run to this block. Because 1 stage may prune multiple data types to different prune distance.

stage_at prune_at
Snapshots 58494359 0
Headers 58494409 0
BorHeimdall 58494389 0
BlockHashes 58494419 0
Bodies 58494409 0
Senders 58494419 0
Execution 58494389 58494419
Translation 0 0
HashState 58494389 0
IntermediateHashes 58494359 58494359
AccountHistoryIndex 58494359 0
StorageHistoryIndex 58494359 0
LogIndex 58494359 0
CallTraces 58494359 58494359
TxLookup 58494359 0
Finish 58494359 0
--
prune distance:

blocks.v2: false, blocks=0, segments=0, indices=0
blocks.bor.v2: segments=0, indices=0

history.v3: false, idx steps: 0.00, lastBlockInSnap=0, TxNums_Index(0,1)

sequence: EthTx=4274791252, NonCanonicalTx=1534519

in db: first header 1, last header 58494409, first body 1, last body 58494409