Skip to content

The Node panic by concurrent map iteration&write #2810

@galaio

Description

@galaio

System information

Geth version: v1.5.1
OS & Version: Windows/Linux/OSX
Commit hash : 911c10c, develop branch

Expected behaviour

Node runs as normal.

Actual behaviour

The node panic.
image

Steps to reproduce the behaviour

Replacing the binary, restart the node.

Backtrace

WARN [12-17|06:39:34.369] Option nousb is deprecated and USB is deactivated by default. Use --usb to enable
fatal error: concurrent map iteration and map write

goroutine 4602 [running]:
github.com/ethereum/go-ethereum/triedb/pathdb.(*stateSet).merge(0xc0004cc690, 0xc03c3ba780)
        github.com/ethereum/go-ethereum/triedb/pathdb/states.go:212 +0x9e
github.com/ethereum/go-ethereum/triedb/pathdb.(*buffer).commit(0xc011fe0160, 0xc0c498be18?, 0xc03c3ba780)
        github.com/ethereum/go-ethereum/triedb/pathdb/buffer.go:78 +0x3a
github.com/ethereum/go-ethereum/triedb/pathdb.(*nodecache).commit(...)
        github.com/ethereum/go-ethereum/triedb/pathdb/asyncnodebuffer.go:221
github.com/ethereum/go-ethereum/triedb/pathdb.(*asyncnodebuffer).commit(0xc00078bcb0, 0xc039765ca0, 0xc03c3ba780)
        github.com/ethereum/go-ethereum/triedb/pathdb/asyncnodebuffer.go:79 +0xa6
github.com/ethereum/go-ethereum/triedb/pathdb.(*diskLayer).commit(0xc000451ab0, 0xc055730380, 0x0)
        github.com/ethereum/go-ethereum/triedb/pathdb/disklayer.go:328 +0x202
github.com/ethereum/go-ethereum/triedb/pathdb.diffToDisk(0xc055730380, 0x0)
        github.com/ethereum/go-ethereum/triedb/pathdb/difflayer.go:359 +0x45
github.com/ethereum/go-ethereum/triedb/pathdb.(*diffLayer).persist(0xc055730380, 0x0)
        github.com/ethereum/go-ethereum/triedb/pathdb/difflayer.go:344 +0xad
github.com/ethereum/go-ethereum/triedb/pathdb.(*layerTree).cap(0xc011fe0260, {0x1c, 0x1d, 0x2a, 0xd7, 0x60, 0xfb, 0xf5, 0x79, 0xd8, ...}, ...)
        github.com/ethereum/go-ethereum/triedb/pathdb/layertree.go:185 +0x905
github.com/ethereum/go-ethereum/triedb/pathdb.(*Database).Update(0xc011a16be0, {0x1c, 0x1d, 0x2a, 0xd7, 0x60, 0xfb, 0xf5, 0x79, 0xd8, ...}, ...)
        github.com/ethereum/go-ethereum/triedb/pathdb/database.go:318 +0x1a6
github.com/ethereum/go-ethereum/triedb.(*Database).Update(0xc01161ade0?, {0x1c, 0x1d, 0x2a, 0xd7, 0x60, 0xfb, 0xf5, 0x79, 0xd8, ...}, ...)
        github.com/ethereum/go-ethereum/triedb/database.go:196 +0x115
github.com/ethereum/go-ethereum/core/state.(*StateDB).commitAndFlush(0xc059780000, 0x2c14fa2, 0x1?)
        github.com/ethereum/go-ethereum/core/state/statedb.go:1475 +0x5de
github.com/ethereum/go-ethereum/core/state.(*StateDB).Commit(0xc0004b7400?, 0x2c14fa1?, 0x0?)
        github.com/ethereum/go-ethereum/core/state/statedb.go:1495 +0x1f
github.com/ethereum/go-ethereum/core.(*BlockChain).writeBlockWithState(0xc000573708, 0xc08c101340, {0xc01fa72000, 0x22, 0x40}, 0xc059780000)
        github.com/ethereum/go-ethereum/core/blockchain.go:1792 +0x609
github.com/ethereum/go-ethereum/core.(*BlockChain).writeBlockAndSetHead(0xc000573708, 0xc08c101340, {0xc01fa72000, 0x22, 0x40}, {0xc032974388, 0x4a, 0x6f}, 0xc059780000, 0x0)
        github.com/ethereum/go-ethereum/core/blockchain.go:1911 +0x165
github.com/ethereum/go-ethereum/core.(*BlockChain).processBlock(0xc000573708, 0xc08c101340, 0xc059780000, {0x0?, 0x35a9d50?, 0x4f95d20?}, 0x1, 0xc051bfc360)
        github.com/ethereum/go-ethereum/core/blockchain.go:2449 +0x106e
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc000573708, {0xc017697008, 0x800, 0x800}, 0x1, 0x0)
        github.com/ethereum/go-ethereum/core/blockchain.go:2259 +0x22e9
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc000573708, {0xc017697008, 0x800, 0x800})
        github.com/ethereum/go-ethereum/core/blockchain.go:2009 +0xb59
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc0005b3080, {0xc017692808, 0x800, 0x28421b0?})
        github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1373 +0x6a4
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc0005b3080, 0x4cb24ba1d3dd9b03?, 0xa2?)
        github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1342 +0xaf
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer.func8()
        github.com/ethereum/go-ethereum/eth/downloader/downloader.go:595 +0x1f
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1()
        github.com/ethereum/go-ethereum/eth/downloader/downloader.go:608 +0x66
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync in goroutine 4696
        github.com/ethereum/go-ethereum/eth/downloader/downloader.go:608 +0x6e

goroutine 1 [chan receive, 39 minutes]:
github.com/ethereum/go-ethereum/node.(*Node).Wait(...)
        github.com/ethereum/go-ethereum/node/node.go:590
main.geth(0xc00054c880)
        github.com/ethereum/go-ethereum/cmd/geth/main.go:387 +0x17c
github.com/urfave/cli/v2.(*Command).Run(0xc000052420, 0xc00054c880, {0xc000052160, 0x15, 0x16})
        github.com/urfave/cli/v2@v2.26.0/command.go:277 +0x97d
github.com/urfave/cli/v2.(*App).RunContext(0xc000498000, {0x359ee20, 0x5007de0}, {0xc000052160, 0x15, 0x16})
        github.com/urfave/cli/v2@v2.26.0/app.go:335 +0x585

When submitting logs: please submit them as text and not screenshots.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions