Make simulated WFP flow-context removal atomic and idempotent
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 112
- Fork
- 36
- Merge trung bình
- 8 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/usersim
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Dependency DashboardĐang mởtriaged
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 15/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Duplicate cxplat codeĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của microsoft/usersim
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Niko1221/Strata#5560 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
NVIDIA windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするĐang mở要トリアージ 辞書
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Đang mởkind/bug priority/medium qa_automation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yugabyte/yugabyte-db#37324 ·
Maintainer thường phản hồi trong vòng 1 ngày