Closed dv-msft closed 1 month ago
Instead of retry logic, a different session must be used for a given program attach operation.
Did not work. Will discuss offline.
Will this issue be amplified when we support multiple programs to be attached to the same hook (issue #2626)?
Waiting on Shankar's comments to be addressed. Will review after that.
This is being abandoned as this not the right fix.
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