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

Fix for metadata leak #412

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

Mixaster995
Copy link
Contributor

Signed-off-by: Mikhail Avramenko avramenkomihail15@gmail.com

Description

Removed possible metadata memory leak

Issue

part of networkservicemesh/sdk#1101

Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
@@ -87,5 +88,8 @@ func (i *ipaddressClient) Request(ctx context.Context, request *networkservice.N
}

func (i *ipaddressClient) Close(ctx context.Context, conn *networkservice.Connection, opts ...grpc.CallOption) (*empty.Empty, error) {
if err := addDel(ctx, conn, i.vppConn, metadata.IsClient(i), false); err != nil {
log.FromContext(ctx).Error(err)

Choose a reason for hiding this comment

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

I suppose that it is Warn, not Error, because nothing is actually failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, done

Copy link
Contributor

Choose a reason for hiding this comment

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

@Mixaster995
please, use for ipaddressServer the same logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@glazychev-art ok, done

@glazychev-art
Copy link
Contributor

Have you checked all chain elements that use metadata? And if they call Store on Request, do they call Del on Close?

@Mixaster995
Copy link
Contributor Author

@glazychev-art i rechecked again and now it should be all components that lacked metadata cleanup

Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
@denis-tingaikin denis-tingaikin merged commit 2f5f7f7 into networkservicemesh:main Oct 14, 2021
nsmbot pushed a commit to networkservicemesh/cmd-nse-icmp-responder-vpp that referenced this pull request Oct 14, 2021
…k-vpp@main

PR link: networkservicemesh/sdk-vpp#412

Commit: 2f5f7f7
Author: Авраменко Михаил
Date: 2021-10-14 16:23:56 +0700
Message:
  - Fix for metadata leak (#412)
* removed possible metadata leak

Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>

* added metadata cleanup for few more components

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

PR link: networkservicemesh/sdk-vpp#412

Commit: 2f5f7f7
Author: Авраменко Михаил
Date: 2021-10-14 16:23:56 +0700
Message:
  - Fix for metadata leak (#412)
* removed possible metadata leak

Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>

* added metadata cleanup for few more components

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

PR link: networkservicemesh/sdk-vpp#412

Commit: 2f5f7f7
Author: Авраменко Михаил
Date: 2021-10-14 16:23:56 +0700
Message:
  - Fix for metadata leak (#412)
* removed possible metadata leak

Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>

* added metadata cleanup for few more components

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
@Mixaster995 Mixaster995 deleted the fix/metadata branch November 25, 2021 11:13
nsmbot pushed a commit that referenced this pull request Jan 24, 2022
…k-kernel@main

PR link: networkservicemesh/sdk-kernel#412

Commit: 500ed31
Author: Ed Warnicke
Date: 2022-01-24 10:21:34 -0600
Message:
  - Merge pull request #412 from Nordix/411
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
denis-tingaikin pushed a commit that referenced this pull request Jan 25, 2022
* Update go.mod and go.sum to latest version from networkservicemesh/sdk-kernel@main
PR link: networkservicemesh/sdk-kernel#412

Commit: 500ed31
Author: Ed Warnicke
Date: 2022-01-24 10:21:34 -0600
Message:
  - Merge pull request #412 from Nordix/411
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>

* Fix after netlink update

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

Co-authored-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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants