Giter Site home page Giter Site logo

Comments (5)

Bolodya1997 avatar Bolodya1997 commented on July 19, 2024

Tried to run NSM without any grpcfd either in networkservice or in registry chains. Almost no leaks for 3 days running setup.
nsmgr-b6r9b.pb.gz
So it keeps looking like the cause of the leaks is somewhere in grpcfd.

In inuse_objects sample I can see registry server.Find leaks in spanlogger, there is already an issue for this - networkservicemesh/sdk#1085.

In inuse_space sample there is a possible leak in gRPC transport.NewBufWriter (~1Mb), but there are only 17 objects, so it can be a normal behavior, needs to be further monitored.

from cmd-nsmgr.

edwarnicke avatar edwarnicke commented on July 19, 2024

@Bolodya1997 grpcfd should be cleaning up after open file descriptors on connection close

https://github.com/edwarnicke/grpcfd/blob/aa90c1562fb36d3f274db049354d6a1e76fd325a/connwrap.go#L102-L122

from cmd-nsmgr.

edwarnicke avatar edwarnicke commented on July 19, 2024

@Bolodya1997 in recvfd we are caching files and closing them when the client Connection closes: https://github.com/networkservicemesh/sdk/blob/204761283a51aa10efcf3d994c36c74b50355e26/pkg/networkservice/common/mechanisms/recvfd/client.go#L88-L94

But we appear to be neglecting to do so on the server side:

https://github.com/networkservicemesh/sdk/blob/204761283a51aa10efcf3d994c36c74b50355e26/pkg/networkservice/common/mechanisms/recvfd/server.go#L80-L109

In principle on the Server side once https://github.com/networkservicemesh/sdk/blob/204761283a51aa10efcf3d994c36c74b50355e26/pkg/networkservice/common/mechanisms/recvfd/server.go#L92 happens the files should eventually get closed due to finalization by the garbage collector... but explicit is better than implicit.

from cmd-nsmgr.

Bolodya1997 avatar Bolodya1997 commented on July 19, 2024

@edwarnicke
There was an issue with finalizer, fixed it - edwarnicke/grpcfd#19.

from cmd-nsmgr.

edwarnicke avatar edwarnicke commented on July 19, 2024

@Bolodya1997 And released in https://github.com/edwarnicke/grpcfd/releases/tag/v0.1.1 :) Many thanks :)

from cmd-nsmgr.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.