Closed mhchia closed 5 years ago
$ ./sharding-p2p-poc & [1] 85116 2018/09/13 16:46:57 Initializing logging reporter 2018/09/13 16:46:57 rpcserver: listening to 127.0.0.1:13000 $ ./sharding-p2p-poc -rpcport=13000 -client getsubshard 2018/09/13 16:47:01 rpcclient:GetSubscribedShard: sending= panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1307d56] goroutine 41 [running]: gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go.SpanFromContext(0x0, 0x0, 0x10b9c84, 0xc420264000) /Users/mhchia/go/src/gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go/gocontext.go:22 +0x26 gx/ipfs/QmcVVHfdyv15GVPk7NrxdWjh2hLVccXnoD8j2tyQShiXJb/go-log.(*eventLogger).SetErr(0xc420492c40, 0x0, 0x0, 0x190b400, 0xc420330070) /Users/mhchia/go/src/gx/ipfs/QmcVVHfdyv15GVPk7NrxdWjh2hLVccXnoD8j2tyQShiXJb/go-log/log.go:232 +0x4d gx/ipfs/QmcVVHfdyv15GVPk7NrxdWjh2hLVccXnoD8j2tyQShiXJb/go-log.(*eventLogger).FinishWithErr(0xc420492c40, 0x0, 0x0, 0x190b400, 0xc420330070) /Users/mhchia/go/src/gx/ipfs/QmcVVHfdyv15GVPk7NrxdWjh2hLVccXnoD8j2tyQShiXJb/go-log/log.go:257 +0x53 main.(*server).GetSubscribedShard(0xc42019e500, 0x19137e0, 0xc4203320c0, 0xc420254040, 0x0, 0x0, 0x0) /Users/mhchia/go/src/github.com/ethresearch/sharding-p2p-poc/rpcserver.go:151 +0x17f github.com/ethresearch/sharding-p2p-poc/pb/rpc._Poc_GetSubscribedShard_Handler(0x16ed060, 0xc42019e500, 0x19137e0, 0xc4203320c0, 0xc4204cc000, 0x0, 0x0, 0x0, 0x0, 0x0) /Users/mhchia/go/src/github.com/ethresearch/sharding-p2p-poc/pb/rpc/rpc.pb.go:653 +0x241 google.golang.org/grpc.(*Server).processUnaryRPC(0xc420530000, 0x1917060, 0xc42033c180, 0xc4201a8200, 0xc420520960, 0x1d3c9e8, 0x0, 0x0, 0x0) /Users/mhchia/go/src/google.golang.org/grpc/server.go:982 +0x4f9 google.golang.org/grpc.(*Server).handleStream(0xc420530000, 0x1917060, 0xc42033c180, 0xc4201a8200, 0x0) /Users/mhchia/go/src/google.golang.org/grpc/server.go:1208 +0x1318 google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc420358020, 0xc420530000, 0x1917060, 0xc42033c180, 0xc4201a8200) /Users/mhchia/go/src/google.golang.org/grpc/server.go:686 +0x9f created by google.golang.org/grpc.(*Server).serveStreams.func1 /Users/mhchia/go/src/google.golang.org/grpc/server.go:684 +0xa1 2018/09/13 16:47:01 rpc error: code = Unavailable desc = transport is closing [1]+ Exit 2 ./sharding-p2p-poc
Reproduce:
$ ./sharding-p2p-poc & $ ./sharding-p2p-poc -rpcport=13000 -client getsubshard
Then the node crashes.
The node who executes RPCServer.AddPeer dies
RPCServer.AddPeer
What is wrong?
Reproduce:
Then the node crashes.