Make simulated WFP flow-context removal atomic and idempotent
还没有人认领这个 Issue。
评估
- 难度
- 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 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/usersim 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 18/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
triaged
难度 3/5 半天 新手友好度 15/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 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 个 reaction ·
维护者通常 1 天内回复
-
kind/bug priority/medium qa_automation
难度 2/5 1-3 小时 新手友好度 78/100
yugabyte/yugabyte-db#37324 ·
维护者通常 1 天内回复