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

Segmentation fault in 1.9.0-unstable #19198

Closed
Bobface opened this issue Mar 2, 2019 · 2 comments
Closed

Segmentation fault in 1.9.0-unstable #19198

Bobface opened this issue Mar 2, 2019 · 2 comments

Comments

@Bobface
Copy link

Bobface commented Mar 2, 2019

Command:
geth --syncmode=fast --cache 8192 --ipcpath=/root/gethipc/

Version:

Geth
Version: 1.9.0-unstable
Git Commit: 313576530fe2ca0d37c6ddcdd8441030176c6c61
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.4
Operating System: linux
GOPATH=
GOROOT=/usr/lib/go-1.10

Panic:

INFO [03-01|23:59:32.183] Imported new state entries               count=1536 elapsed=11.154ms  processed=23778463 pending=4757  retry=0   duplicate=2275 unexpected=18109
INFO [03-01|23:59:33.218] Imported new state entries               count=1920 elapsed=13.518ms  processed=23780383 pending=3748  retry=0   duplicate=2275 unexpected=18109
INFO [03-01|23:59:33.334] Imported new block headers               count=1    elapsed=4.961ms   number=7286576 hash=fc6817…438906
INFO [03-01|23:59:33.680] Imported new state entries               count=1920 elapsed=15.010ms  processed=23782303 pending=2392  retry=0   duplicate=2275 unexpected=18109
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6c796a]

goroutine 375 [running]:
github.com/ethereum/go-ethereum/core/types.(*Block).Hash(0x0, 0x0, 0x0, 0x0, 0x0)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/types/block.go:362 +0x4a
github.com/ethereum/go-ethereum/core.(*BlockChain).Rollback(0xc47794c000, 0xc4ba4f0000, 0x800, 0x800)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/blockchain.go:780 +0x43d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processHeaders.func1(0xc42008dd30, 0xc420273d40)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1305 +0x20d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processHeaders(0xc420273d40, 0x6f2f31, 0x6f2514, 0xc479c18e00, 0x117dfe0, 0xc42020f6d0)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1324 +0x123d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer.func6(0x8, 0x10854b0)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:475 +0x49
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1(0xc420273d40, 0xc479e34d20, 0xc479a9bce0)
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:492 +0x59
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
        /mnt/Geth/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:492 +0xaf
@holiman
Copy link
Contributor

holiman commented Mar 12, 2019

https://github.com/ethereum/go-ethereum/blob/master/core/blockchain.go#L780

		if currentFastBlock := bc.CurrentFastBlock(); currentFastBlock.Hash() == hash {
			newFastBlock := bc.GetBlock(currentFastBlock.ParentHash(), currentFastBlock.NumberU64()-1)
			bc.currentFastBlock.Store(newFastBlock)
			rawdb.WriteHeadFastBlockHash(bc.db, newFastBlock.Hash())
}

For some reason, newFastBlock appears to be nil

@holiman
Copy link
Contributor

holiman commented Feb 13, 2020

We think the root cause for issues like this should have been fixed by #20287 . Closing this, please reopen (or open a new ticket) if you hit it again.

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

4 participants