Skip to content

Panic when there are no pods #727

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

Closed
howardjohn opened this issue Apr 22, 2025 · 0 comments · Fixed by #731
Closed

Panic when there are no pods #727

howardjohn opened this issue Apr 22, 2025 · 0 comments · Fixed by #731
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@howardjohn
Copy link
Contributor

panic: invalid argument to Intn

goroutine 254 [running]:
math/rand.(*Rand).Intn(0x945e60?, 0xc0000007e0?)
        /usr/local/go/src/math/rand/rand.go:180 +0x4c
math/rand.Intn(0x0)
        /usr/local/go/src/math/rand/rand.go:464 +0x25
sigs.k8s.io/gateway-api-inference-extension/pkg/epp/handlers.GetRandomPod({0x252f350?, 0xc0006ee000?})
        /src/pkg/epp/handlers/server.go:452 +0x34
sigs.k8s.io/gateway-api-inference-extension/pkg/epp/handlers.(*StreamingServer).HandleRequestHeaders(0xc0007bd9c0, {0x0?, 0x0?}, 0xc000b958c0, 0xc0006ae118)
        /src/pkg/epp/handlers/request.go:140 +0x78
sigs.k8s.io/gateway-api-inference-extension/pkg/epp/handlers.(*StreamingServer).Process(0xc0007bd9c0, {0x2526288, 0xc00090eba0})
        /src/pkg/epp/handlers/server.go:161 +0x3d7
github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3._ExternalProcessor_Process_Handler({0x1f96f40?, 0xc0007bd9c0}, {0x2521598, 0xc0000007e0})
        /go/pkg/mod/github.com/envoyproxy/go-control-plane/[email protected]/service/ext_proc/v3/external_processor_grpc.pb.go:106 +0xd8
google.golang.org/grpc.(*Server).processStreamingRPC(0xc000253000, {0x251a070, 0xc00090bc20}, 0xc000a86b40, 0xc00082faa0, 0x37c80e0, 0x0)
        /go/pkg/mod/google.golang.org/[email protected]/server.go:1695 +0x1252
google.golang.org/grpc.(*Server).handleStream(0xc000253000, {0x251ab10, 0xc000830340}, 0xc000a86b40)
        /go/pkg/mod/google.golang.org/[email protected]/server.go:1819 +0xb47
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /go/pkg/mod/google.golang.org/[email protected]/server.go:1035 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 253
        /go/pkg/mod/google.golang.org/[email protected]/server.go:1046 +0x11d

Looks like we don't handle the case of there being no pods available

@howardjohn howardjohn added the kind/bug Categorizes issue or PR as related to a bug. label Apr 22, 2025
@danehans danehans self-assigned this Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants