Make simulated WFP flow-context removal atomic and idempotent
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp
- 領域
- networking
調査の方向性
Start with fwp_engine_t::test_remove_flow_context and delete_flow_context, where the shared-lock lookup of fwpm_flow_contexts is released before the exclusive-lock erase. Make find-and-erase one exclusive-lock section, copy the callback inputs, then call flowDeleteFn after unlocking. Done means concurrent removers invoke it at most once, absent entries return a defined status, and a concurrency test covers FwpsFlowRemoveContext0 against simulated deletion.
索引モデルが issue の本文から書いたものです。
説明
Problem
fwp_engine_t::test_remove_flow_context checks fwpm_flow_contexts under a shared lock, releases the lock, and then calls delete_flow_context, which reacquires an exclusive lock. Two concurrent removers can both observe the association. The winner erases it; the loser then finds no entry, asserts that the callout is non-null, and can invoke flowDeleteFn through a null pointer.
This occurs when simulated external flow deletion races with FwpsFlowRemoveContext during callout cleanup.
Originating review: https://github.com/microsoft/ebpf-for-windows/pull/5623#discussion_r4458625427
Desired behavior
Finding and claiming a flow-context association must be one atomic operation. Exactly one remover should own the association and invoke flowDeleteFn; later removers should receive a safe already-removed/not-found result.
The callback must still run after releasing the engine lock.
Acceptance criteria
- Find-and-erase of
fwpm_flow_contextsoccurs under one exclusive lock. - The winning remover copies all callback inputs before releasing the lock.
flowDeleteFnis invoked outside the engine lock and at most once per association.- Missing or already-removed associations return a defined status/no-op without assertions or null dereferences.
FwpsFlowRemoveContext0reports an appropriate status for an absent association.- A concurrency test runs cleanup removal and simulated flow deletion against the same flow.
- 主要言語
- C++
- スター
- 112
- フォーク
- 36
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/usersim のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
Dependency Dashboardオープンtriaged
難易度 3/5 半日 初心者へのやさしさ 15/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoft/usersim の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Niko1221/Strata#5560 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
NVIDIA windows
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
要トリアージ 辞書
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
yksr-melt/Meltype#1625 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug priority/medium qa_automation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yugabyte/yugabyte-db#37324 ·
メンテナーはふだん 1 日以内に返信