同行崩溃:运行时错误:无效的内存地址或nil指针取消引用

问题描述 投票:1回答:2

很长一段时间以后,每次遇到以下错误,我的同伴都会崩溃高频版本:1.4.2go版本go1.12.6 linux / amd64ubuntu TLS 16.04

free -m
              total        used        free      shared  buff/cache   available
Mem:         257611       11125      151795        2657       94689      241076
Swap:           976           0         976

Peer Logs

2019-11-28 17:29:53.646 UTC [deliveryClient] try -> WARN de55 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:53.829 UTC [deliveryClient] try -> WARN de56 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
2019-11-28 17:29:55.826 UTC [deliveryClient] try -> WARN de57 Got error: rpc error: code = Unavailable desc = transport is closing , at 1 attempt. Retrying in 1s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaed020]

goroutine 136 [running]:
github.com/hyperledger/fabric/protos/gossip.(*SecretEnvelope).InternalEndpoint(0x0, 0x40c4c3, 0x7f849226ddc8)
    /opt/gopath/src/github.com/hyperledger/fabric/protos/gossip/extensions.go:480 +0x40
github.com/hyperledger/fabric/gossip/discovery.newAliveMsgStore.func4(0x1243280, 0xc00254ab10)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/discovery/discovery_impl.go:1032 +0xfd
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expireMessages(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:212 +0x34c
github.com/hyperledger/fabric/gossip/gossip/msgstore.(*messageStoreImpl).expirationRoutine(0xc002656180)
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:253 +0x141
created by github.com/hyperledger/fabric/gossip/gossip/msgstore.NewMessageStoreExpirable
    /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/msgstore/msgs.go:53 +0xb2

chaincode日志

2019/11/27 10:04:13 This complaintno already exists: 1709157484903969657
2019-11-28 17:44:50.198 UTC [shim] chatWithPeer -> ERRO 001 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing
receive failed
github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:362
github.com/hyperledger/fabric/core/chaincode/shim.Start
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:156
main.main
    /chaincode/input/src/github.com/chaincode/complaints/complaintchaincode.go:134
runtime.main
    /opt/go/src/runtime/proc.go:201
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:1333
2019/11/28 17:44:50 Error starting Complaint chaincode: receive failed: rpc error: code = Unavailable desc = transport is closing

我很长一段时间都遇到此错误,但无法调试。

hyperledger-fabric hyperledger hyperledger-chaincode
2个回答
0
投票
您遇到的是在1.4.2中引入的错误,在1.4.3中是fixed

0
投票
[可能有很多原因,但是我经历过一些类似的批评家,他们通过升级docker版本(当然,并重新启动docker服务)解决了这个问题。
© www.soinside.com 2019 - 2024. All rights reserved.