erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.15k stars 1.13k forks source link

Crash - invalid memory address or nil pointer dereference #12858

Open keithchew opened 1 day ago

keithchew commented 1 day ago

Running on v2.60.9, just encountered this.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x137db7b]

goroutine 3873 [running]:
github.com/ledgerwatch/erigon-lib/txpool.(*TxPool).flushLocked(0xc000f8f688, {0x32223c0, 0xc17fdbe1e0})
        github.com/ledgerwatch/erigon-lib@v1.0.0/txpool/pool.go:1991 +0x9b
github.com/ledgerwatch/erigon-lib/txpool.(*TxPool).flushNoFsync.func1({0x32223c0, 0xc17fdbe1e0})
        github.com/ledgerwatch/erigon-lib@v1.0.0/txpool/pool.go:1947 +0x45
github.com/ledgerwatch/erigon-lib/kv/mdbx.(*MdbxKV).UpdateNosync(0x444e78?, {0x31ebc08?, 0xc0016a4190?}, 0xc17d44dbe0)
        github.com/ledgerwatch/erigon-lib@v1.0.0/kv/mdbx/kv_mdbx.go:922 +0xa6
github.com/ledgerwatch/erigon-lib/txpool.(*TxPool).flushNoFsync(0xc000f8f688, {0x31ebc08, 0xc0016a4190}, {0x3202a90, 0xc0e6677900})
        github.com/ledgerwatch/erigon-lib@v1.0.0/txpool/pool.go:1946 +0x159
github.com/ledgerwatch/erigon-lib/txpool.(*TxPool).flush(0xc000f8f688, {0x31ebc08, 0xc0016a4190}, {0x3202a90, 0xc0e6677900})
        github.com/ledgerwatch/erigon-lib@v1.0.0/txpool/pool.go:1966 +0xe5
github.com/ledgerwatch/erigon-lib/txpool.MainLoop({0x31ebc08, 0xc0016a4190}, {0x3202a90, 0xc0e6677900}, 0xc000f8f688, 0xc0edd384e0, 0xc0edd19400, 0xc0ed32e900, 0xc0edd176f0)
        github.com/ledgerwatch/erigon-lib@v1.0.0/txpool/pool.go:1809 +0x49e
created by github.com/ledgerwatch/erigon/eth.New in goroutine 1
        github.com/ledgerwatch/erigon/eth/backend.go:742 +0x3e48

I have removed the data/txpool folder and restarted erigon. Will keep an eye out if it happens again.