gluster / glusterd2

[DEPRECATED] Glusterd2 is the distributed management framework to be used for GlusterFS.
GNU General Public License v2.0
167 stars 82 forks source link

Failed to start volume #1189

Closed Madhu-1 closed 6 years ago

Madhu-1 commented 6 years ago

Observed behavior

failed to start volume from glustercli, glusterd2 service is going down due to panic, even Recover middleware is also not handling the panic

Expected/desired behavior

volume start should be successful, and middleware should handle panic

Details on how to reproduce (minimal and precise)

Information about the environment:

Other useful information

goroutine 173 [running]: context.propagateCancel(0x0, 0x0, 0x12c7be0, 0xc420b3aac0) /usr/local/go/src/context/context.go:243 +0x26 context.WithCancel(0x0, 0x0, 0x1b5f080, 0xfa5100, 0xc420018ae8) /usr/local/go/src/context/context.go:232 +0x111 github.com/gluster/glusterd2/vendor/golang.org/x/net/context.WithCancel(0x0, 0x0, 0x1b, 0x0, 0x0) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/vendor/golang.org/x/net/context/go17.go:33 +0x35 github.com/gluster/glusterd2/vendor/google.golang.org/grpc.newClientStream(0x0, 0x0, 0x1b3b0c0, 0xc420018900, 0x11db414, 0x1b, 0x0, 0x0, 0x0, 0x0, ...) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/vendor/google.golang.org/grpc/stream.go:161 +0x119 github.com/gluster/glusterd2/vendor/google.golang.org/grpc.invoke(0x0, 0x0, 0x11db414, 0x1b, 0x1095760, 0xc4207672f0, 0x1084ba0, 0xc4200b8c80, 0xc420018900, 0x0, ...) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/vendor/google.golang.org/grpc/call.go:70 +0xa9 github.com/gluster/glusterd2/vendor/google.golang.org/grpc.(ClientConn).Invoke(0xc420018900, 0x0, 0x0, 0x11db414, 0x1b, 0x1095760, 0xc4207672f0, 0x1084ba0, 0xc4200b8c80, 0x0, ...) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/vendor/google.golang.org/grpc/call.go:37 +0x1b3 github.com/gluster/glusterd2/vendor/google.golang.org/grpc.Invoke(0x0, 0x0, 0x11db414, 0x1b, 0x1095760, 0xc4207672f0, 0x1084ba0, 0xc4200b8c80, 0xc420018900, 0x0, ...) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/vendor/google.golang.org/grpc/call.go:60 +0xc1 github.com/gluster/glusterd2/glusterd2/transaction.(txnSvcClient).RunStep(0xc42000ee40, 0x0, 0x0, 0xc4207672f0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc4200cf900) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/glusterd2/transaction/transaction-rpc.pb.go:105 +0xd2 github.com/gluster/glusterd2/glusterd2/transaction.runStepOn(0x0, 0x0, 0x11d9a8d, 0x19, 0xc4206ab5b0, 0x10, 0x10, 0x12da400, 0xc420667410, 0x0, ...) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/glusterd2/transaction/rpc-client.go:70 +0x4c6 github.com/gluster/glusterd2/glusterd2/transaction.runStepFuncOnNode(0x0, 0x0, 0x11d9a8d, 0x19, 0x12da400, 0xc420667410, 0xc4206ab5b0, 0x10, 0x10, 0xc420b87c20) /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/glusterd2/transaction/step.go:142 +0x400 created by github.com/gluster/glusterd2/glusterd2/transaction.runStepFuncOnNodes /home/mrajanna/workspace/heketi_pr/src/github.com/gluster/glusterd2/glusterd2/transaction/step.go:99 +0x160

atinmu commented 6 years ago

@Madhu-1 This sounds very basic. Is it a regression?

Madhu-1 commented 6 years ago

@atinmu it's not a regression, but somehow I hit this issue.

prashanthpai commented 6 years ago

RCA: Although the stack trace points to a code path inside go's built-in context library, the culprit is our undo code path in txn framework which propagated nil context all the way down to the RPC layer. This is handled correctly in the Do path however and hence that's why it wasn't hit easily.