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

recvfd server leaks files, memory both in networkservice and registry chains #1089

Closed
Bolodya1997 opened this issue Sep 29, 2021 · 0 comments · Fixed by #1173
Closed

recvfd server leaks files, memory both in networkservice and registry chains #1089

Bolodya1997 opened this issue Sep 29, 2021 · 0 comments · Fixed by #1173
Assignees
Labels
bug Something isn't working

Comments

@Bolodya1997
Copy link

Expected Behavior

recvfd should correctly close all per-Connection / Endpoint data and files on timeout Close.

Current Behavior

recvfd server leaks per-Connection data and files on timeout Close.

Issue in code

In timeout case there is no grpc.Peer in context, so recvfd server doesn't make any cleanup actions.

// Get the grpcfd.FDRecver
recv, ok := grpcfd.FromContext(ctx)
if !ok {
return next.Server(ctx).Close(ctx, conn)
}

Same for expire:

// Get the grpcfd.FDRecver
recv, ok := grpcfd.FromContext(ctx)
if !ok {
return next.NetworkServiceEndpointRegistryServer(ctx).Unregister(ctx, endpoint)
}

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

Successfully merging a pull request may close this issue.

4 participants