We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sdk-vpp
sdk-vpp shouldn't leak any resources.
sdk-vpp sometimes leaks VPP resources in case of context canceled/timeout:
func Request(ctx context.Context) (conn, err) { if err := requestVPP(ctx); err != nil { return nil, err // <-- error can be caused by context canceled/timeout } }
It affects almost every sdk-vpp chain element, so it looks like a critical issue.
forwarder.log
context deadline exceeded
VPPApiError: netlink error (-145)
We should probably do something like the following in all sdk-vpp chain elements which allocates some VPP resources:
func Request(ctx context.Context) (conn, err) { postponeCtxFunc := postpone.Context(ctx) conn, err := next.Request() if err != nil { return nil, err } addDel := &vppAddDelSomething{...} if err := addDelSomething(ctx, addDel); err != nil { if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { delCtx, cancelDel := postponeCtxFunc() defer cancelDel() addDel.IsAdd = false _ = addDelSomething(delCtx, addDel) } return nil, err } return conn, nil }
The text was updated successfully, but these errors were encountered:
@edwarnicke @denis-tingaikin It seems to be critical, please take a look.
Sorry, something went wrong.
I think we can create an helper function that will call cancel if context has been expired during resource allocation.
@edwarnicke Please share your thoughts on this issue.
No branches or pull requests
Expected Behavior
sdk-vpp
shouldn't leak any resources.Current Behavior
sdk-vpp
sometimes leaks VPP resources in case of context canceled/timeout:It affects almost every
sdk-vpp
chain element, so it looks like a critical issue.Failure Logs
forwarder.log
context deadline exceeded
in tap chain element.VPPApiError: netlink error (-145)
because of already existing kernel interface with the requested name.Possible solution
We should probably do something like the following in all
sdk-vpp
chain elements which allocates some VPP resources:The text was updated successfully, but these errors were encountered: