-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
MultiChildLoadBalancer with EquivalentAddressGroup with multiple addresses throws NPE #10768
Comments
I am able to work around this by changing my custom Currently I do this
If, instead of creating a
I assume this work around is still valid, one |
gRPC Java version 1.60.0
What is your environment?
This fails on all our environments, Linux, MacOS etc
What did you expect to see?
We expect the load balancer to work with a single
EquivalentAddressGroup
containing multiple addresses.What did you see instead?
In our client code we receive a
Runtime io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
After debugging the client we tracked it down to this code in the
MultiChildLoadBalancer.Endpoint
constructorYou can see that the code iterates over the addresses in the
eag
and adds thetoString()
of each to the string array. But it does not increment the indexi
so all addresses go to the first array element, the rest are null. This throws an NPE whenArrays.sort()
is called.I assume it should be a trivial fix like
addrs[i++] = address.toString();
The text was updated successfully, but these errors were encountered: