memory leak in GRPC client when receiving protobuf messages with multiple variables #6290
Description
A memory leak is being observed in the GRPC client when the protobuf message uses more than one variable.
Example proto message:
message Feature {
// The name of the feature.
string name = 1;
// The point where the feature is detected.
Point location = 2;
}
The helloworld example does not exhibit the memory leak since its protobuf HelloReply message only has one member (message). However, using the route_guide example the leak can easily be seen.
Modify the grpc python example (examples/python/route_guide/route_guide_client.py) run function to continuously call the guide_get_feature(). This can be run against any route_guide server (tested against c++ and python with the same result).
def run():
channel = implementations.insecure_channel('localhost', 50051)
stub = route_guide_pb2.beta_create_RouteGuide_stub(channel)
print("-------------- GetFeature --------------")
while True:
guide_get_feature(stub)
Expectation:
Steady state memory usage.
Actual:
Memory usage continuously grows