代码之家  ›  专栏  ›  技术社区  ›  Federico Caccia

关闭后尝试同步geth clique客户端时出错

  •  1
  • Federico Caccia  · 技术社区  · 7 年前

    我正在使用geth clique客户端与一个私人网络合作。每次一个节点关闭时(断电后,或只是停止geth进程),如果一个节点试图让它再次工作,该节点将无法同步,并引发运行时错误:

    ERROR[02-01|17:31:27.234] Impossible reorg, please file an issue   oldnum=11495 oldhash=415d9b…c9aa7c newnum=11495 newhash=415d9b…c9aa7c
    TRACE[02-01|17:31:27.236] Findnode failed                          id=b1a7659b8a9da1db failcount=1280  err="RPC timeout"
    ...
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x51163e]
    
    goroutine 305 [running]:
    math/big.(*Int).Cmp(0xc44e55ff40, 0x0, 0xbe6c1acfbb42a6ab)
        /usr/lib/go-1.10/src/math/big/int.go:319 +0x2e
    github.com/ethereum/go-ethereum/core.(*BlockChain).insertSidechain(0xc430d16000, 0xc44fdef650, 0xc420069400, 0xc420069401, 0x1, 0x1, 0xc44fb119cf, 0x1, 0x1, 0xc44d001320, ...)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/core/blockchain.go:1333 +0x1165
    github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc430d16000, 0xc44ebebd50, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/core/blockchain.go:1139 +0x2ee3
    github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc430d16000, 0xc44ebebd50, 0x1, 0x1, 0x0, 0x0, 0x0)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/core/blockchain.go:1088 +0xc46
    github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc4200a2ea0, 0xc44ebebd48, 0x1, 0x1, 0x1, 0x19)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1490 +0x434
    github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc4200a2ea0, 0x0, 0xc431a27f98)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1464 +0x79
    github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).(github.com/ethereum/go-ethereum/eth/downloader.processFullSyncContent)-fm(0xc400000008, 0x1013570)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:479 +0x2a
    github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1(0xc4200a2ea0, 0xc44f7e6900, 0xc44f5c8280)
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:491 +0x59
    created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
        /build/ethereum-BgsY40/ethereum-1.8.21+bionic/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:491 +0xaf
    

    我发现让节点继续运行的唯一方法是删除数据库并再次下载,这显然不是最好的选择。

    有人有同样的问题吗?你是怎么处理的?

    0 回复  |  直到 7 年前
    推荐文章