invalid memory address or nil pointer dereference
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
Hello,
when i am trying to test manager/state/raft/transport, it fails with :
- go test -buildmode pie -compiler gc -ldflags '-X github.com/docker/swarmkit/version.GitSHA=46ee581f6d737743802fc680d1ba9a7cf0d1465d -extldflags '''-Wl,-z,relro ''''
time="2018-01-31T12:45:15+01:00" level=error msg="error streaming message to peer" error="rpc error: code = ResourceExhausted desc = trying to send message larger than max (4194309 vs. 4194304)"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5584cb1b6e36]
goroutine 101 [running]:
github.com/docker/swarmkit/manager/state/raft/transport.(*mockRaft).StreamRaftMessage(0xc42006c4e0, 0x5584cb937a20, 0xc4200718d0, 0x5584cb932b60, 0xc42006c4e0)
/builddir/build/BUILD/swarmkit-46ee581f6d737743802fc680d1ba9a7cf0d1465d/_build/src/github.com/docker/swarmkit/manager/state/raft/transport/mock_raft_test.go:138 +0x476
github.com/docker/swarmkit/api._Raft_StreamRaftMessage_Handler(0x5584cb5f1c20, 0xc42006c4e0, 0x5584cb936b80, 0xc4201beb40, 0xc4204bcc00, 0xc4204bccc0)
/builddir/build/BUILD/swarmkit-46ee581f6d737743802fc680d1ba9a7cf0d1465d/_build/src/github.com/docker/swarmkit/api/raft.pb.go:963 +0xb4
google.golang.org/grpc.(*Server).processStreamingRPC(0xc4200ea280, 0x5584cb937780, 0xc42006be00, 0xc4209a6500, 0xc42016b260, 0x5584cb9178a0, 0xc420a0a9f0, 0x0, 0x0)
/usr/share/gocode/src/google.golang.org/grpc/server.go:891 +0x945
google.golang.org/grpc.(*Server).handleStream(0xc4200ea280, 0x5584cb937780, 0xc42006be00, 0xc4209a6500, 0xc420a0a9f0)
/usr/share/gocode/src/google.golang.org/grpc/server.go:985 +0x14c3
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc4200181b0, 0xc4200ea280, 0x5584cb937780, 0xc42006be00, 0xc4209a6500)
/usr/share/gocode/src/google.golang.org/grpc/server.go:551 +0xa1
created by google.golang.org/grpc.(*Server).serveStreams.func1
/usr/share/gocode/src/google.golang.org/grpc/server.go:549 +0xa3
exit status 2
thanks you for your help
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the manager/state/raft/transport tests and inspect manager/state/raft/transport/mock_raft_test.go at line 138, where the nil dereference occurs. Trace the oversized-message error through the gRPC stream and determine the expected test behavior. Done means the test completes without a panic while handling the reported ResourceExhausted error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100