2

I've been running a synced geth full node for months without problems.

Today I suddenly got an issue. Geth starts, but gets stuck after printing into log this line:

Allocated cache and file handles

I removed the "LOCK" file before starting again, as suggested here:

geth reports nothing after allocating cache and handles

but that didn't do the trick.

I also cleared the "ethash" directory.

I really would not like to remove the whole chaindata, since fetching the whole eth blockchain from the rest of the network takes months..!

Would clearing the triecache maybe help..? Am I supposed to do that?

Help!

P. S. A related ticket I issued: https://github.com/ethereum/go-ethereum/issues/22440

EDIT

I ran again with the flag

--verbosity 4

Here is the output

INFO [03-05|19:55:50.856] Starting Geth on Ethereum mainnet...
DEBUG[03-05|19:55:50.856] Sanitizing Go's GC trigger               percent=50
INFO [03-05|19:55:50.857] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-05|19:55:50.857] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
DEBUG[03-05|19:55:50.857] FS scan times                            list="483.117µs" set="4.016µs" diff="2.88µs"
INFO [03-05|19:55:50.861] Set global gas cap                       cap=25000000
INFO [03-05|19:55:50.861] Allocated trie memory caches             clean=511.00MiB dirty=512.00MiB
INFO [03-05|19:55:50.861] Allocated cache and file handles         database=/home/sampsa/.ethereum/geth/chaindata cache=1024.00MiB handles=524288

EDIT 2

Ok.. waiting for a while reveals a segfault:

maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.556] Starting Geth on Ethereum mainnet...
maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.559] Maximum peer count                       ETH=50 LES=0 total=50
maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.560] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
maalis 05 23:20:00 sampsa-asus systemd[1190]: Started Ethereum go client.
maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.561] Set global gas cap                       cap=25000000
maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.561] Allocated trie memory caches             clean=307.00MiB dirty=512.00MiB
maalis 05 23:20:00 sampsa-asus geth[1221]: INFO [03-05|23:20:00.561] Allocated cache and file handles         database=/home/sampsa/.ethereum/geth/chaindata cache=1024.00MiB handles=2048
maalis 05 23:20:05 sampsa-asus geth[1221]: INFO [03-05|23:20:05.065] Opened ancient database                  database=/home/sampsa/.ethereum/geth/chaindata/ancient
maalis 05 23:20:05 sampsa-asus geth[1221]: INFO [03-05|23:20:05.534] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000 Petersburg: 7280000 Istanbul: 9069000, Muir Glacier: 9200000, Berlin: <nil>, YOLO v3: <nil>, Engine: ethash}"
maalis 05 23:20:11 sampsa-asus geth[1221]: INFO [03-05|23:20:11.885] Disk storage enabled for ethash caches   dir=/home/sampsa/.ethereum/geth/ethash count=3
maalis 05 23:20:11 sampsa-asus geth[1221]: INFO [03-05|23:20:11.885] Disk storage enabled for ethash DAGs     dir=/home/sampsa/.ethash               count=2
maalis 05 23:20:12 sampsa-asus geth[1221]: INFO [03-05|23:20:12.196] Initialising Ethereum protocol           network=1 dbversion=8
maalis 05 23:20:12 sampsa-asus geth[1221]: WARN [03-05|23:20:12.536] Head block missing, resetting chain      hash="77dc58…65f04a"
maalis 05 23:20:12 sampsa-asus geth[1221]: panic: runtime error: invalid memory address or nil pointer dereference
maalis 05 23:20:12 sampsa-asus geth[1221]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9eb734]
maalis 05 23:20:12 sampsa-asus geth[1221]: goroutine 1 [running]:
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core/types.(*Block).NumberU64(...)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/types/block.go:312
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.(*BlockChain).SetHeadBeyondRoot(0xc0000af900, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:606 +0x1f4
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.(*BlockChain).SetHead(0xc0000af900, 0x0, 0xc0001c67e0, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:480 +0x45
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.(*BlockChain).ResetWithGenesisBlock(0xc0000af900, 0xc0001ac120, 0x0, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:708 +0x65
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.(*BlockChain).Reset(0xc0000af900, 0x1399f79, 0x23)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:701 +0x37
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.(*BlockChain).loadLastState(0xc0000af900, 0x1344000, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:435 +0x13fc
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/core.NewBlockChain(0x15b4ec0, 0xc000184620, 0xc0066c94a0, 0x1e7b6e0, 0x15b20c0, 0xc0001c6620, 0x0, 0x0, 0x0, 0x0, ...)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/core/blockchain.go:280 +0x765
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/eth.New(0xc00019cd00, 0xc000437500, 0xc00002e178, 0xc00020aba0, 0xbf1cf0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/eth/backend.go:186 +0xbda
maalis 05 23:20:12 sampsa-asus geth[1221]: github.com/ethereum/go-ethereum/cmd/utils.RegisterEthService(0xc00019cd00, 0xc000437500, 0xf, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/cmd/utils/flags.go:1677 +0x20f
maalis 05 23:20:12 sampsa-asus geth[1221]: main.makeFullNode(0xc0001a02c0, 0x13728bb, 0xc000010020, 0xc000167d40)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/cmd/geth/config.go:146 +0x145
maalis 05 23:20:12 sampsa-asus geth[1221]: main.geth(0xc0001a02c0, 0x0, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/cmd/geth/main.go:339 +0xf4
maalis 05 23:20:12 sampsa-asus geth[1221]: gopkg.in/urfave/cli%2ev1.HandleAction(0x1191200, 0x144f2f0, 0xc0001a02c0, 0xc00007c780, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         gopkg.in/urfave/cli.v1@v1.20.0/app.go:490 +0x82
maalis 05 23:20:12 sampsa-asus geth[1221]: gopkg.in/urfave/cli%2ev1.(*App).Run(0xc00009c340, 0xc0000320a0, 0x5, 0x5, 0x0, 0x0)
maalis 05 23:20:12 sampsa-asus geth[1221]:         gopkg.in/urfave/cli.v1@v1.20.0/app.go:264 +0x5f5
maalis 05 23:20:12 sampsa-asus geth[1221]: main.main()
maalis 05 23:20:12 sampsa-asus geth[1221]:         github.com/ethereum/go-ethereum/cmd/geth/main.go:260 +0x55
maalis 05 23:20:12 sampsa-asus systemd[1190]: geth.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
maalis 05 23:20:12 sampsa-asus systemd[1190]: geth.service: Failed with result 'exit-code'.
2
  • Can you try starting geth with extra log output? add --verbosity 4 to geth command line. – Ismael Mar 5 at 14:19
  • 1
    Thanks for the reply. Please see the updated question. – El Sampsa Mar 5 at 18:00
0

recoved .ethereum folder from a backup disk which solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.