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

Panic if actor is called during app startup #566

Open
waeljammal opened this issue May 16, 2024 · 0 comments
Open

Panic if actor is called during app startup #566

waeljammal opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@waeljammal
Copy link

waeljammal commented May 16, 2024

Describe the bug

We have a service that calls another every few seconds, if we restart the service along with dapr on the client being called and the other service makes a request the startup then we get this panic in the sdk.

[app] 6:44PM ERR panic: runtime error: invalid memory address or nil pointer dereference
[app] 6:31PM ERR goroutine 181 [running]: exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*api).CallActor(0x7a28688304055?, {0x1086b9790, 0x14000f02b70}, 0x6646430b?) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/api/grpc/daprinternal.go:285 +0x30 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/proto/internals/v1._ServiceInvocation_CallActor_Handler.func1({0x1086b9790, 0x14000f02b70}, {0x1083dbdc0?, 0x14001136e10}) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/proto/internals/v1/service_invocation_grpc.pb.go:156 +0x74 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*server).getMiddlewareOptions.(*grpcMetrics).UnaryServerInterceptor.func5({0x1086b9790, 0x14000f02b70}, {0x1083dbdc0, 0x14001136e10}, 0x1400057bbe0, 0x140004c9e00) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/diagnostics/grpc_monitoring.go:224 +0x6c exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*server).getMiddlewareOptions.ChainUnaryServer.func11.1({0x1086b9790?, 0x14000f02b70?}, {0x1083dbdc0?, 0x14001136e10?}) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:48 +0x50 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*server).getMiddlewareOptions.GRPCTraceUnaryServerInterceptor.func3({0x1086b9790, 0x14000f02b10}, {0x1083dbdc0, 0x14001136e10}, 0x1400057bbe0, 0x14000b2f980) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/diagnostics/grpc_tracing.go:70 +0x1a4 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*server).getMiddlewareOptions.ChainUnaryServer.func11.1({0x1086b9790?, 0x14000f02b10?}, {0x1083dbdc0?, 0x14001136e10?}) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:48 +0x50 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc/metadata.SetMetadataInContextUnary({0x1086b9790, 0x14000f02ab0}, {0x1083dbdc0, 0x14001136e10}, 0x140004c9e00?, 0x14000b2f9c0) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/api/grpc/metadata/metadata.go:46 +0xa0 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/api/grpc.(*server).getMiddlewareOptions.ChainUnaryServer.func11({0x1086b9790, 0x14000f02ab0}, {0x1083dbdc0, 0x14001136e10}, 0x1400057bbe0, 0x102976278?) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:53 +0x128 exec=dapr level=info
[app] 6:31PM ERR github.com/dapr/dapr/pkg/proto/internals/v1._ServiceInvocation_CallActor_Handler({0x1085f4260?, 0x14001710c80}, {0x1086b9790, 0x14000f02ab0}, 0x140012b2880, 0x1400123eab0) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/work/dapr/dapr/pkg/proto/internals/v1/service_invocation_grpc.pb.go:158 +0x12c exec=dapr level=info
[app] 6:31PM ERR google.golang.org/grpc.(*Server).processUnaryRPC(0x1400124c000, {0x1086b9790, 0x14000f02a20}, {0x1086d9940, 0x14000503a00}, 0x14000f6a000, 0x1400123edb0, 0x10b8834a0, 0x0) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1372 +0xb8c exec=dapr level=info
[app] 6:31PM ERR google.golang.org/grpc.(*Server).handleStream(0x1400124c000, {0x1086d9940, 0x14000503a00}, 0x14000f6a000) exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1783 +0xc4c exec=dapr level=info
[app] 6:31PM ERR google.golang.org/grpc.(*Server).serveStreams.func2.1() exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1016 +0x5c exec=dapr level=info
[app] 6:31PM ERR created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 177 exec=dapr level=info
[app] 6:31PM ERR 	/Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1027 +0x138 exec=dapr level=info

To Reproduce

Create a service using the sdk and register an actor and call Start() on the service, Create a second service that invokes the actor at a high frequency, lets say 2 - 3 seconds now restart the service if the timing is right the sdk should panic.

Expected behavior

I expected that the caller would just get an error back because the service is not ready yet but instead the service crashes.

@waeljammal waeljammal added the bug Something isn't working label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant