Skip to content

GoPanic after handling inproperly configured function #104

@nce

Description

@nce

We raised the below gopanic during development of a new function. I guess we forgot/didn't set the rsp.Desired.Composite.Ready or have some other weirdness in our function. I'll have to investigate on our end what's really causing this, but still, i think the sequencer shouldn't just die bc/ of that.

I suggest a validation before setting the state, but i wouldn't mind if you close this issue, as it's probably a minor issue for you.

What happened?

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

goroutine 50 [running]:
main.(*Function).RunFunction(0xc0005584f0, {0x17a4520?, 0x1695e764a?}, 0xc0001708c0)
    /fn/fn.go:170 +0x199f
github.com/crossplane/function-sdk-go/proto/v1._FunctionRunnerService_RunFunction_Handler.func1({0x1c35d20?, 0xc00048d170?}, {0x18d9dc0?, 0xc0001708c0?})
    /go/pkg/mod/github.com/crossplane/function-sdk-go@v0.5.0/proto/v1/run_function_grpc.pb.go:130 +0xcb
github.com/crossplane/function-sdk-go.Serve.(*ServerMetrics).UnaryServerInterceptor.UnaryServerInterceptor.func5({0x1c35d20, 0xc00048d170}, {0x18d9dc0, 0xc0001708c0}, 0x41d245?, 0xc000010120)
    /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.3.0/interceptors/server.go:22 +0x275
github.com/crossplane/function-sdk-go/proto/v1._FunctionRunnerService_RunFunction_Handler({0x17a4520, 0xc0005584f0}, {0x1c35d20, 0xc00048d170}, 0xc00024a500, 0xc000010288)
    /go/pkg/mod/github.com/crossplane/function-sdk-go@v0.5.0/proto/v1/run_function_grpc.pb.go:132 +0x143
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00054c908, {0x1c35d20, 0xc0001beff0}, 0xc00024c1a0, 0xc000094ae0, 0x28801f0, 0x0)
    /go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1428 +0x1192
google.golang.org/grpc.(*Server).handleStream(0xc00054c908, {0x1c36648, 0xc00054ab60}, 0xc00024c1a0)
    /go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1832 +0xdc6
google.golang.org/grpc.(*Server).serveStreams.func2.1()
    /go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1063 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 31
    /go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1074 +0x11d

How can we reproduce it?

I'll try to debug what fields we are setting wrong, but can't promise anything.

What environment did it happen in?

Function version: 0.5.0

cloud provider or hardware configuration:

  • Kubernetes version: 135
  • Kubernetes distribution: eks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions