Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: invalid memory address or nil pointer dereference [core/rawdb.(*ResettableFreezer).AncientRange] #2141

Closed
rori4 opened this issue Jan 8, 2024 · 7 comments
Assignees

Comments

@rori4
Copy link

rori4 commented Jan 8, 2024

System information

Geth version: 1.3.6
OS & Version: linux
Commit hash : the one with tag 1.3.6

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

Config

    command:
      - --datadir=/data
      - --maxpeers=400
      - --history.transactions=0
      - --syncmode=full
      - --tries-verify-mode=local
      - --pruneancient
      - --db.engine=pebble
      - --state.scheme=path
      - --verbosity=5
      - --http
      - --http.api=eth,net,web3,engine,admin,txpool,debug
      - --http.addr=0.0.0.0
      - --http.vhosts=*
      - --http.corsdomain=*
      - --ws
      - --ws.origins=*
      - --ws.addr=0.0.0.0
      - --ws.api=eth,net,web3
      - --metrics
      - --metrics.addr=0.0.0.0
      - --graphql
      - --graphql.corsdomain=*
      - --graphql.vhosts=*
      - --txpool.globalslots=1000000
      - --txpool.accountslots=128
      - --txpool.accountqueue=512
      - --txpool.globalqueue=500000
      - --txpool.lifetime=1h0m0s
      - --rpc.gascap=600000000
      - --rpc.allow-unprotected-txs

Backtrace

INFO [01-08|08:58:10.935] Starting Geth on BSC mainnet... 
INFO [01-08|08:58:10.935] Bumping default cache on mainnet         provided=1024 updated=4096
INFO [01-08|08:58:10.937] Maximum peer count                       ETH=400 LES=0 total=400
INFO [01-08|08:58:10.939] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [01-08|08:58:10.939] Using pebble as db engine 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xcc98bc]

goroutine 1 [running]:
github.com/ethereum/go-ethereum/core/rawdb.(*ResettableFreezer).AncientRange(0xcf6d80?, {0x28da2aa?, 0xc012d31528?}, 0xc012d31628?, 0x24894a0?, 0xc0013ea420?)
        github.com/ethereum/go-ethereum/core/rawdb/freezer_resettable.go:125 +0x5c
github.com/ethereum/go-ethereum/core/rawdb.ReadStateHistoryMetaList(...)
        github.com/ethereum/go-ethereum/core/rawdb/accessors_state.go:180
github.com/ethereum/go-ethereum/trie/triedb/pathdb.checkHistories(0x0, 0x30df4372835869b1?, 0x28e5b82e277b2a1d?, 0xc001d33750)
        github.com/ethereum/go-ethereum/trie/triedb/pathdb/history.go:548 +0x85
github.com/ethereum/go-ethereum/trie/triedb/pathdb.(*Database).Recoverable(0xc0152f2910, {0xee, 0x97, 0xa8, 0x33, 0xe4, 0x27, 0x9a, 0x26, 0xb1, ...})
        github.com/ethereum/go-ethereum/trie/triedb/pathdb/database.go:363 +0x205
github.com/ethereum/go-ethereum/trie.(*Database).Recoverable(0x7ff36fd20d58?, {0xee, 0x97, 0xa8, 0x33, 0xe4, 0x27, 0x9a, 0x26, 0xb1, ...})
        github.com/ethereum/go-ethereum/trie/database.go:320 +0x45
github.com/ethereum/go-ethereum/core.NewBlockChain({0x3369e18?, 0xc001b1a0c0}, 0x0?, 0x17bf4c997feb26dd?, 0xb0285b260564f09f?, {0x3358c00?, 0xc001a6ee00?}, {{0x0, 0x0}, 0x0, ...}, ...)
        github.com/ethereum/go-ethereum/core/blockchain.go:403 +0x14b0
github.com/ethereum/go-ethereum/eth.New(0xc0006fac40, 0xc0013bd000)
        github.com/ethereum/go-ethereum/eth/backend.go:252 +0x170f
github.com/ethereum/go-ethereum/cmd/utils.RegisterEthService(0x0?, 0xc0013bd000)
        github.com/ethereum/go-ethereum/cmd/utils/flags.go:2155 +0x167
main.makeFullNode(0xc001c3fbf0?)
        github.com/ethereum/go-ethereum/cmd/geth/config.go:175 +0x255
main.geth(0xc001574100)
        github.com/ethereum/go-ethereum/cmd/geth/main.go:341 +0xf3
github.com/urfave/cli/v2.(*Command).Run(0xc0012beb00, 0xc001574100, {0xc000226000, 0x21, 0x24})
        github.com/urfave/cli/v2@v2.25.7/command.go:274 +0x9eb
github.com/urfave/cli/v2.(*App).RunContext(0xc0006f45a0, {0x3342750?, 0xc000228000}, {0xc000226000, 0x21, 0x24})
        github.com/urfave/cli/v2@v2.25.7/app.go:332 +0x616
github.com/urfave/cli/v2.(*App).Run(...)
        github.com/urfave/cli/v2@v2.25.7/app.go:309
main.main()
        github.com/ethereum/go-ethereum/cmd/geth/main.go:284 +0x47

From rest bsc.log.date

t=2024-01-08T09:02:59+0000 lvl=info msg="Using pebble as the backing database"
t=2024-01-08T09:02:59+0000 lvl=info msg="Allocated cache and file handles"     database=/data/geth/chaindata cache="1.60 GiB" handles=524,288 "memory table"="409.50 MiB"
t=2024-01-08T09:02:59+0000 lvl=info msg="Found legacy ancient chain path"      location=/data/geth/chaindata/ancient
t=2024-01-08T09:02:59+0000 lvl=info msg="Opened ancient database"              database=/data/geth/chaindata/ancient readonly=false frozen=34,956,222
t=2024-01-08T09:02:59+0000 lvl=info msg="State scheme set by user"             scheme=path
t=2024-01-08T09:02:59+0000 lvl=info msg="Freezer shutting down"
t=2024-01-08T09:02:59+0000 lvl=info msg="Set global gas cap"                   cap=600,000,000
t=2024-01-08T09:02:59+0000 lvl=info msg="Initializing the KZG library"         backend=gokzg
t=2024-01-08T09:02:59+0000 lvl=info msg="Capped dirty cache size"              provided="1024.00 MiB" adjusted="256.00 MiB"
t=2024-01-08T09:02:59+0000 lvl=info msg="Clean cache size"                     provided="614.00 MiB"
t=2024-01-08T09:02:59+0000 lvl=info msg="Allocated trie memory caches"         clean="614.00 MiB" dirty="256.00 MiB"
t=2024-01-08T09:02:59+0000 lvl=info msg="Using pebble as the backing database"
t=2024-01-08T09:02:59+0000 lvl=info msg="Allocated cache and file handles"     database=/data/geth/chaindata         cache="1.60 GiB" handles=524,288 "memory table"="409.50 MiB"
t=2024-01-08T09:02:59+0000 lvl=info msg="Found legacy ancient chain path"      location=/data/geth/chaindata/ancient
t=2024-01-08T09:02:59+0000 lvl=info msg="Read ancientdb item counts"           items=0
t=2024-01-08T09:02:59+0000 lvl=info msg="Opened ancientdb with nodata mode"    database=/data/geth/chaindata/ancient frozen=34,956,222
t=2024-01-08T09:02:59+0000 lvl=info msg="Unprotected transactions allowed"
t=2024-01-08T09:02:59+0000 lvl=info msg="Initialising Ethereum protocol"       network=56 dbversion=8
t=2024-01-08T09:03:00+0000 lvl=info msg="Failed to load journal, discard it"   err="unmatched journal want 78613cbdd4e717c232ffcc39626c918b4f47842531d0e1d48b75ac00c9d96aa1 got d8b3d92c5f1dc8b7a5e0f7460226ecc4acd41450a681236928c785d0004cad5f"
t=2024-01-08T09:03:00+0000 lvl=info msg="new async node buffer"                limit="256.00 MiB" layers=0
t=2024-01-08T09:03:00+0000 lvl=warn msg="Path-based state scheme is an experimental feature" sync=false
t=2024-01-08T09:03:00+0000 lvl=info msg="Initialised chain configuration"      config="{ChainID: 56 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Berlin: 31302048, YOLO v3: <nil>, CatalystBlock: <nil>, London: 31302048, ArrowGlacier: <nil>, MergeFork:<nil>, Euler: 18907621, Gibbs: 23846001, Nano: 21962149, Moran: 22107423, Planck: 27281024,Luban: 29020050, Plato: 30720096, Hertz: 31302048, Hertzfix: 34140700, ShanghaiTime: 1705996800, KeplerTime: 1705996800, Engine: parlia}"
t=2024-01-08T09:03:00+0000 lvl=info msg="Loaded most recent local block"       number=35,046,221 hash=0x544edcd89410f20517f40d184ce9b81d2621563c2879fdf6b39578d41bfe7539 root=0x55dfef00bedd662df7be8d930786066e375a53b489b3e7bd56e8a392fbb34d3b td=69,626,899 age=12h7m24s
t=2024-01-08T09:03:00+0000 lvl=info msg="Loaded most recent local finalized block" number=35,046,219 hash=0x63d53e98e7fbc1df3511abb83e61fc2dff97ff8759fe5fdd67399aea984562dd root=0x73cff29d0a21724e4a270845faf6e06e864c6d887376187f5e3b1fdbb588fd38 td=69,626,896 age=12h7m30s
t=2024-01-08T09:03:00+0000 lvl=info msg="Loaded last snap-sync pivot marker"   number=34,580,824

@rori4
Copy link
Author

rori4 commented Jan 8, 2024

Probably related to #2131

@sysvm
Copy link
Contributor

sysvm commented Jan 8, 2024

Thanks for reporting, I'm solving this problem. BTW, you got panic when running geth immediately or for some time?

@rori4
Copy link
Author

rori4 commented Jan 9, 2024

Thanks for reporting, I'm solving this problem. BTW, you got panic when running geth immediately or for some time?

it was after some time

@sysvm
Copy link
Contributor

sysvm commented Jan 11, 2024

@rori4 Which snapshot do you use? Do you do any operations before panic happens, such as restart geth?

@rori4
Copy link
Author

rori4 commented Jan 11, 2024

@rori4 Which snapshot do you use? Do you do any operations before panic happens, such as restart geth?

@sysvm I think I might have restarted geth a couple of times before I set the config properly but it started erroring after some time. I used this snapshot https://snapshots.48.club/geth.pbss.34908794.tar.zst

Btw I switched to 1.3.5 with the same snapshot and config and I have no issues with it

@sysvm
Copy link
Contributor

sysvm commented Jan 12, 2024

Do you switch syncmode=full to syncmode=snap?

@rori4
Copy link
Author

rori4 commented Jan 16, 2024

Do you switch syncmode=full to syncmode=snap?

I've always used full mode

@sysvm sysvm closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants