BFD listener deletion/creation race
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
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Inizia dagli handler DELETE e PUT, dalla gestione del dispatcher e dal percorso di arresto del listener descritti nell’issue; esamina #795, #796 e #787 per verificare le decisioni esistenti sul ciclo di vita. Riproduci lo scenario di arresto bloccato con un peer, quindi verifica che un’aggiunta concorrente attenda l’arresto e abbia successo dopo il rilascio, senza produrre un errore address-in-use.
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.
Problem
Removing the last peer for a listening address removes the listener from
dispatcher bookkeeping before the listener task has been aborted and
joined.
The DELETE handler releases the daemon mutex before awaiting the listener
shutdown handle. This is necessary to avoid awaiting while holding a
synchronous mutex, but it creates the following race:
- DELETE removes the final peer and receives a shutdown handle.
- Dispatcher bookkeeping no longer contains the listener.
- Before DELETE polls or completes listener shutdown, a concurrent PUT
acquires the daemon lock. - PUT attempts to bind the same address.
- The old listener task still owns the socket, so the bind fails with
EADDRINUSE. - PUT returns an internal error even though dispatcher state says the
address is available.
Sequential clients that await DELETE before issuing PUT are protected,
but concurrent reconciliation is not.
Impact
Concurrent configuration reconciliation can lose the old session and
fail to install its replacement. The caller must retry an otherwise
valid configuration update.
Proposed direction
Represent listener shutdown in dispatcher state instead of removing the
resource before its lifetime ends.
Possible designs:
- retain a
ShuttingDownentry and have a new add await it; - serialize add/remove operations through a
tokio::sync::Mutexheld
across listener shutdown; - move listener management into an actor that processes add/remove
operations sequentially.
The synchronization should ideally cover complete session shutdown as
well, including RIB work, rather than only the UDP listener.
Testing
- Add a peer as the only user of a listener.
- Begin deletion while blocking listener shutdown.
- Concurrently attempt to add a peer using the same listen address.
- Verify the add waits rather than failing with
AddrInUse. - Release shutdown and verify the add succeeds.
Related issues
- #787 originally tracked blocking synchronous teardown and noted that
listener/state-machine workers were not reliably joined. - Related follow-up: prevent stale RIB writes from superseded sessions.
Context
A similar socket-lifetime race existed in the synchronous implementation.
#796 fixed the sequential DELETE-then-add case but not concurrent
reconciliation.
- 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