Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defradb client rpc p2pcollection add panics given valid, existing, schema id #1296

Closed
AndrewSisley opened this issue Apr 5, 2023 · 0 comments · Fixed by #1297
Closed

defradb client rpc p2pcollection add panics given valid, existing, schema id #1296

AndrewSisley opened this issue Apr 5, 2023 · 0 comments · Fixed by #1297
Assignees
Labels
area/cli Related to the CLI binary area/p2p Related to the p2p networking system bug Something isn't working priority/high
Milestone

Comments

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Apr 5, 2023

Command:

defradb client rpc p2pcollection add --url localhost:9182 bafkreiecvusdddryb5itwr5obvodmfbo2645fjdn6uw7ssflpmcchw6nlm

Result (serverside log):

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x129cdbd]

goroutine 611 [running]:
github.com/sourcenetwork/defradb/net/api/pb.(*AddP2PCollectionsReply).MarshalToSizedBuffer(0xc009391648?, {0x29fa798?, 0x15664a0?, 0x16e2a20?})
github.com/sourcenetwork/defradb/net/api/pb/api.pb.go:1348 +0x1d
github.com/sourcenetwork/defradb/net/api/pb.(*AddP2PCollectionsReply).Marshal(0x0)
github.com/sourcenetwork/defradb/net/api/pb/api.pb.go:1335 +0x9f
google.golang.org/protobuf/internal/impl.legacyMarshal({{}, {0x1c49ac8, 0xc000846b10}, {0x0, 0x0, 0x0}, 0x0})
google.golang.org/[email protected]/internal/impl/legacy_message.go:402 +0xa2
google.golang.org/protobuf/proto.MarshalOptions.marshal({{}, 0xb8?, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x1c49ac8, 0xc000846b10})
google.golang.org/[email protected]/proto/encode.go:166 +0x27b
google.golang.org/protobuf/proto.MarshalOptions.MarshalAppend({{}, 0x20?, 0x2a?, 0x6e?}, {0x0, 0x0, 0x0}, {0x1c24920?, 0xc000846b10?})
google.golang.org/[email protected]/proto/encode.go:125 +0x79
github.com/golang/protobuf/proto.marshalAppend({0x0, 0x0, 0x0}, {0x7fbe289fdb10?, 0x0?}, 0x1d?)
github.com/golang/[email protected]/proto/wire.go:40 +0xa5
github.com/golang/protobuf/proto.Marshal(...)
github.com/golang/[email protected]/proto/wire.go:23
google.golang.org/grpc/encoding/proto.codec.Marshal({}, {0x16e2a20, 0x0})
google.golang.org/[email protected]/encoding/proto/proto.go:45 +0x4e
google.golang.org/grpc.encode({0x7fbe100b8b28?, 0x29fa798?}, {0x16e2a20?, 0x0?})
google.golang.org/[email protected]/rpc_util.go:632 +0x44
google.golang.org/grpc.(*Server).sendResponse(0xc001dda000, {0x1c41d80, 0xc0015b9ba0}, 0xc000790c60, {0x16e2a20?, 0x0}, {0x0, 0x0}, 0x7?, {0x0, ...})
google.golang.org/[email protected]/server.go:1108 +0x1b4
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001dda000, {0x1c41d80, 0xc0015b9ba0}, 0xc000790c60, 0xc00751c0f0, 0x2743c08, 0x0)
google.golang.org/[email protected]/server.go:1392 +0xf27
google.golang.org/grpc.(*Server).handleStream(0xc001dda000, {0x1c41d80, 0xc0015b9ba0}, 0xc000790c60, 0x0)
google.golang.org/[email protected]/server.go:1722 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:966 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:964 +0x28a

Critical bug, as the panic actually crashes the server, taking it offline.

The following command was run successfully prior to this:

defradb client schema add '
  type Article {
    content: String
    published: Boolean
  }
'

The schema Id of that collection should be consistent with that used in the broken command.

@AndrewSisley AndrewSisley added bug Something isn't working area/p2p Related to the p2p networking system area/cli Related to the CLI binary labels Apr 5, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.5 milestone Apr 5, 2023
@AndrewSisley AndrewSisley changed the title defradb client rpc p2pcollection add panics given valid schema id defradb client rpc p2pcollection add panics given valid, existing, schema id Apr 5, 2023
@AndrewSisley AndrewSisley self-assigned this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the CLI binary area/p2p Related to the p2p networking system bug Something isn't working priority/high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant