BFD session del/add may race to update RIB nexthop shutdown status
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Inizia tracciando Session::drop, RibTask, spawn_blocking e l’handle di shutdown per la rimozione del peer, per identificare quali task e operazioni RIB vengono attesi. Costruisci il fake RIB sink con le barrier descritte nell’issue, quindi rimuovi e ricrea un peer mentre una vecchia scrittura è bloccata. Il lavoro è completato quando lo shutdown termina prima della nuova aggiunta, oppure quando le generazioni superate non possono sovrascrivere il nuovo stato RIB.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The following is an issue identified by AI when I asked it to do an adversarial code review of #795. This was pre-existing in the sync/pthread impl, which is why it was not addressed as part of the async swap-out.
Title: BFD: prevent stale RIB writes from superseded sessions
Problem
BFD session teardown does not wait for all RIB work associated with the
session to finish.
Session::drop() aborts the session's async tasks, but RibTask performs
RDB updates through tokio::task::spawn_blocking(). Once a blocking task
has started, aborting the async task waiting for it does not cancel the
blocking operation.
The shutdown handle returned when removing a peer waits only for the UDP
listener. It does not wait for the session's RIB task or an in-flight
blocking RDB update.
Failure scenario
- Session A begins a RIB update for peer P.
- A is removed.
- The async RIB task is aborted, but its blocking update remains live.
- Session B is created for the same peer.
- B publishes its current state to the RIB.
- A's stale update completes afterward and becomes the final RIB state.
For example, session B may be Down while a stale shutdown = false write
from A leaves routes through the peer enabled. Because B already believes
it synchronized shutdown = true, no further write is guaranteed until
another state transition occurs.
The inverse is also possible: a stale shutdown = true write can suppress
routes belonging to a new Up session.
Impact
The forwarding state can permanently disagree with the currently visible
BFD session until another BFD transition happens.
Proposed direction
Give peer removal an awaitable, session-level shutdown operation that:
- stops and awaits the driver and egress tasks;
- closes the state channel;
- allows any current blocking RIB operation to complete;
- awaits the RIB task;
- awaits the listener task.
The same peer must not be re-added until shutdown of the prior generation
has completed. Alternatively, serialize RIB updates through a
generation-aware per-peer worker that rejects writes from superseded
sessions.
Testing
Add a fake RIB sink with barriers that can:
- block an old session's write;
- remove and recreate the session;
- allow the new session's write to complete;
- release the old write;
- verify that the old generation cannot overwrite the new state.
- Lingua principale
- Rust
- Stelle
- 100
- Fork
- 8
- Merge medio
- 2g 1h
- PR unite (30g)
- 18
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di oxidecomputer/maghemite
-
ICMPv6 Router Solicitations are generated with invalid checksumsForse già presa @taspelund l’ha presa 154 giorni fa. ApertaBug mgd ndp rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
oxidecomputer/maghemite#802 ·
I maintainer di solito rispondono entro 1 giorno
-
ddm
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
oxidecomputer/maghemite#1039 ·
I maintainer di solito rispondono entro 1 giorno
-
ddm want
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
oxidecomputer/maghemite#1033 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug ddm rust
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
oxidecomputer/maghemite#997 ·
I maintainer di solito rispondono entro 1 giorno
-
🤖 ddm: a withdraw removes a route that a second source still givesForse già presa @taspelund l’ha presa 19 giorni fa. ApertaBug ddm rust
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
oxidecomputer/maghemite#996 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di oxidecomputer/maghemite
Issue simili
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedApertaunconfirmed possible issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jerney-nexus/epikrise#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Yeachan-Heo/gajae-code#8058 ·
I maintainer di solito rispondono entro 1 giorno
-
bug daemon
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno