Make simulated WFP flow-context removal atomic and idempotent
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- networking
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 112
- Forks
- 36
- Merge medio
- 8 d 10 h
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/usersim
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dependency DashboardAbiertotriaged
Dificultad 3/5 Medio día Aptitud para principiantes 15/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Duplicate cxplat codeAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de microsoft/usersim
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Niko1221/Strata#5560 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
NVIDIA windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするAbierto要トリアージ 辞書
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
yksr-melt/Meltype#1625 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Abiertokind/bug priority/medium qa_automation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37324 ·
Los mantenedores suelen responder en 1 día