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

Fixed recvfd leaks #1173

Merged
merged 12 commits into from
Dec 7, 2021
Merged

Conversation

sol-0
Copy link
Contributor

@sol-0 sol-0 commented Nov 24, 2021

Signed-off-by: Oleg Solodkov oleg.solodkov@xored.com

Issue link

Fixes #1089

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
@sol-0
Copy link
Contributor Author

sol-0 commented Nov 24, 2021

Hi @edwarnicke , this is an idea for #1089 fix. Could you please share your thoughts?

@sol-0
Copy link
Contributor Author

sol-0 commented Nov 24, 2021

Local integration testing is in-progress.

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
@@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//+build !windows
// +build !windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// +build !windows
// +build linux

Comment on lines 41 to 44
const (
linuxOsName = "linux"
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const (
linuxOsName = "linux"
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was required by golangci-lint

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just don't check on OS name. See at first comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Thanks, Denis!

@@ -160,3 +164,49 @@ func Test_MultiForwarderSendfd(t *testing.T) {
require.NoError(t, err)
require.Equal(t, 1, counter.Closes())
}

func Test_TimeoutRecvfd(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain how this test checks the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client makes a request with an expired token thus triggering timeout (timeoutserver).

Copy link
Member

@denis-tingaikin denis-tingaikin Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is incorrect.

  1. Refresh was not disabled. So token can no be expired.
  2. We need to verify that all files are removed.

Please add test for recvfd package.

Also, I think we do not need to use sandbox here. Because we simply need to check cleaning and sandbox is overkilled thing for it.

@@ -107,3 +110,15 @@ func (r *recvFDServer) Close(ctx context.Context, conn *networkservice.Connectio
err = swapFileToInode(fileMap, conn.GetMechanism().GetParameters(), true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
err = swapFileToInode(fileMap, conn.GetMechanism().GetParameters(), true)
err = swapFileToInode(fileMap, conn.GetMechanism().GetParameters())

// Get the grpcfd.FDRecver
recv, ok := grpcfd.FromContext(ctx)
if !ok {
r.closeFiles(conn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
r.closeFiles(conn)

@@ -78,18 +78,21 @@ func (r *recvFDServer) Request(ctx context.Context, request *networkservice.Netw
}

func (r *recvFDServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
// Clean up the fileMap no matter what happens
defer r.fileMaps.Delete(conn.GetId())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defer r.fileMaps.Delete(conn.GetId())
defer r.closeFiles(conn)

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
@@ -14,13 +14,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows
// +build linux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the switch to only linux? This precludes testing on the Mac OS... what was the driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Ed!

This was a code change suggested during review and I somehow missed that it would remove tests for MacOS.
I'm going to revert this back to !windows.

@denis-tingaikin , please, share your thoughts in case you have any objections.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwarnicke This tag was incorrect. All tests actually check OS name on linux. So I suggested just changing the build tag instead of using skip on non-linux os names in tests...

Copy link
Contributor Author

@sol-0 sol-0 Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwarnicke @denis-tingaikin , I'll check the tests with !windows on MacOS (with removed OS name check)

Copy link
Member

@denis-tingaikin denis-tingaikin Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sol-0 Please do not use !windows with removed OS name check. Note: these tests are testing grpcfd library. The library required linux...

FYI: Tests will work, but for MacOS they will not make sense because we are using null server/clients instead of server/clients based on grpcfd for non-linux systems...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denis-tingaikin , ok, thanks, Denis! I'll revert the change.

Copy link
Member

@denis-tingaikin denis-tingaikin Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See at an example of implementation grpcfd based chain element for non-linux systems

return null.NewNetworkServiceEndpointRegistryClient()

@@ -86,7 +86,7 @@ func recvFDAndSwapInodeToFile(ctx context.Context, fileMap *perConnectionFileMap
return err
}

func swapFileToInode(fileMap *perConnectionFileMap, parameters map[string]string, closeAllFiles bool) error {
func swapFileToInode(fileMap *perConnectionFileMap, parameters map[string]string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this in integration? I ask... because I would expect this to cause issues. The purpose of the recvfd was to receive the file and hold it open for the life of the connection. This is because other things like for example memifproxy may need to be using it during the life of the connection.

Now please note, the and hold it open part may in fact not be necessary... but you will not be able to tell that from the unit testing in SDK. Testing in integration or with cmd-forwarder-vpp would give you a sense of whether you can get away with closing these files after the processing of a Request message or whether you need to hold them open for the life of the connection.

I'm hoping your are correct here... because I'd like to see this change work as submitted :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwarnicke , thanks a lot for your comments!

As far as I understand, if there's a timeout, all files are also closed as closeAllFiles flag is true in Close method. The cleanup I added is for the case when there's no Peer in context (cancelContext passed from timeoutserver).

I'm definitely not going to commit this unless it's tested in integration (locally as well as on CI - will discuss the details with Denis).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sol-0 Yeah... and please note: your change may be right. I hope its right. I was just wracking my brains as to why the closeAll had been there to begin with, and thought of possible (not certain) issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwarnicke You're correct. Currently, @sol-0 is verifying this change on integration tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denis-tingaikin , @edwarnicke integration testing has been completed: https://github.com/networkservicemesh/integration-k8s-kind/actions/runs/1517061295

Local integration testing has also completed successfully.

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
@sol-0 sol-0 self-assigned this Nov 30, 2021
@sol-0 sol-0 marked this pull request as ready for review November 30, 2021 13:27
Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very like that we can start testing recvfd mechanic.

Added a few comments on reducing the complexity of unit test.

Also please consider covering the registry recvfd server, because we changed pkg/registry/common/recvfd/server.go we should also cover changes by tests.

"github.com/networkservicemesh/sdk/pkg/tools/sandbox"
)

type checkFileClosed struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type checkFileClosed struct {
type checkRecvfdServer struct {


func (n *checkFileClosed) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
p, ok := peer.FromContext(ctx)
if !ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !ok {
require.True(t, ok)

}

transceiver, ok := p.Addr.(grpcfd.FDTransceiver)
assert.True(n.t, ok)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert.True(n.t, ok)
require.True(n.t, ok)

t *testing.T
}

type wrapTransceiver struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type wrapTransceiver struct {
type notifiableFDTransceiver struct {

// See the License for the specific language governing permissions and
// limitations under the License.

//go:build linux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was added by go fmt as I'm using 1.7. I've removed this line.

Comment on lines 114 to 131
func createFile(fileName string, t *testing.T) (inodeURLStr string, fileClosedContext context.Context, cancelFunc func()) {
f, err := os.Create(fileName)
require.NoError(t, err, "Failed to create and open a file: %v", err)

info, err := f.Stat()
assert.NoError(t, err)

stat, ok := info.Sys().(*syscall.Stat_t)
assert.True(t, ok)

err = f.Close()
require.NoError(t, err, "Failed to close file: %v", err)

fileClosedContext, cancelFunc = context.WithCancel(context.Background())
inodeURLStr = fmt.Sprintf("inode://%d/%d", stat.Dev, stat.Ino)

return
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not quite follow why do we need this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required in case of multiple files to check that we're closing the same files that we created - I'm returning "inodeURLStr" to create a mapping inodeURLStr -> onFileClosedFunc which I'm later using in finalizer.

Comment on lines 163 to 167
dir, err := ioutil.TempDir(os.TempDir(), t.Name())
require.NoError(t, err)
defer func() {
_ = os.RemoveAll(dir)
}()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use t.TempDir()

Comment on lines 139 to 143
select {
case e := <-errCh:
assert.Failf(t, "Server failed to start: %v", e.Error())
default:
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
select {
case e := <-errCh:
assert.Failf(t, "Server failed to start: %v", e.Error())
default:
}
require.Len(t, errCh, 0)


inodeURLStr, fileClosedContext, cancelFunc := createFile(testFileName, t)

serveURL := &url.URL{Scheme: "unix", Path: s.Name(), Host: "0.0.0.0:5000"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why do wee need a Host for unix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required, I've removed it

return
}

func createServerAndClient(ctx context.Context, t *testing.T, testServerChain *networkservice.NetworkServiceServer, serveURL *url.URL) (testClient networkservice.NetworkServiceClient) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func createServerAndClient(ctx context.Context, t *testing.T, testServerChain *networkservice.NetworkServiceServer, serveURL *url.URL) (testClient networkservice.NetworkServiceClient) {
func createServerAndClient(ctx context.Context, t *testing.T, testServerChain *networkservice.NetworkServiceServer, serveURL *url.URL) networkservice.NetworkServiceClient {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use return without variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks complicated.

Split this function into two.

OR

Consider using endpoint package and client chain directly.

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
var fileCh = make(chan *os.File)
go func() {
for f := range recv {
runtime.SetFinalizer(f, func(file *os.File) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set finalizer in OnRecvFile implementation.

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
Comment on lines 122 to 133
var dir = t.TempDir()

s, err := os.Create(path.Join(dir, "test.sock"))
require.NoError(t, err)

var testFileName = path.Join(dir, t.Name()+".test")

inodeURLStr, fileClosedContext, cancelFunc := createFile(testFileName, t)

serveURL := &url.URL{Scheme: "unix", Path: s.Name()}

var testChain = chain.NewNetworkServiceServer(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use one style for value assignment?

func TestRecvfdClosesSingleFile(t *testing.T) {
t.Cleanup(func() { goleak.VerifyNone(t) })

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time limit for unit test is 1s.

Suggested change
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)

Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better. Tests are still looking over complicated. Added a few comments to reduce complexity.


inodeURLStr = inodeURL.String()

return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use anonymous returns. I wonder why linter is not alerting on this line...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply this to other places.

Comment on lines 52 to 76
type checkRecvfdServer struct {
t *testing.T
onFileClosedCallbacks map[string]func()
}

func (n *checkRecvfdServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
return next.Server(ctx).Close(ctx, conn)
}

func (n *checkRecvfdServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
err := grpcfdutils.InjectOnFileReceivedCallback(ctx, n.onRecvFile)
require.NoError(n.t, err)

return next.Server(ctx).Request(ctx, request)
}

func (n *checkRecvfdServer) onRecvFile(fileName string, file *os.File) {
// checking a file is closed by recvfd by setting a finalizer
runtime.SetFinalizer(file, func(file *os.File) {
onFileClosedCallback, ok := n.onFileClosedCallbacks[fileName]
if ok {
onFileClosedCallback()
}
})
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type checkRecvfdServer struct {
t *testing.T
onFileClosedCallbacks map[string]func()
}
func (n *checkRecvfdServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
return next.Server(ctx).Close(ctx, conn)
}
func (n *checkRecvfdServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
err := grpcfdutils.InjectOnFileReceivedCallback(ctx, n.onRecvFile)
require.NoError(n.t, err)
return next.Server(ctx).Request(ctx, request)
}
func (n *checkRecvfdServer) onRecvFile(fileName string, file *os.File) {
// checking a file is closed by recvfd by setting a finalizer
runtime.SetFinalizer(file, func(file *os.File) {
onFileClosedCallback, ok := n.onFileClosedCallbacks[fileName]
if ok {
onFileClosedCallback()
}
})
}

Comment on lines 209 to 212
&checkRecvfdServer{
t: t,
onFileClosedCallbacks: onFileClosedFuncs,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&checkRecvfdServer{
t: t,
onFileClosedCallbacks: onFileClosedFuncs,
},
checkcontext.NewServer(t, func(t *testing.T, c context.Context)
grpcfdutils.InjectOnFileReceivedCallback(ctx, func(...) {
//Do assertation here.
})
})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply this for other recvfd tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
Comment on lines 88 to 123
t.Cleanup(func() { goleak.VerifyNone(t) })

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()

dir := t.TempDir()

s, err := os.Create(path.Join(dir, "test.sock"))
require.NoError(t, err)

testFileName := path.Join(dir, t.Name()+".test")

inodeURLStr, fileClosedContext, cancelFunc := createFile(testFileName, t)

onFileClosedCallbacks := map[string]func(){
inodeURLStr: cancelFunc,
}

serveURL := &url.URL{Scheme: "unix", Path: s.Name()}

testChain := chain.NewNetworkServiceServer(
checkcontext.NewServer(t, func(t *testing.T, c context.Context) {
injectErr := grpcfdutils.InjectOnFileReceivedCallback(c, func(fileName string, file *os.File) {
runtime.SetFinalizer(file, func(file *os.File) {
onFileClosedCallback, ok := onFileClosedCallbacks[fileName]
if ok {
onFileClosedCallback()
}
})
})

require.NoError(t, injectErr)
}),
recvfd.NewServer())

startServer(ctx, t, &testChain, serveURL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is repeated in two tests.

Is it make sense to rework these tests on testify suite and move this setup logic into SetupSuite function?

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
@denis-tingaikin denis-tingaikin merged commit 23e4c36 into networkservicemesh:main Dec 7, 2021
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Dec 7, 2021
…k@main

PR link: networkservicemesh/sdk#1173

Commit: 23e4c36
Author: Sol-0
Date: 2021-12-07 21:10:50 +0700
Message:
  - Fixed recvfd leaks (#1173)
* Fixed recvfd leaks

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added const for OS name

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Fixed formatting

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added tests

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Added registry recvfd server test

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>

* Addressed review comments, added test suite

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

recvfd server leaks files, memory both in networkservice and registry chains
4 participants