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

Retry failed FwpmTransactionBegin #3659

Closed
wants to merge 1 commit into from

Conversation

dv-msft
Copy link
Collaborator

@dv-msft dv-msft commented Jun 21, 2024

Description

WFP allows only 1 active transaction at a time per WFP session. This leads to errors in multi-threaded scenarios where threads simultaneously try to load and attach ebpf program types supported by the NetEbpfExt extension. In certain timing sensitive instances, such multi-threaded scenarios cause NetEbpfExt to attempt to create a new WFP transaction while a previous transaction is still in progress.

This PR adds time-bounded retry logic to the call to FwpmTransactionBegin call to allow for an already-in-progress transaction (if any) to complete.

Testing

Fix verified locally (100% repro) as well as multiple, back-to-back CI/CD runs on private self-hosted runner.

Do any existing tests cover this change? Are new tests needed?
Issue uncovered by existing tests. No new tests needed.

Documentation

No Documentation changes needed.

Installation

Is there any installer impact for this change?
No Installer impact.

Fixes #3602 #3607

@dv-msft dv-msft marked this pull request as ready for review June 21, 2024 16:57
@dv-msft dv-msft changed the title (DRAFT PR - NOT FOR REVIEW) - Retry failed FwpmTransactionBegin Retry failed FwpmTransactionBegin Jun 21, 2024
Copy link
Collaborator

@shankarseal shankarseal left a comment

Choose a reason for hiding this comment

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

Instead of retry logic, a different session must be used for a given program attach operation.

@dv-msft
Copy link
Collaborator Author

dv-msft commented Jun 21, 2024

Instead of retry logic, a different session must be used for a given program attach operation.

Did not work. Will discuss offline.

@saxena-anurag
Copy link
Contributor

saxena-anurag commented Jun 27, 2024

Will this issue be amplified when we support multiple programs to be attached to the same hook (issue #2626)?

@Alan-Jowett
Copy link
Member

Waiting on Shankar's comments to be addressed. Will review after that.

@shankarseal
Copy link
Collaborator

This is being abandoned as this not the right fix.

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.

Workflow failed - km_mt_stress_tests_restart_extension
4 participants